What to know detail about why Squid use single process.

From: STARYNKEVITCH Basile <Basile.Starynkevitch@dont-contact.us>
Date: Tue, 23 Apr 2002 09:58:44 +0200

>>>>> "maer727" == maer727 <maer727@sohu.com> writes:

    maer727> Hi, pals! I read from Programming Guide that Squid is a
    maer727> single process application. I also learn the shortcoming
    maer727> of multi-process (multi-thread). Here is what the
    maer727> Programming Guide says,

    maer727> //////////////////////////////////////////////////////////////////////
    maer727> Squid does not use a ``threads package'' such has
    maer727> Pthreads. While this might be easier to code, it suffers
    maer727> from portability and performance problems. Instead Squid
    maer727> maintains data structures and state information for each
    maer727> active request.
    maer727> //////////////////////////////////////////////////////////////////////

I am not really a pthread expert (but knows it a bit) but I'll guess
that the single-thread decision was made long time ago. It could be
the case that if an opensource HTTP cache solution was started today,
it would make very different decisions on multi-threading -and even on
the choice of the programming language. In particular, Posix
(including Posix threads) seems a much broader system specification
today than ten years ago (with the huge exception of Microsoft systems
which I do not really know).

The mono-thread decision is very heavy constraining, and nearly
requires the callback (I would even name it "dumb continuation passing")
programming style.

But I am not really a Squid expert.

N.B. Any opinions expressed here are only mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

---------------------------------------------------------------------
Basile STARYNKEVITCH ---- Commissariat l Energie Atomique * France
DRT/LIST/DTSI/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX
phone:+33 1,6908.6055; fax: 1,6908.8395 home: 1,4665.4553; mobile: 6,8501.2359
work email: Basile point Starynkevitch at cea point fr
home email: Basile at Starynkevitch point net
Received on Tue Apr 23 2002 - 02:21:17 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:18 MST