How to communicate between a daemon and an application [IPC]
I have 2 binaries part of our project.
Let me call it "Daemon" and "Consumer". Both binaries would start running when the project starts up.
I need to communicate to/from "Daemon" and "Consumer" [I need send a few messages to and fro periodically]. I need to implement this IPC in the most independent and generic way so that we can reuse this code in later projects.
I was thinking of using named pipes. The only freedom that I don't have is both the "Daemon" and "Consumer" should know the "name" of the pipe, so its kind of tied and not very independent.
To my knowledge its not possible to use API's to communicate between 2 binaries/applications.
Is there a better way of communicating in a more generic and independent way?
Thanks in advance.