the whole idea of an asycronous server is that you only use one
process. to handle all requests. this way session data can be stored
without using an external symbols.
Even further several clients may share state in some way, though the
only example I can think of off the top of my head is a multiplayer
The performance asumption is that your server is I/O bound and not cpu
bound. Generally anytime you do something that may block you need to
differ that processing probably by adding the waiting resource as its
own task. And in the meantime move on to other processing such as
other waiting requests.
The only time I would spawn a new process is if a request needed
somthing very intensive done. We would then need to have a task
waiting on the other process to complete its work.
the idea is that your process is not allowed to block, so each time IO
is needed the currently executing code needs to be suspened, so that
the system can do something else without blocking. Twisted dose this
by breaking up larger lgoical units into small functions that
essentially sechdule a handler function to be handled when an external
resoult is ready as the last thing before returning.
I am operating at the limits of my understanding here and to be honest
I'm not certain how the whole differed processing model will translate
into picolisp. Though on the face of it, I think it should transfer
The Task mechanism along with some other functions I reacal reading
about seem up to the job.
2008/10/8 Henrik Sarvell <[EMAIL PROTECTED]>:
> Konrad, I'm also a fan of friendly urls and the way you describe it is
> currently how I have set things up to work with Apache through custom
> logic in PHP and mod_rewrite. Let me know if you want any help and
> I'll try my best :-)
> I don't know exactly what you're aiming at and I couldn't get a lot of
> details from the Twisted homepage. What I would like though is a
> restful setup similar to Apache + PHP. All state/session information
> would then be stored in the Pico DB and accessed through a unique
> session id, just like in PHP. Each time a request happens a new pico
> process is spawned and whatever is designated to happen happens and
> finally the pico process terminates. In effect each script would be
> its own little mini-application.
> This model is arguably the main reason why PHP dominates web
> development at the moment, that and the fact that it's a templating
> language automatically. Automatic templating is something I can live
> without though :-)
> UNSUBSCRIBE: mailto:[EMAIL PROTECTED]
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]