Hey. There is the following structure:

  1. The python server setup listens to the browser through a socket on port 8081. It waits for a response from it. In this case, the browser will click.
  2. On Go implemented back-end. Here is implemented the filling system.
  3. Having waited for a request from the browser, fitting on python from the first item responds by sending a request to the stuffing and waiting for a response. After receiving the response, the request is sent back to the browser.

Thus, there is some kind of gateway on python that counts statistics. The gateway, like the stuffing, rotates in an endless loop.

Question. How to implement a makefile so that the system stuffing and gateway compile and run in it.

I can’t do this because the make-file is linear. Those. until one instruction is completed. The other will not start.

  • the make target is a build of projects. you need to manage the life cycle. I think that this will suit you. Paver - Mikhail Vaysman

1 answer 1

The make file simply runs commands in the console. Therefore, the classic &

that is, you need to write something like

 run: ./first & ./second & echo "все запущено и работает!" 

well, or if you really need it, you can run it in screen / tmux / with the / docker service.

 run: screen ./first screen ./second & echo "все запущено и работает!" 

plus of this method is that it will be possible to pick up the screen and see the logs. But you can simply redirect the output to a file.

And the last question remains - how to make the completion? The easiest way is to just kill by name. But you can save the PID of running processes and the task is greatly simplified.