Convert application to asyncby arpx (Acolyte)
|on Mar 10, 2013 at 12:41 UTC||Need Help??|
arpx has asked for the
wisdom of the Perl Monks concerning the following question:
I got a large mod_perl app, currently running apache event MPM.
but now im looking for ways to convert it to more pure asynchronous perl (maybe with node.js)
The theoretical advantage would be speed and load stability, including avoiding issues with poor thread-safe modules resulting in a extended use of lock algorithms.
My thoughts so far:
- this will require some sort of higher level dispatcher that would handle the async blocks. The dispatcher would sit between the httpd and the application.
- the scale of the program makes it unrealistic to rewrite, so the best way would be to place a lot of yields to the dispatcher in the current application (at regular space and at points of interest where external calls can delay).
- the dispatcher would handle some a execute queue and let some entries tie up objects to wait for (db or file reads) and if not done, push back in the queue.
Haven't got further yet in thoughts of execution..
But ideas and input would be of great help! Maybe there is better approaches..