Realms or URI for 10k+ devices

22 views
Skip to first unread message

Ben S

unread,
Jan 8, 2019, 11:46:37 AM1/8/19
to Crossbar
Hi,

We are planning on using crossbar for our application. We will have 10k+ devices which will register 5-10 procedures all being the same.  There will also be a couple pub/sub per device.

Is it better to register them with 

Different URI e.g. org.device-id.my-rpc-call
or 
A separate realm per device with the same URI?

Thanks,

Ben

Tobias Oberstein

unread,
Jan 8, 2019, 12:40:01 PM1/8/19
to cross...@googlegroups.com, Ben S

Hi Ben,

technically, the overhead of an additional realms (on the same router worker) is quite small. couple of python objects.

performance wise I wouldnt expect much difference either because: there is an internal URI map _per realm_ - however, this is a O(log(n)) data structure (couple of prefix-trees https://en.wikipedia.org/wiki/Radix_tree) where n is the number of URIs in the realms (of procs or topics)

that being said, we have yet _tested_ scaling to this number of realms. we do want to support such numbers of realms definitely.

anyways. in your scenario (and without knowing more about the scenario&app) I'd go with URIs:

com.example.myapp.<device ID>.myprocedure

and device ID just some integer or UUID or whatever.

you will then rely on authorization rules to split up access among the devices / users

---

what about users? I mean, are all 10k+ devices owned by a couple of different (or even just one) user, or is each dedicated to a specific user?

if the former, then realms allows you to have authentication on the respective realm as a first perimeter of defense - and then additionally authorization rules within the realm (after authentication).

hope above gives some clues,

Cheers,

/Tobias


Am 08.01.19 um 17:46 schrieb Ben S:
--
You received this message because you are subscribed to the Google Groups "Crossbar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/667c9755-7877-4698-a5e5-bd60b256a150%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages