Innovation is accelerating across the automobile industry, bringing advances in 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 increasingly diverse data.
Connected services at BMW Group
At the BMW Group, we are leveraging connected vehicle technologies to offer drivers advanced connected services, from on-street parking to remote traffic information and more besides. However, we also recognize how the shift toward electric and autonomous vehicles will demand elaborate services.
Our 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. Alongside directions, satellite navigation routes will also need to include details of recharging stops, such as is the charging station currently occupied, can I reserve it, what are 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 our 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 recognized very strong trends towards connected services distributed among vehicle and cloud environments, new technologies leveraging the Internet of Things (IoT) and a move from private to public or hybrid cloud scenarios, 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 wanted 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 Group 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 Group 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 allow us to explore the technology and create something test users could experience. The connected services use case we imagined went like this: a group of friends traveling 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, such as 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.
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 to choose 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.
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.
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 allow us to quite easily implement any adaptations needed to connect to the EnMasse MQTT gateway running on OpenShift.
On the vehicle side, we realized 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 itself was quite easy; ‘POI poll PoC’ took less than three weeks to build.
Scaling to millions of vehicles
Next, we plan to dig into how the scaling works 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 allow 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.