Q&A

Building Cloud-Native Microservices with Dapr

Modern distributed applications require much more than just application logic, typically features such as state management for services, communication using publish/subscribe messaging and event-driven binding to cloud resources might be needed.

One popular approach for that is Dapr, described as a portable, event-driven runtime that makes it easy for any developer to build resilient, stateless and stateful applications that run on the cloud and edge and embraces the diversity of languages and developer frameworks.

In other words, Dapr introduces a runtime to offer such building blocks, and is less invasive in your application, allowing you to pick and choose what you need.

[Click on image for larger view.] Dapr at 20,000 Feet (source: Microsoft).

Because it's such a useful, popular tool, two experts will explain Building Cloud-native Microservices with Dapr at the big Cloud & Containers Live! event in November, just one part of the big, umbrella Live! 360 conference.

In this workshop, Marcel de Vries, co-founder and CTO at Xpirit, along with Alex Thissen, architect, lead developer and mentor, will look at the approach that the Dapr runtime takes with a sidecar architecture, separating application logic from the Dapr runtime components. You learn to develop distributed applications in .NET using Dapr's features and, how to bind to messaging infrastructure and cloud resources. Specific items of discussion include:

  • Dapr and sidecar architecture
  • Dapr components and actor programming model
  • About programming container-based applications in .NET using Dapr

We caught up with de Vries and Thissen to learn more about their upcoming, full-day work workshop

VirtualizationCloudReview: What inspired you to present a session on Building Cloud-native Microservices with Dapr?
Presenters: Building cloud-native applications is getting more and more common, but also more complicated because of its distributed nature. Moreover, being able to choose more freely between cloud providers and technologies used, as well as not having to learn each new stack in details, is very beneficial to a agile and maintainable implementation. Dapr was designed to help in all these areas and is part of the Cloud-Native Compute Foundation (CNCF). It is a new way to offer a application runtime for distributed applications. We were inspired by the early prototypes and betas of Dapr and got involved with the Dapr team to help improve Dapr, especially for .NET developers.

Inside the Session

What: Building Cloud-native Microservices with Dapr

When: Nov. 13, 8:30 a.m. - 5:30 p.m.

Who:
Marcel de Vries, Co-founder & CTO, Xpirit

Alex Thissen, Architect, Lead Developer, and Mentor

Why: You learn to develop distributed applications in .NET using Dapr's features and, how to bind to messaging infrastructure and cloud resources.

Find out more about Visual Studio Live!, taking place Nov. 12-17 in Orlando

Could you briefly explain the fundamental benefits of Dapr's sidecar architecture and how it streamlines the development of distributed applications?
The sidecar architecture allows Dapr to provide its runtime capabilities and building blocks without relying heavily on a code-based implementation. In other words, the sidecar does the heavy lifting, while your code stays clean and agnostic of the particular technology or framework used for the building blocks. This allows a developer to learn the Dapr APIs once and be very productive. Also, the sidecar takes care of cross-cutting concerns such as secure transport and communication, tracing and other instrumentation for observability. It fits well with hosting in Kubernetes clusters from any cloud provider as these provide the ability to run sidecars in so-called pods where the distributed application's code is also hosted.

As developers transition to using Dapr for building cloud-native microservices, what are the key features or building blocks they should be familiar with, especially when compared to traditional microservice architectures?
It is important to understand how a truly decoupled and event-driven distributed application landscape is created. The traditional microservices architectures still have coupling in direct dependencies and interactions of the microservices. Making the right decisions on decoupling, indirection of dependencies and asynchronicity are key. Dapr offers various options for decoupling with the Pub/Sub building block, as well as autonomy for microservices with independent state stores, secret management and workflow.

You mentioned that Dapr allows developers to "pick and choose" what they need. How flexible is Dapr in integrating with existing systems or accommodating project-specific requirements?
Dapr needs to be added to the existing application. The original implementation should be altered to interface with the sidecar's API to make use of the Dapr capabilities and building blocks. The various Software Development Kits (SDKs) allow deep integration into the development stack, such as .NET for Microsoft platform developers. After using Dapr to take care of the functionality in its building blocks, you can configure the actual technological implementation. The configuration is done with YAML files, a textual form to define the components to use, such as Azure Blob storage for the State Store component offered by Dapr. Changing and deploying the YAML definition for the state store is all that is needed to switch to a different stack, such as Amazon S3 buckets. The flexibility is only limited by the components available for each building block. This is a community driven and still growing list that covers most of the common choices available.

Actor programming models have been around for some time now. How does Dapr incorporate or reinvent this model in its ecosystem, and what advantages does it bring to the table?
Dapr actors are based on the virtual actor framework found in Orleans, which is now part of .NET 7. It is a light-weight implementation of the actor programming model and helps decrease the complexity of doing distributed and multi-threaded work in application code. This allows developers to concentrate on the business logic to implement and stay away from complex multi-threaded code and other difficulties introduced by a distributed solution architecture.

With the increasing importance of containerization in modern applications, how does Dapr enhance or simplify the development of container-based .NET applications?
Dapr makes full use of the container based approach of cloud-native software deployment and hosting. Its sidecar architecture is a natural fit with the container hosting environment and makes it easy to inject the Dapr capabilities in the cloud-based solution and container-hosted environment. The programming model makes it simpler and it enhances the development by injecting cross-cutting concerns transparently. Dapr is offered as a checkbox option with some cloud services, such as Azure Container Apps

What are common pain points experienced by those just getting started using Dapr?
Dapr makes use of modern cloud-focused technologies, platforms and frameworks. This includes container technology, cloud providers such as Microsoft Azure, Amazon Web Services and Google Cloud, as well as various cloud services offered by each of them. Should you be unfamiliar with all of this, it is a pretty steep learning curve. In addition, getting your head around the concepts and proper use of Dapr as part of your architecture, landscape and implementation might take some time. However, after the getting started developer productivity and maintainability of the implementation increases significantly.

Note: Those wishing to attend the conference can save hundreds of dollars by registering early, according to the event's pricing page. "Save up to $400 if you register by September 22!" said the organizer of the event, which is presented by the parent company of of Virtualization & Cloud Review.

About the Author

David Ramel is an editor and writer at Converge 360.

Featured

Subscribe on YouTube

Upcoming Training Events