On Thu, 16 Nov 2006, Ben Ford wrote:

> I've been looking into the kamaelia project
> http://kamaelia.sourceforge.net/Introduction.html which uses a different
> approach to multi tasking... essentially it uses inboxes and outboxes and
> the python yield mechanism for communication. They are using it for all
> sorts of interesting things!
> 
> My question is; how do you think this approach stacks up? I'd like to use it
> in an http streaming server for the purposes of a real time AJAX web
> application. But to be honest I would appreciate a 'real' developers point
> of view..
> Thanks
> Ben

Tridge's comments, which were referenced somewhere in this thread, are 
quite interesting. He notes that if you can get away without locks, you 
are going to run faster. Thus, things like forking an application so you 
have separate forked instances to cope with each connected user works 
well. You then have strong guarantees, supplied by the OS, that one 
instance cannot corrupt the memory of another instance.


I personally hate Python when it comes to threads. The global application 
lock means that one one thread can be active at any time. Thus, if you run 
a threaded python app on a dual core cpu, it will go no faster than if it 
had been a single core cpu...


Inboxes and outboxes for communication is indeed doable - but how much 
coding time is it to implement correctly? I suppose there are C libraries 
available somewhere that do this for you. However, linking to those 
libraries, will that introduce license issues, conflict with other 
libraries etc?
I suppose loopback network sockets could be used for inboxes and outboxes, 
or pipes or something, so maybe not that hard..


Derek.
-- 
Derek Smithies Ph.D.
IndraNet Technologies Ltd.
Email: [EMAIL PROTECTED]
ph +64 3 365 6485
Web: http://www.indranet-technologies.com/

Reply via email to