Sunday, 14 August 2011
flow is a streaming and device driver framework I wrote for Smalltalk. My motivation (in 1996) was to provide a simple way to write new network clients and servers, allowing the developer to spend most of the time thinking about novel protocol details, instead of common infrastucture. At the time, I was on a team developing a new computing platform, designing the device driver architecture. After I got the sockets stuff working, I realized I had something that would work well for writing device drivers in general.
The framework handles much of the recurring implementation details in writing new clients and servers, and cleans up several things in the traditional Smalltalk streaming framework. It includes a NetStream hierarchy whose instances can stream over several different external resources, including TCP and UDP sockets, MIDI ports, files, OSC nodes, digital audio devices, serial and parallel ports, and speech synthesis and recognition. It also runs in the Squeak virtual machine simulator. I finished the first implementation in 1998.
When I made the 3.2-compatible release (in August 2002, when 3.2 was the latest final Squeak release), I decided that making releases of something so low-level like Flow, for a moving target like Squeak, was so painful that it was time to address what I saw as fundamental problems with Squeak's system organization. That's one of the main reasons why I'm working on Spoon.
So, Spoon took Flow's place on the front burner. However, I've extended Flow in the meantime; I use it every day. There's lots of interesting stuff working, waiting for a new Flow release, but at this point I want to make the next release using Spoon. Sadly, I must spend nearly all my time in a different kitchen entirely, earning money. :) I would love to go back to this full-time, if someone could help relate it to income or a degree.
The support for sockets is significantly different than that currently in Squeak. The main differences are a Berkeley-style (and non-polling) primitive interface and a simpler and more efficient scheme for synchronizing Smalltalk processes with socket events. For details and a sales pitch, please read this (hopefully) exhaustive comparison of my framework with Squeak's (from 2004).
As if that weren't enough... the current implementation of flow also depends on a different implementation of streams than that used in the official Squeak release (I refactored the Stream hierarchy for several reasons). This reimplementation is included in the main flow release (and after installation, the changes are recorded in separate change sets).
flow uses its own networking primitives, in plugin format (you don't need to rebuild the virtual machine to use flow).
You might also be interested in this streaming tutorial I wrote.
Thanks in advance for any feedback!