Hi Lasse,
Am 01.07.2014 17:48, schrieb Lasse Vestergaard:
> Hi all.
>
> I'm just starting looking into
crossbar.io, and it looks very promising.
You are welcome!
>
> What I need is the possibility to query the crossbar router for existing
> topics and registered RPC's. It could also be an extension, but I don't
> know how to do that yet.
Once we have this kind of features specified in the WAMP Advanced
Profile, e.g.
https://github.com/tavendo/WAMP/blob/master/spec/advanced.md#subscriber-list
we will implement it in Crossbar.io.
It will be implemented as regular WAMP procedures and events, but built
into the router.
Note: Some bits are already there ... eg the metaevents for sessions.
>
> In my concrete project I need a central unit (could be a crossbar node
> with a running route), and I then need to be able to connect arbitrary
> entities on to that central unit. An entity could be anything from a
> sensor to an application that ex. scrapes a web page for information.
> All-in-all, I just want to be able to have some arbitrary software that
> can hook up to a central place, announce it's presence and provide some
> information about it self.
>
> All this seems to be implemented in WAMP. The only thing that is missing
> is the discoverability. If I have a piece of software that hooks up to
> the system, I can't ask for anything. I don't know which topics that I
> could subscribe to and I don't know which RPC's I could call.
The procedures registered / available for calling from a client: yes.
However, topics are not "registered" in advance. A publisher simply
publishes to a topic, and if it is authorized to do so, it'll succeed.
Subscribers subscribe to topics. So here we can provide a list of
subscribers. But publisher don't pre-register a topic they want to
publish to.
The router does not know in advance to which topics publishers will publish.
>
> An example could be that I have a simple javascript client (a web page),
> where I want to monitor all lamp posts in the system. How do I know if
> there exists any lamp posts in the system? I could start out by just
> asking completely randomly for arbitrary topics, but this would not be
> very smart. Instead I would like to ask the system (crossbar) for a list
> of all connected entities or topics. The same goes for RPC's. What could
Again, for RPC no problem. For PubSub, topics aren't "registered".
Probably the kind of "reflection" you think about is more like
https://github.com/tavendo/WAMP/blob/master/spec/advanced.md#reflection
Caution: Above section isn't properly thought through in any way. I can
see the usefulness, but it needs more design first.
If you want to join that discussion, please comment on
https://github.com/tavendo/WAMP/issues/61
Note: I remember this topic being discussed already .. probably on this
list. I lost oversight. Hence, pls comment on the issue ..
> be really cool is if I could ask for a list of all registered entities
> and then ask the single entity for topics that it is publishing and what
> RPC's it exposes.
Yes. I can see the usefulness. Even more so: would be great to be able
to access some kind of documentation for procedures/topics also.
The latter points to another direction: while the router does not have a
list of "registered topics" in general, we might allow application
components to call special procedures on the router to "self-document" /
reflect themselfes, e.g.
RPC used by an app to define metadata for procs/topics at the router:
wamp.reflection.define({"uri": "com.example.mytopic1", "type": "topic",
"help": "A awesome topic"});
RPC used by an app to retrieve metadata for a specific item:
wamp.reflection.describe("com.example.mytopic1") => {"type": "topic",
"help": "A awesome topic"})
RPC used to list items:
wamp.reflection.list() => [{"uri": "com.example.mytopic1", "type":
"topic", "help": "A awesome topic"}, ...]
Not sure if I lost you .. does above make sense to you?
/Tobias
>
> Regards
>
> Lasse Vestergaard
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
autobahnws+...@googlegroups.com
> <mailto:
autobahnws+...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.