Extending protocol messages

37 views
Skip to first unread message

Paolo Iddas

unread,
Jan 2, 2019, 5:20:43 AM1/2/19
to WAMP
Hi,

I'm an Italian developer and I'm really fascinated by the WAMP protocol.
I've noticed that in the latest release of the specification there are some message extensions (14.3.11.3. Extending UNREGISTERED and 14.4.9.3. Extending UNSUBSCRIBED) adding details to this messages.

I think it would be a good idea to extends all other messages (with similar semantic) with the same structure.

The final result could be:

[SUBSCRIBED, SUBSCRIBE.Request|id, Subscription|id]
[SUBSCRIBED, SUBSCRIBE.Request|id, Subscription|id, Details|dict]

[UNSUBSCRIBED, UNSUBSCRIBE.Request|id]
[UNSUBSCRIBED, UNSUBSCRIBE.Request|id, Details|dict]

[REGISTERED, REGISTER.Request|id, Registration|id]
[REGISTERED, REGISTER.Request|id, Registration|id, Details|dict]

[UNREGISTERED, UNREGISTER.Request|id]
[UNREGISTERED, UNREGISTER.Request|id, Details|dict]

[PUBLISHED, PUBLISH.Request|id, Publication|id]
[PUBLISHED, PUBLISH.Request|id, Publication|id, Details|dict]

Adding details to these messages allows for future extensibility (cfr. 6.1. Extensibility) and allows routers to inform clients about the state of the subscription/registration/publication giving more information if needed.

For example routers could inform publishers about how many subscribers are involved in a publication:
[PUBLISHED, PUBLISH.Request|id, Publication|id, Details|dict] -> [17, 239714735, 4429313566, {"subscribers": 3}]

What do you think about this?

Tobias Oberstein

unread,
Jan 7, 2019, 6:38:23 AM1/7/19
to wam...@googlegroups.com, Paolo Iddas

Hi Paolo,

welcome to WAMP - and a happy new year!

yeah, I agree rgd your suggestion.

I think this has been proposed before, and maybe there is even an issue on the WAMP repo - not sure, can't find it right now.

anyways, the current status in the Autobahn(Python) implementation is the following (again, not even sure we have appropriate text for that in the spec right now):


UNSUBSCRIBED, UNREGISTERED: already has Details

(cpy371_1) oberstet@intel-nuci7:~/scm/crossbario/crossbar$ grep "\`\`\[UN" ../autobahn-python/autobahn/wamp/message.py
    Format: ``[UNSUBSCRIBE, Request|id, SUBSCRIBED.Subscription|id]``
    * ``[UNSUBSCRIBED, UNSUBSCRIBE.Request|id]``
    * ``[UNSUBSCRIBED, UNSUBSCRIBE.Request|id, Details|dict]``
    Format: ``[UNREGISTER, Request|id, REGISTERED.Registration|id]``
    * ``[UNREGISTERED, UNREGISTER.Request|id]``
    * ``[UNREGISTERED, UNREGISTER.Request|id, Details|dict]``


SUBSCRIBED, REGISTERED: missing Details currently

(cpy371_1) oberstet@intel-nuci7:~/scm/crossbario/crossbar$ grep "\`\`\[SUBSCRIBED" ../autobahn-python/autobahn/wamp/message.py
    Format: ``[SUBSCRIBED, SUBSCRIBE.Request|id, Subscription|id]``
(cpy371_1) oberstet@intel-nuci7:~/scm/crossbario/crossbar$ grep "\`\`\[REGISTERED" ../autobahn-python/autobahn/wamp/message.py
    Format: ``[REGISTERED, REGISTER.Request|id, Registration|id]``


PUBLISHED: missing Details currently

(cpy371_1) oberstet@intel-nuci7:~/scm/crossbario/crossbar$ grep "\`\`\[PUBLISHED" ../autobahn-python/autobahn/wamp/message.py
    Format: ``[PUBLISHED, PUBLISH.Request|id, Publication|id]``

---

To sum up: if you like, please chime in on the WAMP repo, file an issue, propose the extensions: let's discuss further there to reach consensus among implementors.

Cheers,

/Tobias


Am 02.01.19 um 11:20 schrieb Paolo Iddas:
--
You received this message because you are subscribed to the Google Groups "WAMP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wampws+un...@googlegroups.com.
To post to this group, send email to wam...@googlegroups.com.
Visit this group at https://groups.google.com/group/wampws.
To view this discussion on the web visit https://groups.google.com/d/msgid/wampws/387ea223-171b-47fa-b3dc-a583776679f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages