Hacker News new | past | comments | ask | show | jobs | submit login

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.




> 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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: