[Pharo-project] Zodiac - 1st delivery - A new (binary) socket stream

Sven Van Caekenberghe sven at beta9.be
Tue May 17 22:24:58 CEST 2011


I would like to announce Zodiac, the project created in response to


according to the plan described in


You can follow the development by looking at the code in


Here is the first delivery: a new (binary) socket stream implementation.

Warning: this is of course not yet code for general consumption, use the source and the comments. This is a proof of concept.

This package has no further dependencies and does not add anything to system classes, it is thus safe to load.

There are four stream classes, ZdcAbstractSocketStream, ZdcSimpleSocketStream, ZdcOptimizedSocketStream and ZdcSocketStream, inheriting from each other, adding successively more optimized implementations of the standard Smalltalk stream primitives. There is one helper class, ZdcIOBuffer to help in managing read and write buffers inside the streams. The interface towards Socket is also quite small (i.e. only a very small amount of the functionality in Socket is used).

The 48 units tests as well as the functional test (see further) are all green on Pharo 1.2.x and 1.3 as well as on Squeak 4.2.

The functional test is the following: Zinc HTTP Components recently got a its ZnNetworkingUtils class turned into a socket stream factory. By loading the new package Zinc-Zodiac from the ZincHTTPComponents repository, you can ask Zn to use the new socket stream implementation, like this:

	ZnNetworkingUtils default: ZnZodiacNetworkingUtils new. 

To reset, just do:

	ZnNetworkingUtils default: nil.

The cool thing is: all of Zn's 151 unit tests, most doing actual HTTP client and server interactions (some over the internet) succeed using the new Zodiac socket stream implementation.



More information about the Pharo-project mailing list