Home Audience Developers Developing Real-Time Notification and Monitoring Apps in IBM Bluemix

Developing Real-Time Notification and Monitoring Apps in IBM Bluemix


IBM Bluemix is a cloud PaaS that supports numerous programming languages and services. It can be used to build, run, deploy and manage applications on the cloud. This article guides the reader in building a weather app as well as an app to remotely monitor vehicle drivers.

Cloud computing is one of the emerging research technologies today. With the wide use of sensor and wireless based technologies, the cloud has expanded to the Cloud of Things (CoT), which is the merger of cloud computing and the Internet of Things (IoT). These technologies provide for the transmission and processing of huge amounts of information on different channels with different protocols. This integration of technologies is generating volumes of data, which then has to be disseminated for effective decision making in multiple domains like business analytics, weather forecasting, location maps, etc.

A number of cloud service providers deliver cloud based services and application programming interfaces (APIs) to users and developers. Cloud computing has different paradigms and delivery models including IaaS, PaaS, SaaS, Communication as a Service (CaaS) and many others. A cloud computing environment that uses a mix of cloud services is known as the hybrid cloud. There are many hybrid clouds, which differ on the basis of the types of services and features in their cloud environment.

The prominent cloud service providers include IBM Bluemix, Amazon Web Service (AWS), Red Hat OpenShift, Google Cloud Platform, etc.

Figure 1: Login panel for IBM Bluemix
Figure 2: Creating an IoT app in IBM Bluemix

IBM Bluemix and cloud services

IBM Bluemix is a powerful, multi-featured, hybrid cloud environment that delivers assorted cloud services, APIs and development tools without any complexities. In general, IBM Bluemix is used as a Platform as a Service (PaaS), as it has many programming platforms for almost all applications. It provides programming platforms for PHP, Java, Go, Ruby, Node.js, ASP.NET, Tomcat, Swift, Ruby Sinatra, Python, Scala, SQL databases, NoSQL platforms, and many others. Function as a Service (FaaS) is also integrated in IBM Bluemix along with serverless computing, leading to a higher degree of performance and accuracy. IBM Bluemix’s services began in 2014 and gained popularity within three years.

Creating real-time monitoring apps in IBM Bluemix

IBM Bluemix presents high performance cloud services with the integration of the Internet of Things (IoT) so that real-time applications can be developed for corporate as well as personal use. Different types of applications can be programmed for remote monitoring by using IBM and third party services. In the following scenarios, the implementation aspects of weather monitoring and vehicle driver behaviour analysis are covered.

Figure 3: Selecting Weather Services in IBM Bluemix
Figure 4: Dashboard of IBM Bluemix with the weather notification app

Creating a weather notification app

A weather notification app can be easily created with IBM Bluemix so that real-time messages to the client can be delivered effectively. It can be used for real-life scenarios during trips and other purposes. Those planning to travel to a particular place can get real-time weather notifications. The remote analytics of the weather, including temperature, humidity and other parameters can be received by travellers, and they can take the appropriate precautions.

First, a new IBM ID needs to be created on https://console.bluemix.net/. IBM Bluemix provides users a 30-day trial, without need for credit card authentication. Most other cloud services ask for international credit card authentication. Users of IBM Bluemix, on the other hand, can create, program and use the services with just a unique e-mail ID.

After creating an account and logging in to the Bluemix panel, there are many cloud based services which can be programmed for real-time use. IBM Bluemix is a hybrid cloud that delivers many types of cloud applications including infrastructure, containers, VMWare, network management, storage, the Internet of Things, data analytics, high performance computation, mobile applications and Web apps.

To create a weather notification app, just search the IBM Bluemix catalogue for the Boilerplates based Internet of Things.

The name of the new cloud app can be mentioned. The other values and parameters can be set as default, as we are working on a free trial account. Once the Cloud Foundry is created, the next step is to connect this app with the Weather Services in IBM Bluemix. Search for Weather Company Data and IBM Bluemix will display the appropriate option. Using Weather Company Data, live temperature and weather parameters can be fetched effectively.

The newly created app will be visible in the dashboard of IBM Bluemix and, automatically, a Cloudant database will be created here. This database will be used to store and process the data in JSON format. IBM Cloudant is a cloud based database product of the non-relational distributed variety.

Using the Node-RED editor, the overall flow of the process can be programmed and visualised for any type of service and process. Node-RED is a flow based integrated development tool created by IBM so that objects and their connections can be set up without complex programming. Once the connections are created with the IoT app and weather service, the different channels including input, weather services, and transformation of temperature format can be set in Node-RED. After the successful deployment and launch of the service, the output will be visible in the user panel. The conditions related to different categories of weather (cloudy, sunny, rainy, humid, etc) can be specified using the Node-RED editor.

Figure 5: Message display panel
Figure 6: Message display panel
Figure 7: Creating a context mapping app for driver behaviour analysis

Creating an app for vehicles and to remotely monitor drivers

By using another IoT application, the multi-dimensional behaviour of vehicle drivers can be analysed remotely using IBM Bluemix on the Watson IoT platform.

The following behavioural aspects of car drivers can be monitored remotely:

  • Speed
  • Braking attitude
  • Sharp use of brakes
  • Smooth or harsh accelerations
  • Sharp turns
  • Frequent U-turns

You will first need to visit the IoT Context Mapping Service in the IBM Bluemix console.

The following credentials and authentication fields will be displayed after creating the service:

  • Tenant ID
  • User name
  • Password

It should be noted that we have to select the free plan in every panel to avoid the charges of cloud services provided by IBM Bluemix.

After getting the tenant information and authentication tokens, the next step is to create remote devices with information about their unique identities. Every sensor based device has a unique ID, which is set in the IBM Watson IoT platform so that live monitoring from remote places can be done. The Watson platform provides options to enter different devices with the help of ‘vehicles’ and gateways. By using this approach, real-time signals are transmitted to satellites and then to the end user for taking further action and decisions.

After setting all the parameters with respect to devices and gateways, click on Deploy and wait for the ‘successfully deployed’ notification.

Figure 8: Selecting the driver behaviour service in IoT
Figure 9: Credentials and tenant information
Figure 10: Creating remote devices with the related information

Twilio for live messaging

If there is a need for live messaging to a mobile phone, Twilio can be used. Using the Twilio APIs, messages can be delivered to smartphones and other points. Twilio provides APIs and authentication tokens, which can also be mapped in IBM Bluemix for live monitoring of weather or other IoT based applications.



Please enter your comment!
Please enter your name here