[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Async IO (was Re: libcurl?)

From: Graham Fawcett
Subject: Re: [Chicken-users] Async IO (was Re: libcurl?)
Date: Wed, 5 Oct 2005 09:10:25 -0400

On 10/5/05, Jörg F. Wittenberger <address@hidden> wrote:
> Am Dienstag, den 04.10.2005, 14:40 -0400 schrieb Graham Fawcett:
> > The motivations are different. Termite's raison-d'etre seems to be
> > elegant, distributed computing. Twisted [1] is a networking framework
> > for building protocol handlers (and applications on top of them) based
> > on non-blocking I/O and a kernel ("reactor") that dispatches network
> > events to protocol/application handlers, which are composed using a
> > set of callback functions.
> Thanks for telling me eventually what twisted actually is.  I should
> have read all mails before composing my last posting about Askemos...

I suppose I should have described Twisted earlier. :-)
> So the Askemos kernel more or less does what Twisted does: dispatch
> network events to handlers.
> Does Twisted keep handlers in virtual synchrony or does it do it's work
> on a single host only?

Well, my hasty answer is "single host only". But keep in mind that
Twisted is really a networking kernel, and numerous protocols and
applications have been layered on top of it. It's certainly possible
that someone has done "virtual syncrhony" work using Twisted as a IPC
mechanism, but that's beyond the scope of the core package.

> >  Twisted's library includes protocol
> > implementations for HTTP, SMTP, IMAP, etc. There's no threading
> > overhead, and such a "monolithic, non-blocking" design can handle a
> > very large number of concurrent connections, usually scaling better
> > than a multithreaded architecture.
> Well, from an average of 0.047 seconds processing per request I conclude
> that Askemos would handle 1728000 pages view and 432000 updates/place
> per day from garkin: [snip]

(I should add here that I'm really not an apologist for Twisted, nor
for the "async IO scales better than threads" argument. :-) There is
evidence to support the argument, so I'm happy to repeat it, but it's
not my banner to wave. I do believe in the general hardness of
concurrency, and that threading often complicates a design
unneccesarily (Ed's water + sodium analogy is well taken!).
Personally, I'd lean toward any concurrency model that doesn't involve
threads, not because of performance, but because of transparency and
reduced complexity.)

> > (As *yet* another aside, is anyone aware of/interested in SEDA (Staged
> > Event-Driven Architecture) [2]? If I were building Twisted-for-Scheme
> > from scratch, I'd probably take a hard look at the SEDA architecture
> > first. Just curious if this is on anyone's else's radar.)
> Yes, me.  ;-)  As far as I can tell from a quick glance over the paper
> (I can#t spent more time now) it's pretty much how we did our WebDAV
> implementation.

Thanks. I'm interested in taking a look at Askemos. The dependency on
RScheme is unfortunate: yet another Scheme to soak in! <sigh> I can
only allocate a few cycles per week to Scheme in general, and my poor
brain is definitely monolithic and non-threading. :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]