Hey guys,
We wanted to give a little more insight on how ZEROMQ is going to be implemented in Sneak.
As we lack the post count, images aren't allowed unless Copper membership is bought, will get that sorted soon.
See below for a brief explanation as this was a question asked by one of our community members LatentDarkening -
https://bitcointalksearch.org/topic/m.31090483MAJORDOMO PATTERN
What does the Majordona Protocol take care of? 1. Presence
2. Heart beating
3. Service-oriented request-reply processing
The goals of MP are to:1. Allow requests to be routed to workers on the basis of abstract service names.
2. Allow both peers to detect disconnection of the other peer, through the use of heartbeating. (asynchronous)
3. Allow the broker to implement a "least recently used" pattern for task distribution to workers for a given service.
4. Allow the broker to recover from dead or disconnected workers by re-sending requests to other workers.
CLIENT
CLIENT
CLIENT
ROUTER (BROKER)
LOAD BALANCER
ROUTER (BROKER)
WORKER
WORKER
WORKER
Whats is the above describing? 1. Clients connect to the router / broker
2. Workers connect to the router / broker
3. Clients and workers do not see each other
4. Both can come and go arbitrarily
We define 'client' applications as those issuing requests, and 'worker' applications as those processing them. MDP makes these assumptions:
1. Workers are idempotent, i.e. it is safe to execute the same request more than once.
2. Workers will handle at most one request a time, and will issue exactly one reply for each successful request.
Brokers Role: The broker SHOULD serve clients on a fair basis and MAY deliver requests to workers on any basis, including round robin and least-recently used.
1. Share request queues, one per service
2. There will always be multiple brokers in case of other broker point of failure (we can introduce as many brokers as we want and develop a failover scheme). Although, by doing this, it means that there are a lot more things to consider which makes this more complex and eventually more things to break. -
The above can be referenced here
https://rfc.zeromq.org/spec:7/MDP/, we've included the most important bits so its easier to digest the initial setup of the architecture.
Let us know if you have any questions.
Regards,
Sneak