Thursday, August 14, 2014

Project "Orleans" and Orchestrate.NET

Cloud applications are by default distributed and require parallel processing. Modern application users demand near real-time interaction and responses. Project "Orleans" is Microsoft's new framework for creating cloud (Azure) based distributed applications that meet these requirements. Based on established .Net code and practices, it brings the actor model to your toolbox.

Orleans

Orleans is a new middle tier framework that allows you to "cache" your business objects and their data. It accomplishes this with "grains". A grain is a single-threaded, encapsulated, light weight object that can communicate with other grains via asynchronous message passing. Grains are hosted in "Silos", typically one silo per server. Each silo in an application knows of the other silos and can pass grains and messages between them. Two main goals of Orleans is developer productivity and scaleability by default.

Developer Productivity

Productivity is achieved by providing a familiar environment for development. Grains are .Net objects with declared interfaces, this allows the grains to appear as simple remote objects that can be interacted with directly. Grains are also guaranteed to be single threaded, therefore the programmer never has to deal with locks or other synchronization methods to control access to shared resources. Grains are activated as needed, and if not in use can be garbage collected transparently. This makes grains behave like they are in a cache, "paged-in"/"paged-out" as required. The location of grains is transparent to the developer as well, programmers never need be concerned about which silo a grain is in, as all messaging is handled by the framework.

Scaleability

Fine-grain grains? Orleans makes it easy to break middle tier objects into small units. It can handle large numbers of actors with ease, millions or more, this allows Orleans to control what grains are active and where. Heavy loads on a specific section of grains will be load balanced automatically by the Orleans framework. Grains have logical end-points, with messaging multiplexed across a set of all-to-all physical connections via TCP, this allows a large number of addressable grains with low OS overhead. The Orleans run-time can schedule a large number of grains across a custom thread pool, allowing the framework to run at a high CPU utilization rate with high stability. The nature of messaging between actors allows programmers to develop non-blocking asynchronous code, allowing for a higher degree of parallelism and throughput without using multi-threading in the grains themselves.

Orchestrate.NET

Where does persistence come in? Orleans allows programmers to persist grain state via an integrated store. The grains will synchronize updates and guarantee that callers receive results only after the state has been successfully saved. This system is easily customized/extended and we will do so, and use Orchestrate.NET as the storage provider.

But not until the next post... Meantime you can read up on Orleans, Orleans @ build, Orchestrate and Orchestrate.NET.

No comments:

Post a Comment