View Feed
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12775 Members
Join this group to post and comment.
avinashkcs • Aug 9, 2008

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


does anyone knows what is the best way to go for??
I want the data sharing to be asynchronous.
mahul • Aug 9, 2008
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 • Aug 9, 2008
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.

Share this content on your social channels -