European-XFEL / karabo-bridge-py

Tools to allow data exchange with Karabo, in particular streaming of data
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Protocol version 2.2 #23

Closed tmichela closed 6 years ago

tmichela commented 6 years ago

This make the client ready to get data from server using the protocol 2.2,

In future (when info request is implemented) we can receive the version directly from the server and act accordingly, the version information will then be removed from user interface.

takluyver commented 6 years ago

I'd like to separate the protocol it talks from the structure of the dict returned. It should already be possible to automatically detect the new version of the protocol (if 'metadata' in header:).

So the parameter would be something like separate_metadata to return the metadata separately rather than in the metadata dict. It can do this independently of the protocol used (although it might be missing a metadata key in the dict with older protocols - that's a bug of the protocol).

tmichela commented 6 years ago

hum. I agree with you. But at the same time, I do not like having some shuffling of metadata, and the various cases makes it complex. Especially knowing (hopping :sweat_smile: ) that older version of the protocol will disappear fast enough. What about sending both dictionary in any case? in case of older version the metadata will still be in the data dict, we just have to ignore the meta dict?

takluyver commented 6 years ago

LGTM if you want to correct the docstring and resolve the conflicts.

tmichela commented 6 years ago

Thanks for the review!