I’d like to be able to share some object instances between requests for managing asynchronous event delivery, but this seems like something that won’t work with an event based server like lighttpd. Is that the case? What’s the best way to work around this if that is the case?
Of note:
This is not a standard web deployment. I’m trying to make this run on an embedded platform for local network only. So some typical deployment/scaling concerns are not really at play here and resources are at a premium.
FastCGI is already long-running, so getting access to a long-lived object should just be a matter of assigning the object to a module-level variable somewhere.
I’d start with something like this. There are other potential issues if you’re using multiple Python processes, but given your resource constraints I’m assuming that’s not the case.