Open k4nar opened 10 years ago
I'll try to figure out something generic enough. While we're at implementing native client serialization, let's try to provide an internal interface to messages serialization too. :+1:
Internal, like in Elevator ? I'm not sure to how that could be possible.
Nope sorry I meant "privately throught the Client object, py-elevator side".
Hum, not sure to see what you mean by that.
I'm not sure how we should do this. I did a quick hack (https://github.com/onitu/py-elevator/commit/ee95784a181f0ed982ec19d9ae64433ff23136d2) in order to get it working, but serializing the message twice is not really elegant (and I'm not handling MGet and batches of course, but it wasn't the point).
Now I've something which should be working pretty well (cf #48). I didn't find a way to make the serialization global, so I had to handle it in every function concerned.
If you find a more elegant approach, I'm all ears :) .
Both py-elevator and Elevator are using msgpack. One great thing about msgpack is that it allows fast and safe serialization of standard types. For example :
However, py-elevator complains if we put something else than a string :
I don't see any reason not to handle serialization/deserialization of common types as msgpack is already used.