ClusterLabs / libqb

libqb is a library providing high performance logging, tracing, ipc, and poll.
http://clusterlabs.github.io/libqb/
GNU Lesser General Public License v2.1
166 stars 97 forks source link

[RFE] IPC aliases #395

Closed kgaillot closed 2 weeks ago

kgaillot commented 4 years ago

Low priority, but would be convenient.

Pacemaker has three IPC names for its CIB daemon, "cib_ro", "cib_rw", and "cib_shm". This is largely for legacy reasons, and they could be combined into one. It would be nice to open just one server connection, and have libqb accept the other names as aliases for compatibility with existing clients.

This feature could also be used during a transition period when a project wants to rename an IPC server. Pacemaker could use this too since all its IPC names are the old daemon names (crmd, lrmd, etc.) that aren't otherwise used anymore and could be confusing in logs.

However nothing bad happens if this isn't implemented :)

chrissie-c commented 4 years ago

An interesting idea. And it might not be that hard. The server passes the actual shm names back to the client after connect to the socket. I'll see what I can come up with and post some API ideas.

chrissie-c commented 4 years ago

https://github.com/ClusterLabs/libqb/pull/401

kgaillot commented 2 weeks ago

As discussed on PR, this feature is unnecessary since creating a new IPC server is lightweight. We can just create as many IPC server names as desired using the same callbacks.