0
votes

Multiple Access Points are in a network. They need to sync client data whenever a client connects to any one of the AP.

I've studied ZeroMQ documentation for REQ/REP, PUB/SUB and PUSH/PULL patterns. Not quite sure which pattern really works for the above requirement between PUSH/PULL and PUB/SUB.

In the documentation, it is mentioned that,

One socket may have many outgoing and many incoming connections.

How to achieve this using one of the above patterns so that the data among APs always in sync.

Points to be considered

  • APs join network arbitrarily.
  • If a client connects to an AP, it's data need to be stored in all APs.
  • ZeroMQs are for C language.
1

1 Answers

0
votes

You could look at the Harmony peer/peer pattern; it's discussed in the ZMQ guide. Access points could then send a client state message to all their peer access points every time a client connects. No single access point would be a "master" - they would be true peers.

Alternatively you could have one of the access points setting itself up as a "master" (a bound PULL socket), to which slave access points connect and send client data through a PUSH socket. The "master" would then send that data back out to the other access points on a PUB socket, with slave access points receiving that on a SUB socket. It's not a very elegant solution, the master has to handle the entire network's client data traffic, but it may be easier to use.