Skip to content

YEP 100 Implementation msgpack instead of json for over the wire serialization

Kyle Sunden requested to merge msgpack into master

See also associated changes in the client code at yaqc-python!7 (merged)

This is a very sloppy proof of concept, naively replacing the import (not even changing the name in the body of the text)

I did not do too extensive of testing as yet.

I did remove one error code, as it relied on an Exception not provided by msgpack (for good reason)

This does also not consider the case where multiple requests come in in the same read (what the gen_objects function did). That could be added back (And may for all I know be something msgpack the library does natively) EDIT: literally just a generator away: https://github.com/msgpack/msgpack-python#streaming-unpacking

Note, there are some attempts at actually making an rpc format that starts with messagepack. This does not, it is litterally JSONRPC, including the jsonrpc version identifier, just not transmitted in json

If we do decide to go forward with replacing JSONRPC with messagepack in some form or another, that would supercede the need to do any kind of Base64 encoding as in !31 (closed) (though communicating shape and type information may still be needed/more flexible than using only the builtin types on msgpack)

NOTE: this does not at this time implement YEP-110 (ndarray msgpack extension)

Edited by Kyle Sunden

Merge request reports