jeudi 1 mai 2014

python - céleri pour deux programmes (django, tornado) - Stack Overflow


everybody. I am working on online game where portal and admin panel is based on Django, while game and real-time services (feeds, chat) are based on Tornado non-blocking I\O.


For real-time transport we utilized SockJS-tornado and SockJS client.


I have a question regarding feeds module. Now we have the following architecture:



  1. Feeds are generated on django side

  2. Django publishes a task with parameters using celery.execute.send_task method

  3. celery worker from tornado side consumes it and stores feeds for each subscriber in mongodb

  4. tornado should also notify each online subscriber with fresh feed in real-time (the problem here that celery worker has different (isolated) environment)


However, there is a problem with 4th aforementioned point. Since celery and tornado has isolated environment, I have no access to feed handler. Is there a way to have access to an instance from another environment in celery environment by utilizing memcache; or may be celery somehow can share environment with application ?!


Thank you in advance!



everybody. I am working on online game where portal and admin panel is based on Django, while game and real-time services (feeds, chat) are based on Tornado non-blocking I\O.


For real-time transport we utilized SockJS-tornado and SockJS client.


I have a question regarding feeds module. Now we have the following architecture:



  1. Feeds are generated on django side

  2. Django publishes a task with parameters using celery.execute.send_task method

  3. celery worker from tornado side consumes it and stores feeds for each subscriber in mongodb

  4. tornado should also notify each online subscriber with fresh feed in real-time (the problem here that celery worker has different (isolated) environment)


However, there is a problem with 4th aforementioned point. Since celery and tornado has isolated environment, I have no access to feed handler. Is there a way to have access to an instance from another environment in celery environment by utilizing memcache; or may be celery somehow can share environment with application ?!


Thank you in advance!


0 commentaires:

Enregistrer un commentaire