CrazyEngineers
  • 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
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • mahul

    MemberAug 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.
    Are you sure? This action cannot be undone.
    Cancel
  • avinashkcs

    MemberAug 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.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register