5 min read

Yesterday, Microsoft announced the launch of two new open-source projects- Open Application Model (OAM) and DAPR. OAM, developed by Microsoft and Alibaba Cloud under the Open Web Foundation, is a specification that enables the developer to define a coherent model to represent an application. The Dapr project, on the other hand, will allow developers to build portable microservice applications using any language and framework for a new or existing code.

Open Application Model (OAM)

In OAM, an application is made of many components like a MySQL database or a replicated PHP server with a corresponding load balancer. These components are further used to build an application, thus enabling the platform architects to utilize reusable components for the easy building of reliable applications. OAM will also empower the application developers to separate the application description from the application deployment details, allowing them to focus on the key elements of their application, instead of its operational details.

Microsoft also asserted that OAM consists of unique characteristics like platform agnostic. The official blog states, “While our initial open implementation of OAM, named Rudr, is built on top of Kubernetes, the Open Application Model itself is not tightly bound to Kubernetes. It is possible to develop implementations for numerous other environments including small-device form factors, like edge deployments and elsewhere, where Kubernetes may not be the right choice. Or serverless environments where users don’t want or need the complexity of Kubernetes.”

Another important feature of OAM is its design extensibility. OAM also enables the platform providers to expose the unique characteristics of their platform through the trait system which will help them to build cross-platform apps wherever the necessary traits are supported.

In an interview with TechCrunch, Microsoft Azure CTO Mark Russinovich said that currently, Kubernetes is “infrastructure-focused” and does not provide any resource to build a relationship between the objects of an application. Russinovich believes that OAM will solve the problem that many developers and ops teams are facing today.

Commenting on the cooperation with Alibaba Cloud on this specification, Russinovich observed that both the companies encountered the same problems when they talked to their customers and internal teams. He further said that over time, Alibaba Cloud will launch a managed service based on OAM, and chances are that Microsoft will do the same over time.

The Dapr project for building microservice applications

This is an alpha release of Dapr with an event-driven runtime to help developers build resilient, microservice stateless and stateful applications for the cloud and edge. It also allows the application to be built using any programming language and developer framework.

“In addition, through the open source project, we welcome the community to add new building blocks and contribute new components into existing ones. Dapr is completely platformed agnostic, meaning you can run your applications locally, on any Kubernetes cluster, and other hosting environments that Dapr integrates with. This enables developers to build microservice applications that can run on both the cloud and edge with no code changes,” stated the official blog.

Image Source: Microsoft

APIs in Dapr are exposed as a sidecar architecture (either as a container or as a process) and does not require the application code to include any Dapr runtime code. This simplifies Dapr integration from other runtimes, as well as provides separate application logic for improved supportability.

Image Source: Microsoft

Building blocks of Dapr

Resilient service-to-service invocation: It enables method calls, including retries, on remote services wherever they are running in the supported hosting environment.

State management for key/value pairs: This allows long-running, highly available, stateful services to be easily written, alongside stateless services in the same application.

Publish and subscribe messaging between services: It enables event-driven architectures to simplify horizontal scalability and makes them resilient to failure.

Event-driven resource bindings: This helps in building event-driven architectures for scale and resiliency by receiving and sending events to and from any external resources such as databases, queues, file systems, blob stores, webhooks, etc.

Virtual actors: This is a pattern for stateless and stateful objects that makes concurrency simple with method and state encapsulation. Dapr also provides state, life-cycle management for actor activation/deactivation and timers and reminders to wake up actors.

Distributed tracing between services: It enables easy diagnose and inter-service calls in production using the W3C Trace Context standard. It also allows push events for tracing and monitoring systems.

Users have liked both the opensource projects, especially Dapr.

A user on Hacker News comments, “I’m excited by Dapr! If I understand it correctly, it will make it easier for me to build applications by separating the “plumbing” (stateful & handled by Dapr) from my business logic (stateless, speaks to Dapr over gRPC). If I build using event-driven patterns, my business logic can be called in response to state changes in the system as a whole.

I think an example of stateful “plumbing” is a non-functional concern such as retrying a service call or a write to a queue if the initial attempt fails. Since Dapr runs next to my application as a sidecar, it’s unlikely that communication failures will occur within the local node.”

More goodness from #Microsoft Dapr looks really interesting. Microsoft launches new open-source projects around Kubernetes and microservices https://t.co/JgMdtBZeb0 #atalianworld — lewis richards (@stroker) October 17, 2019

Cool, a bunch of new, hot stuff. 😍 all about microservices and cloud-native applications; featuring but not limited to #Kubernetes 💪🏼😍 — Thorsten Hans 🐋☁️ (@ThorstenHans) October 16, 2019

Read Next

The new WebSocket Inspector will be released in Firefox 71

Made by Google 2019: Google’s hardware event unveils Pixel 4 and announces the launch date of Google Stadia

What to expect from D programming language in the near future

An unpatched security issue in the Kubernetes API is vulnerable to a “billion laughs” attack

Kubernetes 1.16 releases with Endpoint Slices, general availability of Custom Resources, and other enhancements