> Hello, > > So this crazy idea came to my mind. Since Django (or any other WSGI > project) is running with all modules loaded into memory, after the initial > loading the local .py and .pyc source files are, in theory, no longer > necessary, assume that we don't ever need to reload/restart the system >
Well, for Django is not "so true" as everything is loaded lazily (at the first specific request). So having an image in memory of the whole app can be a bit tricky (but not impossible) > So, > > 1. Is it totally safe to delete .py and .pyc files after the WSIG project > finished loading in current version of uWSGI? (Assume workers don't have > to harakiri or reload) once a module is loaded it is safe to remove the .py and pyc objects > 2. Suppose we need to build a cluster that we only store & distribute > source file from a central node (e.g. a subscription server) and slave > nodes loads python source files via uwsgi protocol or something, How > difficult is could this be? > > This idea could help strengthen runtime security at clustered nodes and > gurantee code integraty. Is my idea bad? i do not think security can be hardened as everyone has access to the process memory area can overwrite it, but for clustering it could be an interesting approach. Currently i am heavily working with the criu project: http://criu.org/Main_Page it is checkpoint/restore for linux. My objective is adapting uWSGI in such a way you can spawn an exact copy of an already running uWSGI instance on a remote node (this would be awesome for slow-loading framework like rails) and dinamically bind to a new socket and subcribe to some router/proxy on the fly -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
