Server Smalltalk Guide


Servers and servlets

Tip icon
To better understand this section, examine the sample SstHttpServerExample.

SST contains support for writing the server side of typical client-server applications. Client-server applications differ from peer-to-peer systems in that they have explicit notions for client and server. That is, there is an object in the server whose role is explicitly and solely to service client requests.

SST adopts the Java approach of servlets. A servlet is analogous to applets but for servers as opposed to client applications.

The basic architecture consists of a server and a collection of servlets. Clients send requests to the server which dispatches it to one or more servlets. The results of the servlet processing constitute the response to the request.

Servlets adhere to a specific (and simple) API and are therefore pluggable--servlets added to a server are started, stopped, and executed by the server. Groups of servlets are organized into hierarchies using invoker servlets whose role is to re-dispatch requests it receives from the server (or other servlets above it in the hierarchy).

The SST server facilities allow you to write the Smalltalk equivalent of Java servlets. The Smalltalk API is modeled after that of Java; you should refer to the Java documentation for details of programming idioms and use-case structuring. Some of the method and class names have been changed to better suit Smalltalk conventions but their origins remain recognizable. Building server applications discusses the application of these facilities to building an HTTP server.

SST and Java servlets do not interoperate nor are they interchangeable. SST provides a Java servlet-like facility for Smalltalk.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]