- MUST choose a port that SHOULD be random — SERVICE_PORT
- MUST choose a secret — SECRET_RESPONSE
The server MUST run both workflows in parallel.
- MUST listen on port SERVICE_PORT with a socket of type
router
- Upon requests, MUST reply with a secret response
- MUST use a socket of type
pub
to publish its LOCATION every second on port 6665 - the LOCATION is defined by the last octet of the server IP and SERVICE_PORT and format MUST be "last_ip_octet:SERVICE_PORT"
The client MUST start with the "Discovery workflow"
- for every possible last_ip_octet (1-254) the client SHOULD subscribe to topic
discovery
on port 6665 - Upon received messages from subscriptions, the client SHOULD generate the respective ADDRESS from the last_ip_octet and PORT and use it for the "Connect Workflow"
- SHOULD connect to the ADDRESS with a socket of type
dealer
- MUST send
"Hello from NICKNAME"
where is the name of the sender. - MUST log the reply
- SHOULD return and continue on the "Discovery workflow"