views:

158

answers:

1

I am trying to implement a real-time application which involves IPC across different modules. The modules are doing some data intensive processing. I am using message queue as the backbone(Activemq) for IPC in the prototype, which is easy(considering I am a totally IPC newbie), but it's very very slow.

Here is my situation:

  • I have isolated the IPC part so that I could change it other ways in future.
  • I have 3 weeks to implement another faster version. ;-(
  • IPC should be fast, but also comparatively easy to pick up

I have been looking into different IPC approaches: socket, pipe, shared memory. However, I have no experience in IPC, and there is definitely no way I could fail this demo in 3 weeks... Which IPC will be the safe way to start with?

Thanks. Lily

A: 

Been facing a similar question myself.

I've found the following pages helpful - http://stackoverflow.com/questions/1235958/ipc-performance-named-pipe-vs-socket (in particular) and http://stackoverflow.com/questions/1746075/sockets-vs-named-pipes-for-local-ipc-on-windows.

It sounds like the concensus is that shared memory is the way to go if you're really concerned about performance, but if the current system you have is a message queue it might be a rather... different structure. A socket and/or named pipe might be easier to implement, and if either meets your specs then you're done there.

Arandia