How BMW Car IT used Red Hat and MQTT as part of an in-car IoT project

BMW Car IT's Jonas Sticha and Christian Hoff explain how they developed a proof-of-concept in-car app using Red Hat, Kubernetes and MQTT

Innovation is accelerating across the automobile industry, bringing advances to the in-vehicle experience. Connected vehicle technologies are opening up new business models and providing a whole range of new software and data-driven services.

When it comes to new software and data-driven services, the possibilities are immense. But there is one trend many use cases have in common: they are becoming more distributed. To provide a great user experience, connected in-vehicle services often need to integrate with an increasingly diverse range of data.

Connected services at BMW Group

At BMW Group, we are leveraging connected vehicle technologies to offer drivers more advanced connected services, from on-street parking to remote traffic information and more besides. However, the shift toward electric and autonomous vehicles will demand even more elaborate services.

Electric vehicles, for example, will need to keep drivers not only informed about the status of their car's battery, but also where and how far away charging points are.

AI & Machine Learning Live is returning to London on 3rd July 2019. Hear from the Met Office's Charles Ewen, AutoTrader lead data scientist Dr David Hoyle and the BBC's Noriko Matsuoka, among many others. Attendance is free to qualifying IT leaders and senior IT pros, but places are limited, so reserve yours now.

In addition to directions, satellite navigation routes will also need to include details of recharging stops, such as whether the charging station is currently occupied, whether it can be reserved, the current costs, and billing details. All these require the integration of different data and services.

As new technologies emerge, it is crucial to get an early understanding of the new technology itself to make use of it in vehicles. Software engineers in our research department investigate them in depth, exploring their potential for future BMW Group services.

Connecting to IoT-cloud environments

We recognised very strong trends towards connected services distributed among vehicle and cloud environments, as well as new technologies leveraging the Internet of Things (IoT) and a move from private to public or hybrid cloud scenarios.

We had to explore how backend systems deployed on new serverless architectures would integrate with diverse data sources and service providers

So, we decided to investigate. We wanted to explore what is needed to be able to connect to IoT cloud environments.

To be more precise, we had to explore how backend systems deployed on new serverless architectures would integrate with diverse data sources and service providers, on one side, and connect with BMW vehicles using the lightweight MQ Telemetry Transport (MQTT) messaging protocol on the other.

Our goal was to carry out a technical assessment to understand the backend broker infrastructure and implications on the vehicle communication stack. Specifically, how to connect BMW vehicles with the new IoT tech and how to leverage new cloud technology.

We came up with an idea for a theoretical use-case of a ‘Point of Interest (POI) poll system', a proof of concept that would also enable us to explore the technology and create something test users could experience.

Cloud & Infrastructure Live 2019 returns to London on 19th September 2019. Learn about the latest technologies in cloud, how to keep one step ahead of the regulators, and network with an audience of IT leaders and senior IT pros. The event will include keynotes, panel discussions, case studies, and strategic and technical streams. Best of all, the event is FREE to qualifying attendees. Secure your place now.

The connected services use case we imagined went like this: a group of friends travelling in convoy decide to take a break; they elect where to stop by using a real-time poll-in-vehicle app to vote on possibilities offered by a backend system; after agreeing where to stop, they all receive directions to the favoured destination.

Alongside providing an application user interface in the vehicle, our proof of concept would need to connect the vehicle to the IoT cloud. Backend services would use adapters to integrate with data sources, such as a mapping API that we could ask for details of places of interest, particularly restaurants or fuel stations.

A straightforward implementation

The cost and deployment flexibility advantages of open source led us to evaluate various open source cloud platforms for our project. Also, with open source we could inspect the code to gain a deeper understanding of the technology. We compared products' features, technical readiness and the ecosystem around them. Besides open source platforms, we also investigated commercial offerings and considered them in our comparison.

Incoming messages trigger OpenWhisk Actions, which implement the backend application logic

After evaluating different serverless frameworks, we selected OpenWhisk as it was advanced - especially the active ecosystem that has support from many developers alongside companies, such as Red Hat. We then chose Red Hat's OpenShift cloud computing Kubernetes application platform solution as a basis for deploying the EnMasse messaging services, as well as the OpenWhisk serverless framework.

One of the reasons for choosing OpenShift was its smart integrated and easy to use web user interface. It would also give us the opportunity to share ideas with developers and solution architects from Red Hat, so that we could be collaborative in our approach.

Building the solution was straightforward. Vehicles connect to the EnMasse messaging service using the MQTT protocol. Incoming messages trigger OpenWhisk Actions, which implement the backend application logic. But before we could implement our proof of concept, we had to figure out how to connect our vehicles with the MQTT service and how to connect the MQTT service to the serverless backend architecture.

Computing and CRN have united to present the Women in Tech Festival UK 2019, on 17 September in London.

Whether you're the ‘Next Generation', an ‘Inspirational Leader', or an ‘Innovator of Tech' this event will offer inspiration on not only how to improve yourself, but how to help others too. The event is FREE for qualifying IT pros, but places will go fast

Our vehicles speak MQTT and use the joynr open-source framework for communication with backend systems: EnMasse provides messaging-as-a-service via an MQTT gateway to the AMQP message broker in the cloud environment in this instance. Joynr would enable us to quite easily implement any adaptations needed to connect to the EnMasse MQTT gateway running on OpenShift.

On the vehicle side, we realised we would need to be tolerant regarding supported MQTT features to make it easier for us to connect to different cloud providers. We needed this workaround because while many providers said they support MQTT 3.1.1, they often only support a subset of the standard.

The implementation was quite straightforward: ‘POI poll PoC' took less than three weeks to build.

Scaling to millions of vehicles

Next, we plan to dig into how the scaling will work in our proof of concept, since our connected services need to scale to millions of vehicles. Being able to scale out, i.e. to add additional resources to support a higher capacity demand, is a key aspect of cloud workloads. This proof of concept is based on OpenShift to enable scaling of the messaging and backend services in such a way that we can serve millions of vehicles.

With the managed systems based on OpenShift, we have a clear goal that we - as developers - will have the freedom to be able to deploy our connected IoT services in any cloud environment without having to worry about networks, operating systems or scaling these services to millions of users. We anticipate these platforms will provide the load balancing and persistent messaging we need to scale to the limit we need.

Delta is a new market intelligence service from Computing to help CIOs and other IT decision makers make smarter purchasing decisions - decisions informed by the knowledge and experience of other CIOs and IT decision makers.

Delta is free from vendor sponsorship or influence of any kind, and is guided by a steering committee of well-known CIOs, such as Charles Ewen, Christina Scott, Steve Capper and Laura Meyer.

Ten crucial technology areas are already covered at launch, with more data appearing and more areas being covered every week. Sign-up here for your free trial of the Computing Delta website.