I have a multit-threaded xmlrpc service running which stores a huge amount of data ~2G in memory. Currently, if I want to update a method the server exposes I have to restart the service. The problem here is that if I restart the service it needs to load all of the data it had in memory back into memory by using a database or using shelved data.
I am using methods like this:
xmlrpc_getUser(self, uid):
return self.users[uid]
What I was hoping I could do is just use these methods as a proxy to another module, so my methods would look more like this
xmlrpc_getUser(self, uid):
return self.proxy.getUser(uid)
This way I could update code on the development server then simply copy my update proxy module to the production server without the need for a restart.
I tried adding import service_proxy to the constructor of my xmlrpc service controller, but I think the module is cached and won't reload.
Is there a good way to do this? Thanks.