Apple Rebuilds Siri Backend Services Using Apache Mesos
Apple have announced that the company’s popular Siri iOS-based intelligent personal assistant application is powered on the backend by Apache Mesos, the open source cluster manager. The Mesosphere blog states that Apple have created a proprietary PaaS-like scheduler framework named J.A.R.V.I.S., which allows developers to deploy Siri services in a scalable and highly available manner.
The Apache Mesos cluster manager abstracts CPU, memory, storage, and other compute resources away from machines (physical or virtual), enabling fault-tolerant and elastic distributed systems to be built and run effectively. Mesos is built using the same principles as the Linux kernel, only at a different level of abstraction. The Mesos kernel runs on every machine and provides application frameworks with API’s for resource management and scheduling across entire datacenter and cloud environments. Apple have created their own proprietary scheduler framework named J.A.R.V.I.S. for running Siri’s backend services.
J.A.R.V.I.S. is an acronym for ‘Just A Rather Very Intelligent Scheduler’, and is named after the intelligent computer assistant in the Iron Man movies. Apple use J.A.R.V.I.S. as an internal platform-as-a-service (PaaS), which allows the developers working on the backend applications for Siri to deploy scalable and resilient services that are responsible for answering iOS user's voice queries to the personal assistant application.
According to the Mesosphere blog, Apple developers stated during a meetup at the Apple headquarters in Cupertino, California, that their Mesos cluster spans thousands of nodes. The backend that supports the Siri application comprises of approximately one hundred different types of service, and application data is stored within a deployment of the Hadoop distributed file system (HDFS). The use of Mesos has helped to make Siri scalable and available from an infrastructure perspective, and has also improved latency on the iOS application itself.
The Mesos backend represents the third-generation of the Siri platform, and is a move away from the ‘traditional’ infrastructure that was deployed previously. The Mesosphere blog suggests that Apple’s work with Mesos and J.A.R.V.I.S. predates the open sourcing of other PaaS-like frameworks for long-running application services, such as Mesosphere Marathon, part of the Mesospere datacentre operating system (DCOS), and Apache Aurora, which originated from the Twitter infrastructure team and is similar in concept to Google’s Borg project.
Derrick Harris, senior research analyst at Mesosphere, Inc., stated on the Mesosphere blog that the public announcement of Siri being powered by the Apache Mesos cluster manager validates the maturity of Mesos:
If Apple trusts Mesos to underpin Siri — a complex application that handles Apple-only-knows-how-many voice queries per day from hundreds of millions of iPhone and iPad users — that says a lot about how mature Mesos is and how ready it is to make a big impact in companies of all stripes.
InfoQ caught up with Matt Trifiro, SVP at Mesosphere, and asked what impact the announcement will have for the industry and software developers looking to deploy applications to Mesos:
InfoQ: Why is the Apple announcement important to Mesos and Mesosphere?
Trifiro: Apple announced that they rebuilt all of Siri to run on top of Mesos. This demonstrates, yet again, that Mesos — which is the distributed kernel inside of the Mesosphere DCOS — is the gold standard when it comes to orchestrating containers at scale and building new distributed systems.
InfoQ: Not everybody is Apple; How are more traditional enterprises adopting Mesos?
Trifiro: Companies like Apple and Twitter are betting large parts of their entire infrastructure on this technology. Imagine how reliable Mesos must be if Siri and Twitter depend on it. But the open source Apache Mesos is a very sharp-edged technology. To use it in production, assembling a stack by hand using the open source tools, is a very difficult proposition. And that’s where Mesosphere comes in. Building a full Datacenter Operating System (DCOS) around this battle-tested technology, we’ve made it consumable by any organization. You leverage the same power and automation that a Twitter or Apple does, but you don’t have to be Twitter or Apple.
InfoQ: Apple has written a scheduler (J.A.R.V.I.S.) directly for the Mesos API. What does that mean?
Trifiro: One of the most powerful aspects of Mesos is that it provides primitive on which to build new distributed systems. If you look at a distributed system like Hadoop, which was built before Mesos, it has hundreds of thousands of lines of code, a lot of it reinventing the wheel. Code for handling all of the fail cases, all of the networking, all of the message passing and resource allocation—those are things nobody should have to rewrite. By providing them as part of the Mesos kernel, programmers can quickly build new highly-available and elastic distributed systems without having to duplicate all of the basic functionality. They can focus on the business logic.
InfoQ: What is the relationship between Mesos and the Mesosphere DCOS?
Trifiro: The Mesosphere DCOS is a new kind of operating system that spans all of the machines in a datacenter or cloud and pools them together so that they behave like one big computer. Mesos, the Apache open source project, is the kernel inside this operating system. We wrapped the kernel with a lot of other components, such as an init system (marathon), a file system (HDFS), an application packaging and deployment system, a graphical UI and a CLI. All of these things together comprise DCOS. If you look at an OS like Apple’s Yosemite or even Android, they each have a kernel (BSD and Linux, respectively), and they added all of the system services and tooling around them to make the kernel a product worthy of a laptop or smartphone. We’ve done the same for the datacenter.
Additional information on Apple’s announcement of the use of Mesos to power the backend of Siri can be found on the Mesosphere blog.