New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefix Maps #8
Comments
Probably we should make it simpler, instead of more complex:
|
If CURIEs are only used on peer side (client javascript?), what advantage is there defining a CURIE instead of just using a variable, if it's not going to be sent on the wire? Would it make sense to remove Prefix/CURIEs all together? |
Good point. I guess it would mostly be a matter of taste. There are multiple ways to make URI handling convenient - client side. I really think this issue boils down to 2 sane options:
The first one is straight forward. The second one raises the question on how that agreement happens. |
I like simple. :) |
Yeah, me too. The concept of CURIEs seems somehow elegant, but the nitty gritty details in particular in the context of distributed PubSub (not so much RPC) are tricky. I count that as 2 votes (you, me) to kick CURIEs from the wire protocol. The Q of JS interface / URI convenience whatever is orthogonal .. can be done in AutobahnJS .. if at all. |
|
👍 |
You guys are just removing a nifty feature of WAMP, making it appear lousier than STOMP over websocket. |
STOMP does not seem to provide builtin RPC features. The PREFIX message of WAMPv1 effectively only provides some adhoc, poor-man's compression. Using WebSocket compression, there seems to be no justification for PREFIX anymore. |
WAMPv2 has deprecated CURIEs altogether. |
Prefix Maps (CURIEs) serve two purposes:
URIs can occur in:
WAMP itself:
WAMP payloads:
Limitations
Currently, a Prefix for some URI set can only be
Problems
When client 1 publishes an event containing CURIEs in the event payload, how does a client 2 know how to resolved those CURIEs when it doesn't have the prefix map of client 1?
Even if the server knew the payload structure of the published event and the prefix map of client 1, it needed to "reshrink" the URIs for each subscriber using that subscriber's respective prefix map.
That would make message dispatching to large numbers of subscribers grossly inefficient.
I really can see only 2 ways out of this dilemma:
The latter could be a little more relaxed: a publisher may use (his own) prefix map, the server - knowing the publisher's prefix map - could reshrink the URIs contained, and dispatch with fully qualified URIs.
However, even then, the server needs to know the event payload structure to be able to identify the "strings" that really are URIs, and potentially need reshrinking.
We should make 3 conditions mandatory with this design question:
Make Prefixes Peer-only
If we dropped the "reduce wire payload" requirement and made URIs on the wire always fully qualified (that is forbid CURIEs on wire), then things are much easier ..
There is a proposed WebSocket extension doing frame-based compression. But: either that is only able to compress within 1 frame, not maintaining compression state across frames, or it would maintain such state, but then the server could not prepare a compresses octet sequence once and send that out on multiple connections.
Incoming/Outgoing Prefix Maps
We should make that clean and symmetric.
Each peer (client and server) has 2 prefix maps for a session:
From the server-side:
From the client-side:
The text was updated successfully, but these errors were encountered: