InterProcess Communication

Hi all,
I just want to share data among processes in the same computer.
To do this I have:
1) sockets (since I want to share data in same computer, this is not as efficient as others)

2)Shared memory (involves synchronization issues and others probably...I dont know...)

3)Message Queues

4)Pipes

does anyone knows what is the best way to go for??
I want the data sharing to be asynchronous.

Replies

  • mahul
    mahul
    To share data between processes, you can easily implement pipes, if the processes are in parent, child relationship. Otherwise, try using shared memory, just brush up your knowledge on semaphores. But I feel that the easiest option would be sockets, they can readily be used for interprocess communication b/w processes on the same machine without a problem. And you need not bother about synchronization issues at all.

    I haven't worked with message queues, so I can't comment, but I'm sure someone on CE would definitely help you out with that.
  • avinashkcs
    avinashkcs
    The processes are different. Its a client/server architecture. Both client and server are two different processes. At present communication happens through sockets. I have to change it to other means to make it more efficient.

    I want to know pros and cons of shared memory and message queues. What issues will I face in the future if I use shared memory. Will their be any memory allocation problem (i.e. if I need more memory ) or something like that. What if I use message queues??

    And one more thing I have to use Java.

You are reading an archived discussion.

Related Posts

Can anyone tell me the methods of earning through online along with websites...i am currently using bux.to which is nt enough.....i can work for about 5 hours a day for...
CEans, If you get following message in your email - just delete it. This is a phishing attempt to steal your AXIS Bank account credentials. Security Alert: Attention! Your Axis...
HI OP AMP IS AN HIGH GAIN DIFFERENTIAL AMPLIFIER BUT IDEALLY IT SHOULD NOT ACCEPT ANT CURRENT, WHAT ON EARTH THIS COULD MEAN ? 😒IF IT SHOULD NOT ACCEPT ANY...
can anyone tell me where can i get the tutorial of this software "aim-spice" and also the spice modeling syntax?
Would anyone please tell me what is the difference between Declaration and Definition in "c"?