Dynamically configuring embedded WAMP Clients



Today I have been learning a lot about WAMP and I have to say that I am really impressed about it’s coding quality. To everyone that was involved: Thumbs up!

To use it in my project however I still have some questions. I hope I am not getting on someones nerves since this is my third post within the last 24 hours!? Sorry in advance if this might be the case!

Now back to some things which are still unclear for me. First of all consider the following (more fictional) situation:

My company is manufacturing machines that are used by customers in their factories where they help to produce their products. We want to offer a service for our customers which allows them to monitor the status or switch units on or off online via web or smartphone, tablet.

First of all this scenario requires addressing those machines after they have been shipped to the customer. And since we are not producing them on demand there is no chance to pre-configure them individually for each customer. Addressing however would look like: "customer-id/machine-id/xxx" whereas “xxx” stands for a published or subscribed state. In terms of WAMP, I imagine this addressing to look like: ***“com.mycompany.customer-id.machine-id.xxx”***.

So basically my question is how can Autobahn / WAMP assist me in configuring devices that are not (or partially) configured at the time they are being delivered to the customer? I am looking especially for a way to dynamically set the topic the client subscribes / publishes to (or remote procedure calls). In my first concept - where I was thinking of using WebSockets and my own application protocol implementation I thought of the following:

  • Our customer registers himself to our platform and adds a new machine(-type) to his factory.
  • The platform generates an “authentication token” for this machine-type which will be set to the machine as well as user data / password.
  • When the machine first connects to our platform it transmits this data.
  • Using Authentication-Token the platform can identify which machine-type wants to register itself and stores it into the database and generate a unique device-token.
  • This device-token will be transmitted back to the machine, stored and used every time the machine connects to the platform.

With using WAMP it would be necessary to generate topic-strings and return it to the machine after it has connected to the platform for the first time.

Ok. I hope I was able to describe what I am after. Basically it’s about configuring out-of-the-box clients and set topics when the client first connects to the router so that they match following pattern:


A bit help here or just a small advice would be greatly appreciated.

Also there is something else that is on my mind. In the documentation I read the following about the autobahn.asyncio.wamp.ApplicationRunner:

This class is a convenience tool mainly for development and quick hosting of WAMP application components. It can host a WAMP application component in a WAMP-over-WebSocket client connecting to a WAMP router.

To be honest this sounds a bit like using it for development only. Not for production where it is better to attach the application component via config-file of the router!? In my approach, delivering non-configured clients which (written in python) will run on an embedded system requires this method. I have tried to find something about this in the documentation as well as in the examples but couldn’t find more detail on this. If - for whatever reason - it would not be a good thing to start application components using this Runner, well then I really can’t figure out how to run WAMP Application components which will run on an embedded system.

Thanks in advance,