B
B
Boris_B2014-07-24 17:26:12
Django
Boris_B, 2014-07-24 17:26:12

How to implement application server in python?

The task is to continuously process a certain data stream and make some calculations based on them, which are then transferred somewhere. Let's call the code that solves this problem a handler.
The handler needs to be controlled. For example, through the web interface on django. For example, temporarily stop or change the processing algorithm, while the settings must be persistent.
To tie the handler to the database (django models) or any information transfer system would, I think, not be right. Accordingly, the question arises how to untie them.
The creation of a remote-facade suggests itself, only how to do it in python is not very clear to me.
Those. in my understanding, there should be an object that has a collection of handlers (there may be many of them). They must work in parallel with each other. With the help of some means of interprocessor interaction, it receives commands and executes them by calling the methods of the corresponding handler.
Only here in python there is no real concurrency. Therefore, the output handler must be done in a separate process. And this means again you need some kind of interprocessor interaction.
So two questions:
Is there a standard solution for django to communicate with application-server? How to organize it correctly? Should I use redis, zmq or something else?
And how to properly organize the creation and management of handlers (zmq, rpc, something else...)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kazmiruk, 2014-07-25
@Boris_B

application server - gevent
for messaging - gearman
A similar bunch proved to be very good.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question