Squeak Socket Primitives

John.Maloney at disney.com John.Maloney at disney.com
Wed Nov 10 02:40:41 UTC 1999


Hi, Craig.

At 5:42 PM -0800 11/9/99, Craig Latta wrote:
> I think performance will suffer if the Squeak VM continues to poll for socket events.

But it doesn't poll. It waits on a semaphore for either some change
of socket status or a timeout, whichever comes first. It then checks
the socket status to see what's happened. Such checks are an essential part
of any socket interface. For example, the client code might be waiting
for data to arrive when the socket is unexpectedly closed. One could
do the checks in the C code of the primitive, but that wouldn't make
things go any faster.


Re:
>> ...at this point the Squeak primitives have been implemented and 
>> debugged on quite a number of platforms including the Sharp iCruise...
>
>	Does the iCruise pose a special challenge?

Not that I know of. However, Yoshiki spent quite a bit of time
doing the implementation and he's a graduate student with limited
time for Squeak VM hacking. So I'd rather not ask him and the
other VM implementors to implement an entirely new set of socket
primitives.


Re:
>	I do think the current primitives are inherently flawed. The "accept" problem is another relatively minor issue. Again, I urge Squeakers to read the comparison webpage.

I disagree, but I'll read through your arguments again.


Re:
>> What Squeak *could* use, I believe, is a simple and reliable 
>> SocketStream implementation.
>
>	I think Correspondents provides a very good implementation (NetStream), which incidentally works with all external resources, including sockets, files, serial ports, etc. Correspondents also provides a  client and server framework which uses it to good effect, and could be the basis of robust and easy-to-use reimplementations of Squeak's current internet clients and servers. I'm interested in speaking with anyone with related ideas.

All of this could be quite useful, especially if it could be made to
run on the current Squeak socket primitives. If you did this, your
higher level code could be filed into any Squeak on any platform for
testing and evaluation by the community. And you could always return to
the fight over the socket primitives some other day... :-) But please
try to coordinate with Ralph; I understand that he'd like to do a
portable layer that would also run on various commercial Smalltalks,
which would be pretty useful for sharing code...

	-- John





More information about the Squeak-dev mailing list