This post is not a C related question per se, but nevertheless, I will be writing my code in C so I thought it will be appropriate. If it is not, please accept my apology and transfer it to wherever it belongs.
I need an advice on some project I'm working on.
I'm currently writing a C module that supposed to transfer data to another process (probably its parent process).
The data should travel from my process to the other as fast and as reliably as possible. The data will be travelling in a burst manner, meaning every now and then it'll fire some data, where every burst won't be bigger than 1.5Mb in the (really) worst case (in practice it will be much less, no more than couple of KB, I reckon).
The options I'm considering right now are:
1. File - but that seems like too much overhead, plus I don't really like the idea of using files for IPC.
2. Shared memory - this will require some synchronization mechanism, and that sounds too much effort, and too much headache for such a small transfer of data.
3. Using a pipe of some sort (either named pipe or parent-child pipe) - I'm tending towards this option right now.
4. Using a socket - but I'm not sure how common is it to use sockets for IPC, I also never tried to do it before with C, and I don't know how much noticeable overhead does using a socket for this purpose produce, if any.
One last thing, and maybe I should have started with it, the program to which I'm sending the data might be written in Java. Does this place anymore obstacles I'm not aware of?
Any help would be greatly appreciated.