This simple exercise will quickly get you up and started with microServiceBus.com. It will, of course, not cover all the details, but will get you up to speed with the more common tasks of device provisioning, development and management.
All your devices, firmware images and services are all going to belong to an Organization. The is also the level from where you may add friends and co-workers to share you work. In the future, you may want to have multiple organizations, but let’s not get ahead of ourselves.
Begin by creating an account. Click Register in the upper right corner, provide your name, email and password. Accept the license and GDPR stuff and proceed accepting the request sent to your email.
This will take you to the step of creating your Organization. Begin by giving it a name and a description. Next, you should pick your IoT hub of choice. This assumes you already have an IoT Hub. If you don’t, and just want to get a feel for it, select “Option 1 Use microServiceBus.com ©”.
For more information about Organizations: What is an Organization?
A Node is the agent hosted on your physical device, and is responsible for communicating with microServiceBus.com. The Node is also responsible for running your Services, but more on Services in a little bit. -First, we need to create the Node in the portal.
Head over to the Nodes page, Click the “CREATE NEW NODE” button on the top. Give your Node a name and description. Don’t worry about Templates for now, just hit “CREATE”. This takes you back to the Nodes page where your new Node should be visible in the list.
If you set up your organization using your own IoT Hub, you can visit your IoT Hub page and notice it has been created there as well.
Next it's time to install the Node on your device.
For more information about Nodes: What is a Node?
microServiceBus.com comes with support for many different devices, operating systems and platforms. As the purpose of the exercise is merely to get you started, we will not cover them all here. If you have access to a device running Linux or Windows, use that device. Otherwise, you can use your laptop as a device and install the Node there.
First let’s install Node.js. Browse to nodejs.org and select the either the current- or LTS (Long Time Support) version and install it. For more details on how to install Node.js, visit guide on installing Node.js.
Next, install the microservicebus-node package by opening a console or a terminal and type:
Before we can start the Node, we need to give it its identity. In production scenarios, this is usually an automated process of white-listing a series of Nodes beforehand. However, for developing purposes, you can also provision a Node using a verification code. The code is only used the first time the Node signs in, after which it will be provided its identity and security tokens.
At the bottom of the node page, hit the “GENERATE” button and copy the code. Go back to the console or terminal. In the directory where you installed microservicebus-node, type the following:
The Node should now start up and continue the installation process before getting online. This process may take a couple of minutes before it should come online in the portal.
Learn more about the options of installing Nodes: Installing microServiceBus-node
With your Organization created and your Node up and running – it’s time to make it do something fun.
microServiceBus.com, as the name implies, is all about Services. You can easily create and deploy your own Services or use any of the many already existing. In this exercise you’re going to be using a Services reading from a simulated temperature sensor.
Flows are used for composing Services so that they can work together. In this case, you’re going to build a Flow that reads the temperature using one Service and then passing the reading to another Services that sends the reading to your IoT Hub.