[Seaside] [ANN] Seaside 3.1 and 3.0.10 release

Sven Van Caekenberghe sven at stfx.eu
Wed Jan 8 15:23:28 UTC 2014


Sebastian,

On 08 Jan 2014, at 14:05, Sebastian Sastre <sebastian at flowingconcept.com> wrote:

> On Jan 1, 2014, at 11:32 AM, Johan Brichau <johan at inceptive.be> wrote:
> 
>> Any specific reason you do not want to switch to the Zinc adapter?
>> 
>> Johan (sent from my mobile)
> 
> Yesterday I've learned there is a name for what Zinc is missing for me and it's called streaming uploads

At the lower levels the Zinc HTTP Components Framework can certainly do streaming input/output of ZnRequests and ZnResponses. It is just a question of exposing this at higher levels, ZnServer request handling, delegates, Seaside adaptor and finally Seaside itself. How to do this (well) is not that trivial.

Just talking about the Zinc level, you should be able to do something like this (not tested):

(ZnServer startDefaultOn: 8099)
  reader: [ :stream | ZnRequest readStreamingFrom: stream ];
  onRequestRespond: [ :request |
    request stream next: request contentLength ]. 

In the handler block request is now a ZnStreamingEntity instance, the header has been read, but not the content. You can access the stream directly. Of course, you also have to look at the header info to know the Content-Type and Content-Lenght, and it is your responsibility to read all data correctly. There is also the question what you will do with the data itself.

In any case, this can only be a per server setting, as far as I can see.

Sven

PS: The class ZnUtils ('streaming' protocol) contains code that does incremental stream processing - you might look there for inspiration.

> sebastian
> 
> o/
> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list