Michele Simionato <[EMAIL PROTECTED]> wrote:
> > But if anybody wants to grab the sources from CVS and extend its
> > functionality, then we will be happy to incorporate it. The HTTP stuff 
> > is
> > relatively straightforward.
>
> But what data structure should we use for the body? In Python I would just
> use an iterator, in Alice I don't know.

I'd go for a simple string list - thanks to lazy futures, this can actually 
represent a lazy stream of chunks that is constructed by need (and whose 
head can already be collected if no longer referenced).

> Also, should each large file should be served in its
> own thread, or should we serve the chunks asynchronously, a la Twisted?

I wouldn't create threads for that implicitly. The current interface is 
synchronous. If a user wants writeResponse to operate asynchronously, all he 
has to do is put a "spawn" in front of the call. So a synchronous interface 
easily provides both modes of operation.

Also, note that triggering a lazy suspension will always create a new thread 
already.

(Sorry, I don't know what Twisted does, or how "asynchronously" would differ 
from "in its own thread".)

Cheers,
- Andreas


_______________________________________________
alice-users mailing list
[email protected]
http://www.ps.uni-sb.de/mailman/listinfo/alice-users

Reply via email to