Venado was recently engaged by a leading drilling rig manufacturer and oilfield services provider in need of Xamarin mobile application strategy and development, the sort of cross-platform enterprise mobile consulting for which Venado is known. Through a rigorous discovery process, the Venado team identified extraordinary communication demands on the backend servers and identified an opportunity to meet those demands using a non-traditional approach, one with a high potential for improving availability, resilience, scalability, latency, and throughput.
Oil drilling rigs are fully instrumented with all kinds of sensors which produce several hundred channels of real-time data for each rig: from bit rotation speed and current hole depth to air temperature and various gas sensors, every aspect of those rigs are monitored around the clock. Geologists and rig operators monitor numerous channels across multiple rigs, setting alarms so they can receive notifications and take timely action.
How can a backend system service all of the incoming multi-channel data streams for hundreds or thousands of rigs, thousands of existing users, and a new mobile app which is expected to supplement rather than fully replace desktop app traffic?
How can a firehose of data be continuously ingested from all over the world, processed with low latency across a fault-tolerant cluster of servers--efficiently and dynamically routing data in real time--with individually-targeted notifications delivered quickly and reliably to a variety of users in different languages on client apps across Windows, iOS, and Android?
While the customer’s existing server solution, a legacy socket server built many years ago and optimized aggressively to meet production demands, performs admirably for its current load, they nevertheless expressed a keen interest in exploring a modern actor-based microservices approach suggested by the Venado team.
In 2011, a team at Microsoft Research led by Sergey Bykov introduced the first preview for the Orleans framework, a .NET implementation of actor-based microservices that provided a simple, intuitive programming model and the potential for incredibly large-scale cluster deployments. Since then, Orleans has matured with stable releases and is being used in a variety of fascinating scenarios around the Internet of Things, mobile app backends, intelligent caches, streaming data analytics, simulations, interactive entertainment, and more.
Multiplayer online game teams like Halo 4 and 5 adopted Orleans early and have successfully scaled to millions of users running in warehouse-sized data centers.
With such impressive performance characteristics and a history of successful applications across a wide range of industries, Orleans seemed like exactly the kind of technology that could keep up with the huge number of updates from real-time oil rig data streams, spread across large numbers of servers as needed, performing the complex event processing needed to determine which alarms are triggered at each instant, who needs to be notified, how each user prefers to be notified… and never drop the ball on delivering those notifications.
In the Orleans framework, the actor model--originally described in 1973 by Hewitt, Bishop, and Steiger--has been enhanced and extended with some powerful innovations. First among them the idea of virtual actors which are assumed to be always active and ready to do work, with no possibility of getting stuck in some error state. This is an illusion made possible by the Orleans runtime and its ability to activate actors (which it calls grains) whenever a message is sent to them, and to automatically recover from any errors. This frees the developer from managing grain activations and deactivations, comparable to the way garbage collection in .NET freed developers from having to worry about explicitly allocating and deallocating memory. Other actor model systems, in .NET and elsewhere, generally require that developers manage supervision trees of actors, with some actors taking responsibility for the lifecycle of other actors, and things can get complicated. Orleans abstracts all of this away, allowing developers to think in an unconstrained way about actor relationships and the communication patterns among actors.
The Venado team, together with the customer, evaluated several .NET actor-based microservices, and came to the conclusion that the open source nature of Orleans, its simple programming model with virtual actors and exceptions that propagate across servers, an ability to run on premise, and the amazing and supportive community that has grown up around it the past few years have made Orleans the clear choice for this customer’s next generation Internet of Things service architecture.