D
D
DYLAN2017-05-11 12:04:35
linux
DYLAN, 2017-05-11 12:04:35

What is the best way to organize a task handler for a controller?

In general, the problem is that there are a number of controllers that must perform tasks coming from outside, while this source is a Web application, the controller must complete the task, and the control application must send a report to the site about the work done.
How I see the solution to this problem:
When the application starts, it sends its PID to the site using the GET method, after which the web application can send signals to a specific recipient and, for example, send a signal that the PID was successfully received. When a task for the controller appears, the web application parses the instructions to work in JSON and sends them to a common buffer (well, or to the edge as a test in a file), and then sends a signal to a known PID that a task has appeared for the controller. The Application then retrieves the instructions and creates a child process with the parameters taken from the decoded JSON object. When created, the child process will also send a GET message to the site that I have such and such a PID, I perform work with such and such an ID, and my log file has such and such a name.
It’s just necessary to protect the channel, but I don’t think this is a problem, it’s more of a formality.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fortop, 2017-05-11
@ermolaev_nikita

Are standard solutions like
Gearman, ActiveMQ, RabbitMQ no longer suitable?
There is already a circuit that you describe, with all the technical nuances.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question