About the Client
Hive, from Centrica Connected Home is among the largest smart home providers in the UK, with more than 500,000 Hive hub customers and more than 360,000 Hive Active Heating customers in the UK. Hive customers can easily connect to and control their homes through the Hive app, including the Hive Window or Door Sensor™, Hive Motion Sensor™, Hive Active Plug™ and Hive Active Lights™.
The client’s business strategy is to become the nation-wide smart home platform provider, which is an ambitious goal. To achieve this goal, the underpinning technology must be robust and scalable enough to reliably handle millions of households across the country. At the same time, the connected home market is in a fast-growing phase, offering many connected devices from different providers. Thus, the platform will have to be flexible enough to support multiple future integrations with new connected devices. The business aims to improve the user experience continuously, which will require gathering a vast amount of metrics and performing advanced analytics. Another possible way to extend the range of features the product provides is by adding integration facilities for partners. Consequently, the product will need to be configurable and provide white-labelling functionality. In order to maintain the quality of the product at a high level, the operational work must be easy and transparent so the delivery process will be fast and stable.
Meeting the Challenge
DataArt is collaborating closely with the client’s IT team to build and support the cloud based smart home platform, and to provide professional development services and ongoing support of the cloud platform and the web and mobile user interfaces.
The cloud platform was implemented as a set of micro components. Each component addresses only one part of the whole functionality, but does it well. It provides metrics that can be used for live monitoring and further analysis. The microservice approach made scaling the platform for load increases simple and also made continuous delivery possible.
The underlying communication with hubs -- transmitting devices installed in customer homes -- is implemented via encrypted AMQP (Advanced Message Queuing Protocol) using RabbitMQ as the message broker. Upstream messages are sent to edge servers, where they are routed to multiple destinations as required. The current states of the devices update snapshots in Hazelcast cluster. Information about registration is stored in a MySQL database. Sensor data is recorded in long-term storage that is backed up by a Cassandra cluster. Most of the information is also mirrored to a Kafka message bus for further analysis. Events that require actions from the platform are routed to other components via the RabbitMQ bus.
The public facing part of the platform consists of public and engineering web APIs and notification sending components. The web API is used by public and administration web-sites, clients for all well-known mobile platform and voice recognition systems. The flexibility of the microservice approach offered the ability to easily extend email and SMS notifications with more convenient push notifications.
All components are provisioned automatically with Ruby AWS SDK. For some components blue-green deployment pipelines (2 independent production environments, at any time only 1 environment is live) were developed, which made it possible to release updates with zero downtime. Functional and performance characteristics and logs are gathered in an ELK cluster that simplified the monitoring and troubleshooting.
The developed solution is making it possible for the client to become a significant player on the fast-growing smart home market.
The solution improves the user experience and makes the platform more flexible by implementing continuous delivery and the microservice approach. The platform provides integration points for partners and the API for other applications. The operational processes make it possible to update the solution without downtime. Live monitoring and analysis make it easier to resolve issues, while maintenance tasks are easier.
- Amazon AWS;
- Elasticsearch + Logstash + Kibana (ELK);
- Spring MVC & Spring Boot;