Crossbar.io router - dynamically settable realm names in the config?

188 views
Skip to first unread message

Dave Barndt

unread,
Nov 27, 2014, 2:19:50 PM11/27/14
to autob...@googlegroups.com
Hi,

For my IoT device running Crossbar.io, I would like to be able to set the (local device) WAMP realm based on a device parameter (the device's ID/name). Ideally, I would like to only have to specify this parameter in the device config, and not have to duplicate it in the Crossbar.io config.json. However, I don't see a way in the router config management API to do this. I could develop a tool to modify both, but before I go there, I wanted to double-check. I understand changing a realm name on the fly could wreak havoc on any connected clients, but in this case, it would only be done once, at router startup. Maybe if the realm name could be set via some procedure specified in the config.json...?

{
   ...
   "workers": [
      {
         "type": "router",
         ...
         "realms": [
            {
               "name": <some procedure URI?>,
               ...

Thanks,
Dave

Tobias Oberstein

unread,
Nov 28, 2014, 6:13:15 PM11/28/14
to autob...@googlegroups.com
Am 27.11.2014 20:19, schrieb Dave Barndt:
> Hi,
>
> For my IoT device running Crossbar.io, I would like to be able to set
> the (local device) WAMP realm based on a device parameter (the device's
> ID/name). Ideally, I would like to only have to specify this parameter
> in the device config, and not have to duplicate it in the Crossbar.io
> config.json. However, I don't see a way in the router config management

If you have it in the device config, why not generate a Crossbar.io
config from the former, inserting the realm you like? This is simple and
seems to achieve what you want - unless the device name/ID changes
dynamically.

> API to do this. I could develop a tool to modify both, but before I go

The management API is not officially supported at this time. It does
however has a method to dynamically start router realms ..

> there, I wanted to double-check. I understand changing a realm name on
> the fly could wreak havoc on any connected clients, but in this case, it
> would only be done once, at router startup. Maybe if the realm name
> could be set via some procedure specified in the config.json...?
>
> {
> ...
> "workers": [
> {
> "type": "router",
> ...
> "realms": [
> {
> "name": <some procedure URI?>,
> ...

No, that doesn't make sense .. since calling out would again require a
router already. Egg and chicken;)

Cheers,
/Tobias

>
> Thanks,
> Dave
>
> --
> 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>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/c8497a0d-ac77-4772-81fe-c164985052ce%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/c8497a0d-ac77-4772-81fe-c164985052ce%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Dave Barndt

unread,
Nov 30, 2014, 1:51:56 PM11/30/14
to autob...@googlegroups.com
OK, fair enough, and I agree, I'll generate the Crossbar.io config.json (and restart Crossbar.io) if/when the device ID/name ever changes. It shouldn't, but "never say never"...

Thanks,
Dave
Reply all
Reply to author
Forward
0 new messages