turnpike icon indicating copy to clipboard operation
turnpike copied to clipboard

Breaking Change - All functions that took a Peer now take a *Session

Open beatgammit opened this issue 9 years ago • 2 comments

  • allows us to generate session-specific ids

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 using NewID() 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.

beatgammit avatar Dec 03 '15 19:12 beatgammit

This is the fix for #85

beatgammit avatar Dec 03 '15 20:12 beatgammit

IMO, it does makes sense to make this API change. I also found this change is needed in order to add smarter external router/broker (i.e. make routing decision based on session data)

The beatgammit:v2 branch has moved forward since this PR was created and now includes a lot of other changes. Could you change this PR to only include the original changes?

mourad avatar May 04 '16 17:05 mourad