Showing posts from October, 2017

Create a simple Microsoft Orleans application

Create a simple Microsoft Orleans applicationLast week I presented an overview of Microsoft Orleans. Gave an explanation on the concepts and keywords which can be found in the framework.
Today I will explain how we can implement a simple Orleans application with a cluster composed by a localhost Silo and with a client within an ASP Net Core Mvc application.
This post will be composed by 3 parts:1. Implement the grains 2. Create the silo 3. ASP Net Core Mvc client 1. Implement the grainsThe grains are the unit of work in an Orleans application. They contain the business logic and ensure that the state is consistent.
In our example we will be implementing a Bank account grain with a withdraw and deposit functionality. There will be a single business rule being that the balance of any account cannot be lower than 0.We start first by creating the grain interface in a project where we reference Orleans.Core.public interface IBankAccount: IGrainWithStringKey { Task Deposit(double a); …

A first look at Microsoft Orleans

A first look at Microsoft OrleansMicrosoft Orleans is a framework used to build scalable distributed systems. It reduces the complexity of distributed system by abstracting away concurrency issues together with state management. Processes can then be run on multiple instances and form a cluster, they can be hosted on different environment and be scaled up and down on demand.
Today I will give a broad overview of the concepts utilized and developed by the team behind Orleans. This post will be compose by 3 parts:1. Motivations 2. Definitions 3. How does it work? 1. MotivationsThe two main benefits of Orleans is that it:reduces the complexity of coding applications by providing a simpler model to maintain object oriented codebase. Orleans moves away from the N-tier type of architecture where business logic is held in stateless services and state is persisted in database by providing its own implementation of the actor pattern where the actor is a stateful unit of work where consistency …