-
Notifications
You must be signed in to change notification settings - Fork 87
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
Breaking Change - All functions that took a Peer now take a *Session #108
Open
beatgammit
wants to merge
26
commits into
jcelliott:v2
Choose a base branch
from
beatgammit:v2
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- allows us to generate session-specific ids
This is the fix for #85 |
- fixes a problem when running with AutobahnPython and twisted
- prevent data race; maps aren't safe for concurrent use
IMO, it does makes sense to make this API change. I also found this change is needed in order to add smarter external The |
- fixes problems with multiple subscribers to the same topic
- no guarantee they still work, but this makes it easier to run tests
- single rw lock to make eliminate races, could definitely use some performance tuning/refactoring
- it seems like this was blocking when the socket was already closed, which caused some stability issues over time as goroutines built up
- I noticed a that defaultBroker.Subscribe could block, and the only way that could happen is if the Send function in either Unsubscribe (unlikely) or Publish (very likely) blocked - I think there's still a larger problem with transports blocking on the Send, but this should at least allow messages to go through if that happens
Also added a write timeout.
- fixes memory leak
This should probably be easier to set.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I basically rewrote
dealer.go
on a rereading of the spec. I was getting errors with AutobahnPython saying that the INVOCATION ID was reused (was causing somewhat random crashes). We were usingNewID()
to generate this, which generates the ID randomly, so I switched it to a session-specific, incrementing ID as per the spec. I also simplified some of the internal data structures.Moving the *Session into the Dealer is a breaking change and was needed to generate session-specific identifiers for the fix. We talked about this previously, and we had decided not to do it because there wasn't a reason to complicate matters, but I think this is now necessary to be spec compliant.
If this looks good to you, I can check if our ids are correct elsewhere.