[Seaside] Zinc - Twitter - Streaming API - Long lived connections

Igor Stasenko siguctua at gmail.com
Fri Oct 21 10:14:51 UTC 2011

On 21 October 2011 12:02, Davorin Rusevljan <davorin.rusevljan at gmail.com> wrote:
> On Fri, Oct 21, 2011 at 11:59 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>> In my little project (SCouchDB), i also had to deal with same situation:
>>  - a couchDB server API using a long-lived connection(s) to notify
>> observers about database updates,
>> which can be used for replication of data or watching for updates etc.
>> So, the idea is to not wait till all data will arrive upon HTTP
>> request, but answer a stream (which represents a contents),
>> once http response header is arrived. Then user code may request
>> #contents, which will force stream to read all data upon
>> connection is closed (or up to content length, if it specified), or
>> user may consume data in portions by using a #next /#next: messages to
>> stream.
>> This is useful also for cases, when amount of data to transfer is big,
>> so you don't collect it into a huge buffer and only then hanging over
>> to user,
>> but you letting a user to process data in portions, once it arrives via
>> wire.
> Did you use Zinc in SCouchDB, or you were working with plain sockets?

when i worked on it, there was no Zinc yet, so i had to implement a
bit simplified HTTP protocol
(enough for using with CouchDB) by own over plain socket connection.

> thanks,
> Davorin
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Best regards,
Igor Stasenko.

More information about the seaside mailing list