[squeak-dev] Re: HydraStream implementation , pull or push scheme?

Paolo Bonzini bonzini at gnu.org
Mon Feb 25 14:31:22 UTC 2008


> when user writes to stream, stream is just collecting a data. Flushing
> stream not causing data  being sent. A sender may block when it's
> cache is full, and will unblock only when receiving side will confirm
> that it's received packets, which now can be discarded from write
> cache buffer.
> Data is sent only when remote side places request on receiving next packet.
> So, when user calls #read, a receiving side sends 'request next data
> packet #N' and when it's received, returns from method.

Pull is usually much better.

I used push for GNU Smalltalk's TCP sockets and in retrospect it was not 
a great idea).

Paolo



More information about the Squeak-dev mailing list