So as we discussed elsewhere ... past proof-of-concept, our internal protocol needs a bit better framing in order to handle the modularity stuff and be extensible.
* Use only one Websocket for efficiency * Connect out to multiple DBus services (not just cockpitd) * Support multiple payload types in future (not only dbus-json) * Alternate credentials (ie: initial setup)
Here's a first whack at documenting what it might look like:
https://github.com/stefwalter/cockpit/blob/protocol-refactor/doc/protocol.md
I'm working on some cleanup patches to dbus-server, and building some testing around it before getting into implementing this.
Stef
On 02/13/2014 03:26 PM, Stef Walter wrote:
So as we discussed elsewhere ... past proof-of-concept, our internal protocol needs a bit better framing in order to handle the modularity stuff and be extensible.
- Use only one Websocket for efficiency
- Connect out to multiple DBus services (not just cockpitd)
- Support multiple payload types in future (not only dbus-json)
- Alternate credentials (ie: initial setup)
Here's a first whack at documenting what it might look like:
https://github.com/stefwalter/cockpit/blob/protocol-refactor/doc/protocol.md
The protocol looks usable, I would only add also 'protocol version' field, this can save a lot of headache when you consider moving from json to something else.
Out of curiosity, are there any alternative already defined/used protocols?
Jan
Jan Safranek jsafrane@redhat.com writes:
The protocol looks usable, I would only add also 'protocol version' field, this can save a lot of headache when you consider moving from json to something else.
I think we can include that in the "protocol" string, if necessary.
On 17.02.2014 09:02, Marius Vollmer wrote:
Jan Safranek jsafrane@redhat.com writes:
The protocol looks usable, I would only add also 'protocol version' field, this can save a lot of headache when you consider moving from json to something else.
I think we can include that in the "protocol" string, if necessary.
Yes. Did that. Although it's now called "payload" to make it clearer what it's about.
Updated documentation here:
https://github.com/stefwalter/cockpit/blob/protocol-refactor/doc/protocol.md
Merge request here for initial work on this:
https://github.com/cockpit-project/cockpit/pull/230
Out of curiosity, are there any alternative already defined/used protocols?
This is really about framing and control commands, over a text based transport (ie: old WebSockets). It ends up being pretty Cockpit specific. Nothing else comes to mind that would fit well here.
Stef
Stef Walter stefw@redhat.com writes:
Here's a first whack at documenting what it might look like:
https://github.com/stefwalter/cockpit/blob/protocol-refactor/doc/protocol.md
Nice!
cockpit-devel@lists.fedorahosted.org