Squeak Performance as a Web Server

Patrick Logan patrickl at servio.gemstone.com
Fri Nov 20 19:24:00 UTC 1998


    I'm using [VWNC] for a Web Server (using a Web Server I built in
    VW similar in concept to the Squeak PWS and an HTML framework I
    wrote). I'm curious if Squeak has general performance good enough
    to investigate using it as a web server.

People are using it, so it's going to be a question of what kind of
performance and features you need.

I built a web server for Gemstone Smalltalk and achieved scalability
by using multiple Gems (each Gem is a VM). The HTTP server is a
"Broker Gem" and redirects a request to one of the "Service Gems". Of
course in Gemstone, all of these Gems are working on the same
distributed "image" repository. In Squeak, they'd all have their own
image so YMMV.

BTW when I did this there was some concern that a Web server in
Gemstone would not perform well. Nevertheless, this code was used by a
customer to run a "near real-time" distributed system (replacing HTTP
with a proprietary protocol). It passed all of their acceptance tests
and made it into production. During heavy use in production the system
began to slow to a crawl. The customer was certain that the Gemstone
piece was at fault. Analysis revealed that the problem was an IBM
mainframe's TCP stack was not keeping pace. IBM fixed a bug in their
stack on-line. As the fix was enabled the Gemstone system immediatey
got back to full speed, never crashing during the ordeal.

So robust "mission critical" performance is possible in a
Smalltalk-based Web server for some requirements. This production
system supported as much as 1300 simultaneous connections to a single
"image". Other typical scalable Web server tricks easily could be
played to get significantly beyond that.

OTOH I would not think the investment worthwhile. Instead I would get
one of the real Web servers like Apache. I am currently trying out the
AOLserver, which is also free and full-featured. I would connect one
of these Web servers to Smalltalk via CGI or some other
mechanism. AOLserver has multiple TCL mechanisms which are really
nice, including an "active server pages" like feature. The TCL can
maintain socket connections to a Smalltalk playing the "application
server" role, allowing Smalltalk to do anything that TCL can do like
Smalltalk-based active server pages. This way you get all the features
you'd otherwise have to build yourself, but you can still do
everything you'd like to do with Smalltalk.

-- 
Patrick Logan                 mailto:patrickl at gemstone.com
Voice 503-533-3365            Fax   503-629-8556
Gemstone Systems, Inc         http://www.gemstone.com





More information about the Squeak-dev mailing list