Rick McGuire, Senior ADM, provides an introduction to Microservices, an increasingly effective architecture to enable agile development with complex systems.
Microservices are a hot topic these days as more companies are looking for ways to simplify managing complex enterprise applications. If you are not familiar with microservices, the idea is to break up complex monolithic applications into smaller, functionally cohesive services with loosely coupled interfaces. Each service, on its own, is independent and can be updated and deployed separately. This approach works well if you are practicing Agile as each of the services can be aligned to specific business capabilities and business owners with small development teams who can easily manage and support these services. I am not going to dive into all the details, but here is a good article that covers this topic.
- Microservices by Martin Fowler: http://martinfowler.com/articles/microservices.html
I personally like the concept of microservices and have started to experiment with them. Most of my experience in this space is with Service Fabric. If you are not aware of Service Fabric, I suggest you check out the available preview and download the SDK. It’s fairly easy to get started; you can have a 5-node cluster running on your local machine in a few minutes!
Per Mark Fussell, “Azure Service Fabric is a distributed systems platform used to build scalable, reliable, and easily managed applications for the cloud.” Service Fabric allows you to focus on developing code using standard constructs like dictionaries and queues to develop you applications. It supports both stateful and stateless services and actors using the Reliable Actors API and Reliable Services API. Service Fabric takes care of making sure you services are running, as well as ensuring the state is managed on the fabric (for stateful services and actors). One of the more interesting features, is that Service Fabric will ensure that if one of your services fails for any reason, it will be restarted by the Fabric, your application is not even aware of it. It also monitors the health of the nodes in the cluster, if a node should fail it will move the services running on that node to another node in the cluster. This ensures reliability and minimal impact to users of your application.
So what do you get with Service Fabric?
- Develop massively scalable applications that are self-healing.
- Develop with a "datacenter on your machine" approach. The local development environment is the same code that runs in the Azure datacenters
- Develop applications composed of microservices, executables, and other application frameworks of your choice, such as ASP.NET, Node.js, etc.
- Develop stateless and stateful microservices and make these highly reliable.
- Simplify the design of your application by using stateful microservices in place of caches and queues.
- Deploy applications in seconds.
- Manage the lifecycle of your stateful applications without any downtime, including breaking and non-breaking upgrades.
- Upgrade and patch microservices within applications independently.
- Monitor and diagnose the health of your applications and set policies for performing automatic repairs.
- Scale up or scale down your Service Fabric cluster easily, knowing that the applications scale according to available resources.
- Watch the self-healing resource balancer orchestrate the redistribution of applications across the Service Fabric cluster to recover from failures and optimize the distribution of load based on available resources.
Below, I have listed some useful resources to get you started on your path to using Service Fabric. I suggest watching the two videos first then go through the step-by-step guide on how to build your first application.
- Azure Service Fabric 101 – Introduction –
- Azure Service Fabric 102 - Reliable Services –
- Service Fabric overview and step-by-step guide -
- If you just want to jump in here is link to code samples on GitHub –
This should be enough to get you started with creating your first microservice on Service Fabric, and possibly your first step towards embracing microservices architecture for your enterprise.
Premier Support for Developers provides strategic technology guidance, critical support coverage, and a range of essential services to help teams optimize development lifecycles and improve software quality. Contact your Application Development Manager (ADM) or email us to learn more about what we can do for you.