On 09/13/2011 10:20 AM, Sven Van Caekenberghe wrote:
I respect the current SocketStream: it is used by all of us everyday and it works reliably. The problem is that its code base has grown in all kinds of directions and in complexity.
I will have to take a look in Pharo, because I haven't really looked since I rewrote it.
Today it is pretty hard to understand since it is not clear if all code that is there is relevant. Also, subclassing it to build a secure socket stream is pretty difficult. The Zodiac streams are an experiment in rewriting [secure] socket stream. I would be honored if you would take some time to look at the code and give some feedback
I could and will try to squeeze it in, but I am mainly hacking Jtalk these days :)
The cool thing is: all of Zn's +170 unit tests, most doing actual HTTP client and server interactions (some over the internet) succeed using the new Zodiac socket stream implementation.
Have you also measured performance? Compared to old SocketStream? Just curious.
The earliest SocketStream by Bolot also used an internal object for each "direction" of the stream - a BufferStream I think it was called. And nuking those to make SocketStream operate directly on buffers with the ability to move "pointers" etc was one of the main optimizations in order to minimize copying etc.
regards, Göran
