Squeak Socket Primitives

Raab, Andreas Andreas.Raab at disney.com
Thu Nov 11 04:21:28 UTC 1999


> > However, I know
> >very little about web serving, and there may be good reasons for
> >structuring a web server as several processes,
> 
> The standard reason, IIUC, is to use blocking sockets.

Somehow I doubt this. I think that there are two major reasons: One is that
most OSes used for servers allow other processes to run while one is busy
waiting for data from the disk to come in since the hard disk is incredibly
slow compared to machine/net speed. So while the one process is still
waiting for the (web) page to come in from disk the other can already post
the results of the previous read back and a third can actually start
processing a request from the client [Side note: It might be *really*
interesting to have a simple web server that uses the async file primitives
and Smalltalk processes to see what performance is like] The other reason is
that if it comes to 'real work' for serving requests preemptive multitasking
supports much better responsiveness than the cooperative Smalltalk model.
Using blocking sockets just helps to lower the CPU cycles on an inactive
task and give more to the other processes having some actual work to do.

  Andreas





More information about the Squeak-dev mailing list