russia is waging a genocidal war in Ukraine. Please help Ukraine defend itself before russia has a chance to invade other countries.
Exploring the Intersection of Software Development, AI Innovation, and Entrepreneurial Success | Orleans - software framework for cloud applications

Orleans - software framework for cloud applications

Orleans
Orleans - is a Microsoft Research project and managed (.NET) software framework for building client + cloud applications. As outlined in the recently released paper on the topic: Orleans defines an actor-like model of isolated grains that communicate through asynchronous messages and manage asynchronous computations with promises. The isolated state and constrained execution model of grains allows the Orleans runtime to persist, migrate, replicate, and reconcile grain state without programmer intervention. Orleans also provides lightweight, optimistic, distributed transactions that provide predictable consistency and failure handling for distributed operations across multiple grains.  Orleans is a library written in C# that runs on the Microsoft .NET Framework 4.
 
 
 
Orleans defines an actor-like model of isolated grains that communicate through asynchronous messages and manage asynchronous computations with promises. The isolated state and constrained execution model of grains allows the Orleans runtime to persist, migrate, replicate, and reconcile grain state without programmer intervention. Orleans also provides lightweight, optimistic, distributed transactions that provide predictable consistency and failure handling for distributed operations across multiple grains.
AsyncValue<int> getPromise = setPromise.ContinueWith(
} <= ()    
          return grain.GetAxB();
;({
// schedule action when GetAxB returns actual result
AsyncCompletion resultPromise =
   getPromise.ContinueWith((int x) => {
       Console.WriteLine("Result: " + x.ToString());
 ,{     
     (Exception exc) => {
       Console.WriteLine("Error: " + exc.Message);
       throw exc; // re-throw the exception
;({     
// wait for operation to complete
try {
   resultPromise.Wait();
} catch(Exception exc) {
   // error at any stage will throw exception
Console.WriteLine("Error: " + exc.Message);
{
CreateGrain immediately returns a reference to the grain, allowing pipelining of asynchronous requests to the grain, such as SetA and SetB, even before the grain is fully created. The client
invokes GetAxB on the reference before SetA and SetB fulfill their promises. The invocation is queued on the grain and executes after SetA and SetB execute. When the getPromise is resolved, a
success or an error function delegate is invoked. Because every asynchronous operation, such as a call to a grain method, a call to ContinueWith() on a promise, or a call to Join(), returns a promise, and because promises propagate errors through continuations, error handling can be implemented in a simple manner. A client can build an entire dataflow graph of interconnected asynchronous continuations and defer error handling until a later point. In the example above, an error at any stage of the program (CreateGrain(), SetA(), SetB(), GetAxB(), x.ToString(), etc.) will eventually break resultPromise and cause resultPromise.Wait() to throw an exception with information about the error to  the one error handling statement (try/catch) as the top level. All possible errors bubble up to that point in the program, even though pieces of the computation may run concurrently on different threads.
 
Orleans supports the development of cloud application software. It targets a specific  category of software, embodying best practices for  building scalable cloud applications. This section provides an overview of Orleans, elaborated in later sections, and explains the rationale for the design choices.
 
Get Microsoft Silverlight

Motivation

Client + cloud computing is a disruptive, new computing platform, combining diverse client devices – PCs, smartphones, sensors, and single-function and embedded devices – with the unlimited, on-demand computation and data storage offered by cloud computing services such as Amazon’s AWS or Microsoft’s Windows Azure. Advances in semiconductors again are driving a radical change, reducing the cost of computing and communications and enabling inexpensive, compact, personal, and mobile devices with powerful processors, wireless connectivity with good bandwidth and reach, and low power consumption. In the data center, low-cost, efficient, virtualized servers created a new business of selling inexpensive computation on demand. Together these advances make possible the vision of ubiquitous computing articulated by Mark Weiser two decades ago, where data and computation are no longer tied to a physical location or computing device, but instead become the fabric of our environment and part of all devices we interact with.
As with every advance in computing, programming is a fundamental challenge. Client + cloud computing combines many of the most difficult aspects of programming. These systems are inherently parallel and distributed, running computations across a large number of servers in multiple data centers and diverse clients. Individual computers and communication links are commodity components, with non-negligible failure rates and complex failure modes. Cloud computing runs as a service, offering economies of scale and efficiency by concurrently processing requests from many clients, but also facing challenging demands in handling varying and unpredictable loads and offering a highly available and reliable service in the face of hardware and software failures and evolution. These problems, of course, come in addition to the familiar challenges of constructing secure, reliable, and efficient software.
Orleans provides a well-designed and engineered environment with abstractions that support the development of scalable, reliable distributed systems, reducing the difficulty and cost of building new software infrastructure on unreliable hardware needed for the client + cloud computing. Orleans has three main components: (1) programming model, (2) programming language and tools, and (3) runtime system.
 
AsyncValue<int> intPromise = GetA();
//anonymous method runs when promise is resolved
intPromise.ContinueWith((int a) => {
   // success block
   Console.WriteLine("Result: " + a.ToString());
,{
(Exception exc) => {
   // exception block
Console.WriteLine("Error: " + exc.Message);
}).Ignore();
Asyncronous continuation
  
References
  
 
Summary
Orleans defines an actor-like model of isolated grains  that communicate  through asynchronous messages and manage asynchronous  computations with promises.  The isolated state and constrained  execution model of grains allows the  Orleans runtime to persist, migrate, replicate, and reconcile grain state without programmer intervention.  Orleans also provides lightweight, optimistic,distributed transactions that provide predictable consistency and  failure handling for distributed operations across multiple grains. We believe that this framework will  significantly simplify the development of  complex  cloud applications, by  incorporating fundamental distributed computing  functionality and abstractions into the system and by promoting the use of design patterns that  promote scalability and reliabilit. One of Microsoft’s biggest selling points for its cloud platform is that developers can use .Net, Visual Studio and other programming tools they already know to write Azure applications.
Comments are closed