Comments (5)
At least with WebSocket as transport, the WAMP protocol version spoken is still accessible before even receiving any WAMP level message.
This is because v1 and v2 use different WebSocket subprotocol identifiers: wamp
for WAMP v1, and wamp.2.json
(...) for WAMP v2.
A client that supports both WAMP versions can connect to a server request WebSocket subprotocols ["wamp.2.json", "wamp"]
.
If the server only speaks WAMP v1, it'll answer chosing wamp
as subprotocol. If the server speaks WAMP v2, it'll answer chosing wamp.2.json
.
The client can access the negotiated WebSocket subprotocol right after the WebSocket connection has been established, and before even the first message is received.
from wamp-proto.
Ok. That makes sense.
But there's no analog for other transports. What will happen if the session initialization handshake changes in a future WAMP version? Would this be a case where the HELLO message would send what protocols it supports in the options argument? It seems like it would be useful to know what version of the protocol the server is expecting before the session initialization handshake (or at least part of it).
from wamp-proto.
Correct. The use of WebSocket subprotocols to signal protocol version only works with WebSocket transports. However, WAMPv1 never supported anything else.
With WAMPv2, the HELLO
and WELCOME
messages (deliberately) do not include protocol "version", but the actual feature set supported. The use of role & feature announcement instead of protocol versioning is deliberate ..
I have added text to the spec trying to clarify above hopefully:
https://github.com/tavendo/WAMP/blob/master/spec/basic.md#supporting-wamp-v1-and-v2
https://github.com/tavendo/WAMP/blob/master/spec/basic.md#client-role-and-feature-announcement
https://github.com/tavendo/WAMP/blob/master/spec/basic.md#router-role-and-feature-announcement
from wamp-proto.
If you still think "protocol version" is necessary / better than "feature announcement", please reopen ..
from wamp-proto.
The major version is still useful and orthogonal to "feature announcement". If, for example, "feature announcement" changes in v3, the major protocol version can indicate this, and a single library can handle multiple protocol versions.
I'm thinking the handshake should look like this:
- client/server transport initialization
- client/server agree on serialization format
- server announces major protocol version(s)
- client sends HELLO to begin session
This is part of the WebSocket spec, but not part of other transports. I'm not sure if this should be part of the WAMP messaging protocol or just a requirement for transports, but I think this information needs to be established between client and server, especially with the pluggable nature of WAMP.
This may not be a big deal for v1 compat (since WebSockets were the only transport available), but I think something should be decided to make it easier going forward. If WAMP becomes common-place, it would be nice to upgrade routers without having to rewrite every endpoint connecting to them.
from wamp-proto.
Related Issues (20)
- Add acknowledge option to CALL message? HOT 17
- How to serialize datetime type? HOT 17
- Web site: Add stuff to "Users and Resources" section HOT 10
- Best practice for error answer? HOT 1
- Unspecified Behavior for Callee Leaving During CALL HOT 19
- Unclear behavior for caller leaving during CALL request HOT 7
- Propagation of frozen options in progressive call invocations HOT 6
- Error URI for expired progressive call race condition HOT 3
- Is `wamp.close.goodbye_and_out` deprecated in favor of `wamp.close.normal`? HOT 5
- `wamp.error.no_such_session` is not documented HOT 1
- `wamp.registration.match` matching algorithm is undefined HOT 3
- Should subscriptions to meta events fire the `wamp.subscription.on_subscribe` event? HOT 1
- Tolerating old CALL request IDs when progressive invocations are supported HOT 4
- Add Payload to Abort HOT 28
- Add `REGISTER.Options.forward_timeout` option HOT 2
- Broken Applet on wamp-proto.org
- Equivalent of 500 Internal Server Error in WAMP HOT 5
- Incorrect maximum raw socket limit HOT 1
- Error URI for Rate Limiting Purposes HOT 25
- Add AsyncAPI to comparison on web site
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wamp-proto.