Joined: 25 Jan 2006 Posts: 8517 Location: 127.0.0.1
Posted: Tue Jan 10, 2017 12:36 am Post subject:
From personal experience I would not recommend mail-slots or named pipes, they are both extremely slow, unreliable and crash often. I would recommend if you need some form of IPC either use a custom MMF implementation and write your own mini-protocol for it, or use raw sockets such as TCP/UDP through a library such as ZMQ. They are much more efficient in terms of speed and reliability.
I've stressed tested MMF and Mail-Slot implementations against each other in a live MMORPG situation where I needed to send live packets to a remote program and process them, then send back to the game client. Speed was a requirement here as you slow down the packet flow, you lag out and disconnect. Mail-slots could not keep up at all and often crashed for no reason. The overhead from them was insane too. I then wrote a custom MMF protocol to do the work and it worked flawlessly. The speed was instant and there was no overhead outside of the custom protocol buffers storing data as needed.
The same could be done using ZMQ or similar with a TCP or UDP setup too. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum