I'm developing an xml server in python which serves as an api emulator for an existing server. I'm using process libraries in order to handle multiple processes in the server for each client request. I have found cases in which I need to update shared data from multiple process and I decided to use process data structures like array which allow me to modify global variables in different threads. One of the issues is that I have many global variables now. Is there any best practice or design patterns to develop xml, http servers which require access to unique data from multiple threads without having to define multiple global variables?
Aucun commentaire:
Enregistrer un commentaire