I have talked with Sebastian Heidbrink over quite a long period of time how to do interprocess communication fom VASalltalk with other languages or system. A solution to this problem might brings us to multiple-processor solutions, quite difficult with today single-threaded virtual machines. And we wanted to have VASmalltalk solutions using multiple threads at once.
Another topic – in this discussion – we had in mind was a programming-language independent solution. Use C# for one topic, Java in another topic and let Smalltalk be an equivalent partner here again.
Therefore I looked at various solutions (e.g. MessagePak-RPC) but then I found a very nice library: ZeroMQ (or “0MQ). This library has bindings (made by others) for lots of programming languages (even for GnuSmalltalk).
I decided to create a binding for VASmalltalk using the strenghts of VASmalltalk.
After having a binding for VA the first programs with interactions with C# were pretty easy to write – that offers VA a world to .NET languages, Java, Ruby and of course vice versa.
Then I remembered a sentence of Sebastian, that having a handler to Mongrel2 could offer a different way of interfacing VA to HTTP – on an equal level with other languages – and perhaps with a more speedier interface.
Then I needed to interface with components over WAN and native 0MQ is not that suitable for that and then I came back to Mongrel2. I sat down and wrote a handler for VA and Mongrel2. With a HTTP request (using SST) to Mongrel2 and then via 0MQ to an image behind Mongrel2 I was able to query my components in a safer way.
But having that I noticed, that Seaside is a must here and I gave all the sources to Sebastian and asked him if he could build an interface to use Seaside (and various techniques) over this handler. And yes, he made this work.
Now Seaside is responsing over Mongrel2 to requests. Sebastian created a new subclass of the SstAdapter stuff – but instead of using their own (VA-) IP socket interface ALL work is done by external threads in the 0MQ library, leaving VA more CPU time to do the more interesting work.
After that Sebastian decided to work on solutions to upload files to Seaside via this interface – and he is pretty sure to make it work and after that we enter the world of WebSockets and all that stuff.
After all we had two wonderful weeks with Mongrel2, 0MQ, VASmalltalk and Seaside and we are looking forward to make this software solution suitable and reliable for our projects (though devided by 8 timezones).
Sebastion will be at Smalltalk Solutions and you may ask him about this project in more details there. I will post updates here …