Replies: 4 comments 7 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
Had a call with @gxuu, here is our updated table:
In addition, there is one place in Scaler where a |
Beta Was this translation helpful? Give feedback.
-
|
The above definitions posted by @rafa-be are now implemented in the latest commit of PR #149. The behavior follows:
|
Beta Was this translation helpful? Give feedback.
-
Harder to implement; Also in the use case it is used for monitors. When you monitor you would like to see real time data instead of data from the back. So it doesn't make too much sense to guarantee delivery with that.
First two blocks (in the sense that they never call the user provided callback). Last two drops (in the sense that they call user provided callback immediately). The first two types always queued the message, as there's no mute/onmute notion in YMQ.
Don't do this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
TLDR: See the bottom.
This post purposes the definition of
IOSocketTypethat's being used byYMQ. There will be the following types:ROUTERDEALERUNICASTMULTICAST1). This type requires the user to pass in the remote
IOSocketIdentitywhensend/recvmessages. That is, user passed in argument forIOSocket::sendMessage(message, callback)will havemessage->addresscontains a non null pointer; there will also be a new API overloadingIOSocket::recvMessage(Bytes address, callback), whereaddressspecify the remoteIOSocketIdentityand contains a non null pointer.2). This type requires the user to pass in the remote
IOSocketIdentitywhensendmessages; It will also ignore the user passed in remoteIOSocketIdentitywhenrecvmessages. Note that this is generally what the current implementation does.3). This type ignores the user passed in remote
IOSocketIdentityif presents whensend/recvmessages. It is assumed that there is only 0-1 established connection at any given point of execution. When there is 1 established connection it is assumed that user wants tosend/recvto that connection. When the user callIOSocket::sendMessageorIOSocket::recvMessageand NO established connection is found, then the message is DROPPED, with no guarantee of message delivery.4). This type requires the user to passed in remote
IOSocketIdnetitywhensendmessages. The core will perform a prefix match to all the established connections' identities in the system. The message will be sent to all the connections that are matched. Messages passed in will be completed immediately, with no guarantee of message delivery.Rationale:
ROUTERandDEALERare meant to be used withworkerandclientinscaler, where we do need guaranteed message delivery.UNICASTandMULTICASTare meant to be used withconnectorMonitorinscaler, where we allow messages to be dropped.MULTICASTwith empty identity passed in will match every established connections in the system, therefore achieving thePUBinZMQ,MULTICASTcan also be used to achieve topic filtering.Here's a table that presents characteristics users might care about:
sendMessagecompletessendMessagecompletessendMessagesendMessage@sharpener6 @magniloquency Please review and see if it fits the use case.
Beta Was this translation helpful? Give feedback.
All reactions