The Future of Cloud Native Applications With OAM and Dapr
During the Microsoft Ignite 2019, organized in Orlando - Florida from 4th to 8th November, Mark Russinovich, the Azure CTO, presented two innovative and revolutionary projects developed by Microsoft that aim to solve a bunch of existing problems nowadays for IT Pros and Developers when they try to build distributed microservice-based applications. This session was named “The Future of Cloud Native Applications with Open Application Model (OAM) and Distributed Application Runtime (Dapr)”.
Open Application Model (OAM)
So, one of the projects is related with Open Application Model (OAM). It represents a open standard that allow us to build Cloud native applications, platform-agnostic, and following a separation of the concerns, to provide us several benefits, by separating the application definition from the details of how the application is deployed and managed by the infrastructure hosting it.
Separating the application definition from the operational details enables application developers to focus on the key elements of their application and abstracting them from the operational details of where and how it is deployed. Also, the separation of concerns allows for platform architects to develop re-usable components and for application developers to focus on integrating those components with their code to quickly and easily build reliable applications. In all of this, OAM is specially useful in those scenarios where we have distinct roles, such as in the image below, to build and manage applications, since it allows you to have a separation of concerns, so the different roles developing and managing your applications can focus on the key elements of their tasks.
OAM introduces several concepts that compose your applications. One of the concepts is the Components that represent your application. These components might be services like a SQL database or a .NET WebAPI with corresponding load balancer. Developers can create code that they package as a component and then create manifests that describe the relationships between the different components and other applications. With this, you have a separation of the component’s implementation and the description of how those components come together in a complete distributed application architecture.
To transform these components into a concrete application, application operators use a configuration of these components to form a specific instance of an application that can be deployed. The configuration resource is what enables an application operator to run a real application out of the components provided by developers.
The last concept is the Traits, whereas you use a collection of them to describe the characteristics of your application environment and its capabilities such as auto-scaling and ingress and more. These traits allows you to deploy your applications to different environments with different characteristics, depending on the requirements and context. Those traits can then be configured by infrastructure operators to satisfy the unique operating requirements of their environment.
Last but not least, the specification is extensible by design. Likewise, OAM enables platform providers to expose the unique characteristics of their platform through the trait system in a way that enables application developers to build cross-platform apps wherever the necessary traits are supported.
Distributed Application Runtime (Dapr)
Dapr is a portable, event-driven runtime that makes it easy for developers to build resilient, microservice stateless and stateful applications that run on the cloud and edge and embraces the diversity of languages and developer frameworks.
It follows a Sidecar Architecture, so it uses a sidecar node attached to each of your components, so it can extend and enhance the functionalities of your application, such as service discovery, load balancing, traffic management, and more.
Using this programming model, the developer is able to create microservice applications without carrying so much about the factors that introduce complexity into the process of building distributed applications, such as resiliency, scalability, service identities and discovery, load balancing, state management and more. Dapr abstracts these complex factors from the developers so they can focus on the code they are authoring.
Another important aspect of Dapr is related with the platform hosting our applications. Dapr enables us to run our applications on multiple environments on the Cloud, on-premises, and even on the Edge including any Kubernetes cluster available to host your application.
Last, but not least, Dapr allows you to leverage your favourite programming language to build your distributed applications, and overcome the limitations of programming languages and versions you can face in some of the nowadays services available to build microservice-based applications.
The image below provides an overview of a microservice application architecture using Dapr. Basically you build the services that compose your application using your favourite programming language or framewor, such as Java, Node.js, Python, .NET Core and more, and then your services communicate with Dapr using its Standard APIs available and using HTTP or gRPC protocols.
Conclusion
So we have the OAM that represents a specification that allows you to define and build cross-platform applications, that run on the Cloud and Edge, providing you a separation of concerns that allows your team to focus on the key elements of their tasks and responsibilities.
Then, we have Dapr as a runtime that decreases the complexity of building distributed microservice-based applications, by providing a separation of concerns and facilitating some of the factors that influence the complexity of building this kind of application.
Also, Dapr permits applications to be portable between “cloud and edge” computing infrastructures, and overcome the current portability issues that developers face while building this kind of applications.
In case you want to access more details related to these projects, please have a look to the following resources:
- Mark Russinovich Presents the Future of Cloud Native Applications with OAM and dapr
- Open Application Model (OAM) Official Website
- Distributed Application Runtime (Dapr) Official Website