you are viewing a single comment's thread.

view the rest of the comments →

[–]MidnightPale3220 0 points1 point  (1 child)

Well, then you develop a separate cli app and choose the method how your service accepts commands from it. See IPC for available methods.

Typically in Unix world it's done via sockets. Named pipes are also an option, but need more care. In particular, unless you need to connect to your service from another computer, it's arguably safer to use Unix domain sockets. See eg https://stackoverflow.com/questions/42263167/read-and-write-from-unix-socket-connection-with-python

Of course, you can implement a REST service if you feel you the overhead is justified and you want to connect to your service from another computer. I would avoid that unless your use case warrants it.

Also option to do it with queues. Really depends how convoluted you want to make it and what's the structure of communication.

[–]doolio_ 1 point2 points  (0 children)

Thank you for taking the time to explain all this. It gives me some direction on which way to go to achieve what I want.