Monterey is a framework intended to simplify the development of scalable, distributed actor-based systems. Written in Java, it allows actors to be developed in any JVM language.
In this document you will learn how to develop actors and considerations to make when writing them, then how to deploy them in a Monterey network.
Monterey is an implementation of the Actor Model, where a system is treated as a collection of concurrent independent actors running at venues, communicating with each other asynchronously to achieve the system's overall goals.
In addition to simplifying actor creation and management, Monterey also provides intelligent application mobility, allowing these actors to be moved without disruption to improve efficiency, _e.g._ load balancing or reducing wide-area latency.
Actors
Actors perform specific local tasks for the system, calling to other actors as needed. The Monterey framework currently supports the following mechanisms of communication:
Point-to-point communication (private messaging): each actor can directly address other actors by their ID, where they know this ID through design or a previous communication
Publish-subscribe communication (topic messaging): each actor can publish to a topic, to which multiple actors can subscribe, where topics are defined by design
These mechanisms are exposed to actors through an ActorContext, giving full access to the Monterey framework.
Monterey can also provide shim classes to make actor development even simpler in certain contexts, such as remotable classes, CDI beans, or Akka code. (Some of these shims are still in development, as are other messaging schemes for use cases including shared queues with round-robin or nearest available neighbour delivery.)
Venues
Monterey hosts a system's actors at one or more venue containers which can be distributed over many physical machines and even multiple geographic sites. Each venue is responsible for:
Managing each of its contained actors according to a well-defined lifecycle
Facilitating communication among the actors hosted locally and in remote venues
Providing JMX hooks to allow external management tools to interact with the venue and its actors.
Venues can be started as standalone OSGi container processes, or they can be embedded in other processes such as servlets or desktop applications.
Brokers
Actors in the Monterey framework communicate with each other through message brokers, with ActiveMQ and Qpid supported out of the box. By default, these brokers are provisioned and managed by the framework automatically, but it is possible to configure to use a certain type of broker or specific broker instances, and to configure where brokers are provisioned. For example, where communication is local to a single machine, brokers can be set up at the same machine (with a same-JVM optimized broker in development).
Mobility
Monterey's patented technology allows actors to be migrated between venues, and the brokers in use to be switched, without disrupting computation or communication among the actors. These dynamic application changes are extremely efficient, making it suitable for relatively frequent load-balancing as well as wide-area location optimization.
This application mobility is exposed through JMX, and can be used either manually or by automated policies which can perform load balancing, latency optimization, cost reduction, and many more functions. With mobility built in, Monterey makes it easy to build applications which can take full advantage of cloud's dynamic capabilities, solving the technical challenge of how to support runtime agility, and letting the developer quickly focus on the when and why of scaling and optimizing location.
Brooklyn
Monterey comes bundled with the Brooklyn subsystem which acts as the Monterey Control Plane. This provides the ability to control Monterey through "infrastructure as code", allowing automated/autonomic deployment of the services supporting and supported by your application.
Brooklyn is developed and maintained by Cloudsoft, with example usage for Monterey included in this document.
jclouds
jclouds is an open source Java library that provides portable compute and storage abstractions for most major cloud service providers. It is used within Monterey to allow your application to be deployed across many different providers using a standardised API, whilst also allowing access to provider-specific APIs where needed.
jclouds is developed and maintined by an active OSS community at jclouds.org. Cloudsoft provides professional open source support and certification for jclouds. Example usage relevant to Monterey deploying to various cloud providers is included in this document.