On Dec 13, 2006, at 1:58 PM, Perrin Harkins wrote:
However, you could also avoid the problem by running only one
apache process.
That line got me thinking...
I wouldn't do one apache process -- i'd do an entirely new server.
Make another mod_perl server (or use a twisted python server, cos its
good for stuff like that ) that ONLY handles ghostscript. Instead
of talking sockets like in the other post, it speaks via http. It
would be like having a second daemon work on things-- except its not
really a daemon but a gs dedicated mp server.
Your main server works as-is. Instead of opening a ghostscript
file, it does a URL get to tell the other server 'start a new
session'. Handle everything with URL commands - why? because its
way easier than sockets and you can test it using a normal web browser.
The ghostscript-only server is single process (no children)-- so you
can leave stuff open and just run a periodic check to expire old
documents.
Your main server just stores some session data for the current state
of the ghostscript session. you can
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -