Replies: 10 comments 18 replies
-
WAMP does have the concepts of a
It does not have the concept of a "WAMP connection". Such a concept would be a WAMP client library thing, not known to other WAMP peers or router(s) or the WAMP specification itself. Now, assuming you want to have a concept of a "WAMP connection" - in AutobahnJS or any of the other Autobahns What exactly should it mean, represent and how should it act? How should it related to WAMP sessions and WAMP transport instances? I don't know answers that would make sense, in fact, I don't see the need nor the aim of a concept of "WAMP connections". A procedure registered can only exist in the context of a WAMP session. Otherwise there is no Callee to call, and hence what should a "registration" mean? Note that the definition of the types of WAMP procedure arguments of a procedure (in its abstract form) is of course interesting, and Crossbar.io and Autobahn support both "typed WAMP" (via WAMP Flatbuffers) as well as specifying schemata for that -- via respective meta APIs .. |
Beta Was this translation helpful? Give feedback.
-
yeah, gather feedback and comments, exchange ideas/details/views .. would be great=) one thing to make it more concrete / tangible: come up with even a sketchy, incomplete PR! pls don't hesitate, a PR can be grown step by step, but at least it would e.g. to allow to define "some more functions" ... |
Beta Was this translation helpful? Give feedback.
-
so you would like a new interface, but would like to avoid the work;) I mean, coming up with even some code bits which would allow to define and discuss "new interface". not even implement it. sorry, for me it's just a question of sane and constructive approach to discussion of "the" issue. this issue. because I am not convinced there is even one;) I mean in the sense of defining the issue and goal is a necessary prerequisite of implementing a solution to it. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I get it, and I think gathering feedback, starting a conversation is super important. However, natural language has limits, and sooner or later inserting code snippets - such as e.g. w.r.t. interface change proposals - would be important .. because at least me I don't actually understand what is being proposed ..
I don't understand the suggestion
There is no such thing as a "connection" in WAMP, there only is "session" and "transport" |
Beta Was this translation helpful? Give feedback.
-
ahh, right, so your proposal is wrt AutobahnJS - not WAMP or WAMP client libraries in general - and it is about adding new functions to the ? |
Beta Was this translation helpful? Give feedback.
-
Rereading, yeah. Moreover, if we are on the same page, then I would restate your proposal like: Extend AutobahnJS
In my eyes, such a thing would make sense, is sufficiently defined and could be implemented in ABJS. And this holds in general, that is, one may say in general: A WAMP client library should have a way for apps to book future intents of registration/subscription and allow for automatic registration/subscription based on this client-side booking information. |
Beta Was this translation helpful? Give feedback.
-
Some 2nd level design questions: The set of future intents of registrations/subscriptions must be tracked (booked) client-library side, and one natural option to hold such information could indeed be ABJS A different, much more radical design would factor the whole "intent thing" into a "virtual WAMP session state" or "would-be WAMP session" ... thus, a session could have a new state With the latter approach, a call to autobahn-js/packages/autobahn/lib/session.js Line 1347 in c831f35 but would submit and book a future intent transparently a call to we don't want to track intents for future calls or publications, do we? ;) |
Beta Was this translation helpful? Give feedback.
-
IOW: with intent booking, does it even make sense to book an intent rather than just execute in case the session currently is open / active? Can I book without execution (now)? |
Beta Was this translation helpful? Give feedback.
-
I agree with both arguments. My main issue is: if I want to be able to have autobahn-js/packages/autobahn/lib/session.js Line 1396 in c831f35 and if that storing is supposed to be not on the session object, then it still needs to be somewhere reachable from autobahn-js/packages/autobahn/lib/session.js Line 220 in c831f35 long ago that I looked so closely at ABJS impl;) anyways, details, we'll get that sorted! so overall, my gut feeling is, all good & fine, the outline should be a sustainable road to such a new feature .. |
Beta Was this translation helpful? Give feedback.
-
My thinking naturally would be: submitting an intent of registering a procedure should work "the same" as registering a procedure. Thus, calling In such a case an intent will be stored internally. "Somewhere" (tbd). Then, later, either automatically or manually triggered, that list of intents is executed, that is run on an open/active session. |
Beta Was this translation helpful? Give feedback.
-
When working with the autoban-js client (and other clients) one of the major headaches was the management of session in my experience. In particular those parts of the code, that used a session to publish or call would need to be notified in case there was a new session. IMO sessions are an implementation detail from the user space point of view. i.e. I would prefer to have a
WAMPConnection
class, that encapsulates session management. Users would publish / subscribe / call / register on the connection, not on the session.This would also make it much easier to implement functions like autoresubscribe in case a session needed to be swapped for a new one.
Here is a draft version of this to get a look and feel:
A connection can then be consumed by other modules of your app like this:
Nice side effect here is, you can deal out the connection before the actual WAMP connection has been established.
inside of myChat you can then simply call
and you don't need to care if the session momentarily is been set up or has been refreshed.
Beta Was this translation helpful? Give feedback.
All reactions