Skip to content
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

Simplify TCP/IPC wire protocol #29339

Merged
merged 2 commits into from Dec 3, 2015
Merged

Conversation

jacksontj
Copy link
Contributor

As I was working on another project, I ran into some other project doing exactly this. Our current wire protocol is effectively "len-of-thing thing", but msgpack already includes headers in the serialization--making it an iterably consumable format. This means we don't need to use/waste bytes on the wire for the len of the string (esp. since its currently a string serialization of how many bytes).

This change simplifies the wire protocol, but still maintains flexibility for changes later-- since we are effectively just msgpacking dicts across the wire.

Note: this is a backwards incompatible wire protocol change. This is only being done as TCP is considered "experimental". This will be the last and only change to the wire protocol in a backwards incompatible fashion-- as we are working towards first-class support for the next release.

As I was working on another project, I ran into some other project doing exactly this. Our current wire protocol is effectively "len-of-thing thing", but msgpack already includes headers in the serialization--making it an iterably consumable format. This means we don't need to use/waste bytes on the wire for the len of the string (esp. since its currently a string serialization of how many bytes).

This change simplifies the wire protocol, but still maintains flexibility for changes later-- since we are effectively just msgpacking dicts across the wire.

Note: this is a backwards incompatible wire protocol change. This is only being done as TCP is considered "experimental". This will be the last and only change to the wire protocol in a backwards incompatible fashion-- as we are working towards first-class support for the next release.
@jacksontj
Copy link
Contributor Author

I'm also considering wrapping the unpacker so we can contain all the msgpack in frame.py -- it'll make changes in the future easier.

@jfindlay jfindlay added Core relates to code central or existential to Salt Expert Review Needed Transport labels Dec 2, 2015
@cachedout
Copy link
Contributor

Very clean. This looks great to me.

@jacobhammons You'll want to keep an eye on this. Even though our current TCP implementation is considered experimental, you'll want to heavily document that with the release of Boron that the wire protocol has changed and will not be backward compatible with prior releases.

@cachedout
Copy link
Contributor

@jacksontj Please let me know if you want to wrap the unpacker in this PR or a forthcoming one. I'm fine either way.

@jacksontj
Copy link
Contributor Author

@cachedout after thinking about it some more I think I'll hold off on the msgpack cleanup. Tests are passing, so this should be ready for merge.

Also, do we have any more outstanding TCP issues? IIRC the 3 outstanding ones from the 2015.8 release are all closed now? And were we able to get the tcp tests running in jenkins again?

@cachedout
Copy link
Contributor

@jacksontj I believe there is an open issue for the TCP transport on FreeBSD, but that's the only one that comes to mind. I'll get this in today. I put TCP tests back online for Jenkins a while ago and they are currently passing on the 2015.8 branch. We need to get some going for develop as well. I'll ask QA to get started on that today.

cachedout pushed a commit that referenced this pull request Dec 3, 2015
Simplify TCP/IPC wire protocol
@cachedout cachedout merged commit 7afd522 into saltstack:develop Dec 3, 2015
@jacksontj
Copy link
Contributor Author

Awesome! Looking forward to getting this finished up :)

On Thu, Dec 3, 2015 at 8:59 AM, Mike Place notifications@github.com wrote:

Merged #29339 #29339.


Reply to this email directly or view it on GitHub
#29339 (comment).

@adelcast
Copy link
Contributor

adelcast commented Dec 4, 2015

is this change going to be ported to the salt/2015.8 branch?

@cachedout
Copy link
Contributor

@adelcast I am not very inclined to. This is a backward incompatabile wire-protocol change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Release-Notes Transport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants