You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking to use these two devices in an application and I believe the current implementations are incorrect.
The ForwarderDevice is part of the PUB-SUB pattern, which means that the front-end should be a SUB socket and the back-end a PUB socket. This is correct as it currently stands. However, when setting up the ForwarderDevice the constructor currently calls Bind() on the front-end socket when I believe it should instead be calling Connect(), since a SUB socket should be reaching out to the publish source (not expecting the publish source to connect to it). Here's what it looks like now:
The StreamerDevice suffers the same issue, but in the other direction. That is, the back-end should instead be calling Connect() instead of Bind().
Is this a bug, or is this my lack of understanding that's causing issues? I can see in very early versions of clrzmq that the ForwarderDevice actually had the correct semantics so I believe that this is a regression.
Thanks.
PS. I'd have already fixed it and submitted a pull request, but the way the tests are set up for the devices is bound heavily to both ends calling Bind(), resulting in threads assuming a certain order of processing. It's a pain in the ass to unravel in such a way that it makes it generic for all tests. A bit of refactoring is needed here.
The text was updated successfully, but these errors were encountered:
I've been looking to use these two devices in an application and I believe the current implementations are incorrect.
The
ForwarderDevice
is part of the PUB-SUB pattern, which means that the front-end should be a SUB socket and the back-end a PUB socket. This is correct as it currently stands. However, when setting up theForwarderDevice
the constructor currently callsBind()
on the front-end socket when I believe it should instead be callingConnect()
, since a SUB socket should be reaching out to the publish source (not expecting the publish source to connect to it). Here's what it looks like now:And this is what I believe it should look like instead:
The
StreamerDevice
suffers the same issue, but in the other direction. That is, the back-end should instead be callingConnect()
instead ofBind()
.Is this a bug, or is this my lack of understanding that's causing issues? I can see in very early versions of clrzmq that the
ForwarderDevice
actually had the correct semantics so I believe that this is a regression.Thanks.
PS. I'd have already fixed it and submitted a pull request, but the way the tests are set up for the devices is bound heavily to both ends calling
Bind()
, resulting in threads assuming a certain order of processing. It's a pain in the ass to unravel in such a way that it makes it generic for all tests. A bit of refactoring is needed here.The text was updated successfully, but these errors were encountered: