-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SYSTEST-9250 1-1 WS Mapping for Proxy Mode #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand the nature of the changes here. See one comment about the naming of one of the methods and a few minor comments. If you're sure this all works, I can approve without really understanding fully what you're changing / doing here.
Hey @michaelcfine, I want to give some more background regarding this PR so you can better understand the code changes: Currently, on each new incoming connection to Mock Firebolt in Proxy Mode a WS object is created and assigned to the user. That same WS object is used to create a "messageHandler" for that user. Inside of that message handler, if Proxy Mode is enabled, a message is forwarded to the proxied endpoint. That forwarding is done through a separate WS object. That proxying is currently done through a singleton WS object. Ripple opens several connections to MF. The result is mapping several incoming WS objects to one outgoing WS object. An unintended consequence of this is that when events/replies come in from the proxied endpoint, they are not going to the correct incoming WS object and events are not working properly on a Ripple connection. A solution to the issue mentioned in the above paragraph is to turn the outgoing WS singleton into a 1:1 mapping with each incoming WS object. When an incoming WS requests a message sent to the proxied endpoint, we now: Check a WS:WS map to see if the incoming WS object has an outgoing WS object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 despite not fully understanding the changes / intent here. counting on you / others to fully test.
Create 1-1 WS mapping instead of a singleton WS connection when MF is in proxy mode.