3 ms·
How do others do publish-subscribe architecture on Linux? There's no multicast IPC primitives, and nothing like the Mac's lovely notify(3). One disgusting tech
by ridiculous_fish 7y ago
How do others do publish-subscribe architecture on Linux? There's no multicast IPC primitives, and nothing like the Mac's lovely notify(3).
One disgusting technique is to use a file descriptor's "ready" state as a signal. Wait until the fd is readable, then check the shared memory for new data. Surely there's better.
- woodruffw 7y ago> How do others do publish-subscribe architecture on Linux? One great (read: terrible) hack is to do signal delivery on process groups. I know a multicast AF_UNIX patch for Linux has been floating around for years, but I have no idea if it's ever landed in a mainstream kernel. My go-to for pseudo-multicast on POSIX/Linux is shared memory + semaphores.