Vivint grows its market share in the IoT smart home industry with a fast data system based on Akka Platform
With its suite of supported devices, its fleet of more than 2,000 service technicians, and its brilliantly designed mobile app and home console interfaces, Vivint has innovated the smart home far beyond the imaginations of legacy security providers.
Vivint’s catalogue of services starts with security and extends to a variety of smart home options, including smart locks, lights, thermostats, garage door openers and cameras, which integrate with voice assistance to help customers easily control their entire home.
1.2 million Vivint customers each have an average of 20 smart devices per home, all of which generate large volumes of data. To turn this data into useful insight and drive actions that deliver value for its customers, Vivint must take a sophisticated approach to applying learned models in real time.
One of the core values of the Vivint platform is the intelligence that the company uses to route data, correlate events with opportunities to drive intelligence, and then make decisions that translate to user benefits, such as increased safety, comfort, or cost savings. These use cases require real-time analysis of the tens of millions of events that Vivint captures from its devices every day.
Previously, the company used a pure Java application that quickly ran up against concurrency challenges. Even on beta groups of a few hundred users, thread resources would get locked up, making low-level management of thread pools a necessity. There was also a lack of isolation, so a lower-priority background task could impact responsiveness and cause multi-second delays for users.
Vivint decided to move to Akka Platform from Lightbend to take advantage of its improved concurrency model. Akka Platform provides an abstraction from low-level thread management that enabled Vivint to achieve much better performance with only minimal tweaks to the default configuration.
By using Akka Platform’s paradigm of lightweight actors with no shared mutable state, Vivint has also improved the isolation between different parts of its architecture, reducing the risk of one process negatively impacting another independent process.
Today, Akka Platform is at the core of Vivint’s ability to handle tens of millions of customer events, sitting between the company’s home-grown event bus and its machine learning models. Vivint has used Akka Platform’s actor model to create a virtual representation of every home, and runs tens of millions of actors on its cluster.
Each actor can update the state of a device based on the events that have just appeared on the stream—for example, that the battery level on a device has dropped below critical. The device state is then fed into Vivint’s models, which can infer, for example, whether a house is unoccupied and a thermostat can therefore be turned down to save energy.
Abe Sanderson, Senior Software Engineer at Vivint, comments: “We already had a message-based architecture and putting isolation on top of it meant that we’re able to process our data in a highly scalable fashion and quickly. In the last year, we’ve been able to use Akka Platform to service more than one million customers and tens of millions of actors. Not only does it handle our current load, but we also think the solution could scale by a factor of 10 without any concurrency or isolation issues.”
In addition, Vivint has developed Sky, a cloud-based artificial intelligence that promises to eliminate the need for customers to program their smart home system. Instead of requiring complicated scripts to tell the system what it should do in every conceivable scenario or sequence of events, Sky can accurately detect the state of the home, make intelligent recommendations, and take specific actions. For example, Sky uses the data from sensors and devices to understand whether a home is occupied or vacant. If no one is home, Sky can reach out and ask the owner whether they want to lock the doors, close the garage, or arm the alarm system.
With Akka Platform at the center of its event-driven architecture, Vivint is in a position to capitalize not only on Sky, but also on additional use cases for machine learning models running against real-time streaming data.