Pyhton/Django: I need some code to run between requests, which concept to look for? : I am trying Django for my project, which contains server-side code, which should work between requests. It should be initialized at server start, keep state, and polled sometimes between HTTP requests. 

I can write own server with python http.server but it seems overkill at the moment, simple (Django built-in HTTP) server is ok for my project for now. Which is simplest way to implement server-side code for typical Django project?