[Seaside] Zinc - Twitter - Streaming API - Long lived connections
siguctua at gmail.com
Fri Oct 21 09:59:07 UTC 2011
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
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
but you letting a user to process data in portions, once it arrives via wire.
On 21 October 2011 11:23, Sven Van Caekenberghe <sven at beta9.be> wrote:
> On 21 Oct 2011, at 10:55, Davorin Rusevljan wrote:
>> On Fri, Oct 21, 2011 at 10:48 AM, Sven Van Caekenberghe <sven at beta9.be> wrote:
>> > Can Zinc do that? (or some other HTTP Client)
>> I had a very quick look at the Twitter Streaming API. It's interesting and challenging at the same time.
>> Zinc HTTP Components is a foremost a framework to deal with HTTP, with a functional client and server on top of that. Out of the box, the requested use case is not supported. But it should not be too difficult to write some loop that keeps on consuming responses and to deal with them in a streaming fashion.
>> Is there a place where Zinc related questions can be raised and discusssed, or this is right group? I might have many more Zinc questions cooking up :) ?
> The Pharo list is probably the best place.
>> Also note that you will need OAuth support, which is also a challenge (not provided out of the box, although some people have been working on it).
>> I will double check, but for the part of the Streaming api that I might need (there are 3 parts of that api), basic http authentication seems to be still supported. But ieven if not so, CloudFork demo page seems to be able to connect to twitter through OAuth1a
> Yeah, the CloudFork project is cool, they have been doing lots of interesting things.
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside