The development of Swazoo, a web server written in Smalltalk, has been relatively slow recently. This project proposes a series of tasks to improve Swazoo's position in the panorama of portable Smalltalk projects, and a series of infrastructure improvements that could be enabled by changes to Swazoo.
Some such task are refactorings of Swazoo with the following goals:
- improving the set of abstractions that Swazoo uses and provides; for example, GNU Smalltalk include a few changes to Swazoo that add support for SCGI and make it also faster in general.
- Swazoo is currently using a cross-dialect portability layer known as Sport. Most of it could be replaced by Seaside's Grease layer, whose development was initially started and is now coordinated by Julian Fitzell. Grease allows the user to write code more naturally than with Sport, by defining a series of extensions to the ANSI/Smalltalk-80 standard classes that are tested by Grease's test suite.
- the only part of Sport that is not included in Grease is support for sockets. There are two approaches to solving this. One is to add a small per-dialect layer to Swazoo, basically by inlining Sport's classes into Swazoo. The second is to add socket support to Grease. The student could evaluate the relative advantages of these approaches and implement the one that is deemed better.
- regarding the latter possibility, Paolo Bonzini agreed to relicense GNU Smalltalk's Socket and File implementation under a different license for use within Grease or within other dialects. This implementation is relatively large and it could be used as part of Grease.
To sum up, the goals of this project are:
- Incorporate the changes and speedups that went into the version of Swazoo distributed with GNU Smalltalk
- Incorporate and refactor Nicolas Petton's implementation of SCGI for Swazoo
- Replace the Sport dependency with Grease as much as possible
- Augment Grease with new functionality
Additional goals could include development of a common HTTP request framework to be used by Swazoo, Seaside, AidaWeb, Iliad and so on.
Swazoo and Grease have good test suites. Test-driven development will ensure that existing facilities remain functional. In addition, stand-alone benchmark programs such as the Apache benchmark (ab) will be used.
Benefits to the Student
Better understanding of the commonalities and differences between different Smalltalk dialects. Learning the performance impact of using different abstractions provided by the Smalltalk virtual
machines, and the necessary trade-offs to be employed by a high-performance component such as a web server.