Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
eaca538
Create folder for Dapr for .NET Developers
amolenk Sep 7, 2020
38f7058
Merge remote-tracking branch 'upstream/ebook-dapr-for-net-devs' into …
EdwinVW Sep 19, 2020
2e28267
Remove dapr-for-net-devs folder with readme file
EdwinVW Sep 19, 2020
e584a8d
added outline
robvet Sep 29, 2020
307a012
Closer to it
robvet Oct 5, 2020
38bbb44
WIP
robvet Oct 5, 2020
0cbc927
First pass for review
robvet Oct 5, 2020
2eba58f
First pass for review
robvet Oct 5, 2020
4f0b8ce
Update the-world-is-distributed.md
robvet Oct 10, 2020
6e16245
Update the-world-is-distributed.md
robvet Oct 10, 2020
a758272
Updates on PR suggestions
robvet Oct 10, 2020
e0d1f56
More updates on PR suggestions
robvet Oct 11, 2020
5e524f2
Word-smithing
robvet Oct 11, 2020
461f3be
Adding SOA
robvet Oct 17, 2020
1bb1a5c
Added suggestions
robvet Oct 18, 2020
125f62c
suggestions added
robvet Oct 19, 2020
4fef5b0
Final updates before PR to MSFT Team
robvet Oct 29, 2020
60e0930
Merge pull request #4 from amolenk/dapr/wip/ch1-world-dist
robvet Oct 29, 2020
53ecb0d
Update docs/architecture/dapr-for-net-developers/the-world-is-distrib…
robvet Nov 7, 2020
7ff3acd
Update docs/architecture/dapr-for-net-developers/the-world-is-distrib…
robvet Nov 7, 2020
f2351af
Update docs/architecture/dapr-for-net-developers/the-world-is-distrib…
robvet Nov 7, 2020
fec6acc
Update docs/architecture/dapr-for-net-developers/the-world-is-distrib…
robvet Nov 7, 2020
8dcb2a4
Updates for Microsoft review
robvet Nov 7, 2020
abafebb
fixed lint errors
robvet Nov 7, 2020
f433c89
Updated cover
Nov 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/architecture/dapr-for-net-developers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ Authors:
Participants and Reviewers:

> **Nish Anil**, Senior Program Manager, .NET team, Microsoft
>
> **Mark Fussell**, Prinicpal Program Manager, Azure Incubations, Microsoft
>
> **Yaron Schneider**, Prinicpal Software Engineer, Azure Incubations, Microsoft
>
> **Ori Zohar**, Senior Program Manager, Azure Incubations, Microsoft

Editors:

Expand All @@ -65,8 +71,6 @@ A secondary audience is technical decision-makers who plan to choose whether to

## How you can use this guide

Blah

This guide is available both in [PDF](https://dotnet.microsoft.com/download/e-book/cloud-native-azure/pdf) form and online. Feel free to forward this document or links to its online version to your team to help ensure common understanding of these topics. Most of these topics benefit from a consistent understanding of the underlying principles and patterns, as well as the trade-offs involved in decisions related to these topics. Our goal with this document is to equip teams and their leaders with the information they need to make well-informed decisions for their applications' architecture, development, and hosting.

## Send your feedback
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/architecture/dapr-for-net-developers/media/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,75 +1,95 @@
---
title: The World is Distributed
description: Gain an understanding of the challenges of distributed applications
description: The benefits and challenges of distributed applications with a look at monolithic and SOA approaches.
author: robvet
ms.date: 09/17/2020
ms.date: 11/07/2020
---

# The world is distributed

Modern, distributed systems are in and, monolithic apps are out! Just ask any 'cool kid.'
[!INCLUDE [book-preview](../../../includes/book-preview.md)]

But, interestingly, they aren't the only ones saying it. More and more, corporate architects and IT leaders are designing new and replatforming existing enterprise applications to fit this mold.
Just ask any 'cool kid': *Modern, distributed systems are in, and monolithic apps are out!*

As a developer, architect, or IT leader...
But, it's not just "cool kids." Progressive IT Leaders, corporate architects, and astute developers are echoing these same thoughts as they explore and evaluate modern distributed applications. Many have bought in. They're designing new and replatforming existing enterprise applications following the principles, patterns, and practices of distributed microservice applications.

But, this evolution raises many questions...

- What exactly is a distributed application?
- Why is it important?
- Why are they gaining popularity?
- What are the costs?
- And, importantly, what are the tradeoffs?

For years, we designed, developed, and deployed applications as a single, monolithic unit. Figure 1.x shows a monolithic architecture.
To start, let's rewind and look at the past 15 years. During this period, we typically constructed applications as a single, monolithic unit. Figure 1-1 shows the architecture.

![Monolithic architecture.](./media/monolithic-design.png)

**Figure 1**. Monolithic architecture.
**Figure 1-1** : Monolithic architecture.

In the previous figure, note how modules for Ordering, Identity, Marketing, and others, all reside in a single-server process. Application state is stored inside a shared relational database. Business functionality is exposed via HTML and RESTFul interfaces.
Note how the modules for Ordering, Identity, and Marketing execute in a single-server process. Application data is stored in a shared database. Business functionality is exposed via HTML and RESTful interfaces.

Although straightforward, monolithic architectures present many challenges:
In many ways, monolithic apps are `straightforward`. They're straightforward to...

- Coupling
- Deployment
- Scaling
- build
- test
- deploy
- troubleshoot
- scale vertically (scale up)

As the application grows in size, complexity, and volume, these challenges become more pronounced. Eventually, you enter the `Fear Cycle`. The *fear cycle* is a state in which you have lost control of your monolithic application.
However, monolithic architectures can present significant challenges.

The Microsoft guidance eBook, [Architecting Cloud-Native .NET Apps for Azure](https://docs.microsoft.com/dotnet/architecture/cloud-native/), provide the obvious giveaways:
Over time, you may reach a point where you begin to lose control...

- The app has become so overwhelmingly complicated that no single person understands it.
- You fear making changes - each change has unintended and costly side effects.
- New features/fixes become tricky, time-consuming, and expensive to implement.
- Each release as small as possible and requires a full deployment of the entire application.
- The monolith has become so overwhelmingly complicated that no single person understands it.
- You fear making changes as each brings unintended and costly side effects.
- New features/fixes become time-consuming and expensive to implement.
- Even the smallest change requires full deployment of the entire application - expensive and risky.
- One unstable component can crash the entire system.
- New technologies and frameworks aren't an option.
- It's difficult to implement agile delivery methodologies.
- Adding new technologies and frameworks aren't an option.
- Implementing agile delivery methodologies are difficult.
- Architectural erosion sets in as the code base deteriorates with never-ending "special cases."
- The consultants tell you to rewrite it.
- Eventually the consultants come in and tell you to rewrite it.

IT practitioners call this condition `the Fear Cycle`. If you've been in the technology business for any length of time, good chance you've experienced it. It's stressful and exhausts your IT budget. Instead of building new and innovative solutions, the majority of your budget is spent maintaining legacy apps.

Instead of fear, businesses require `speed and agility`. They seek an architectural style with which they can rapidly respond to market conditions. They need to instantaneously update and individually scale small areas of a live application.

An early attempt to gain speed and agility came in the form of [Service Oriented Architecture](https://en.wikipedia.org/wiki/Service-oriented_architecture), or `SOA`. In this model, service consumers and service providers collaborated via middleware messaging components, often referred to as an [Enterprise Service Bus](https://en.wikipedia.org/wiki/Enterprise_service_bus), or `ESB`. Figure 1-2 shows the architecture.

![SOA.](./media/soa-basic.png)

Instead of fear, businesses need speed and agility. They seek an architectural style enables them to rapidly respond to market conditions. They can instantaneously update small areas of a live, complex application, and individually scale those areas as needed.
**Figure 1-2** SOA architecture.

Many organizations are mitigating the monolithic fear cycle. They are gaining speed and agility by adopting a distributed architectural approach to building systems. Figure 1 shows the same system built applying cloud-native techniques and practices.
With SOA, centralized service providers registered with the ESB. Business logic would be built into the ESB to integrate providers and consumers. Service consumers could then find and communicate with these providers using the ESB.

Despite the promises of SOA, implementing this approach often increased complexity and introduced bottlenecks. Maintenance costs became high and ESB middleware expensive. Services tended to be large. They often shared dependencies and data storage. In the end, SOAs often resulted in a 'distributed monolithic' structure with centralized services that were resistant to change.

Nowadays, many organizations have realized speed and agility by adopting a distributed microservice architectural approach to building systems. Figure 1-3 shows the same system built using distributed techniques and practices.

![Distributed architecture.](./media/distributed-design.png)

**Figure 1**. Distributed architecture.
**Figure 1-3** : Distributed architecture.

Note how the same application is decomposed across a set of distributed services. Each is self-contained and encapsulates its own code, data, and dependencies. Each is deployed in a software container and managed by a container orchestrator. Instead of a single database shared by multiple services, each service owns a private database. Other services cannot access this database directly and can only get to data that is exposed through the public API of the service that owns it. Note how some services require a full relational database, but others, a NoSQL datastore. The Basket service stores its state in a distributed key-value cache. Note how inbound traffic routes through an API Gateway service. It's responsible for directing calls to back-end services and enforcing cross-cutting concerns. Most importantly, the application takes full advantage of the scalability, availability, and resiliency features found in modern cloud platforms.

But, while distributed services can provide agility and speed, they present a different set of challenges. Consider the following...

Note in the previous figure how the same application is decomposed across a set of distributed services. Each is self-contained and encapsulates its own code, data, and dependencies. Each is deployed in a software container and managed by a container orchestrator. Instead of a large relational database, each service owns it own datastore, the type of which vary based upon the data needs. Note how some services depend on a relational database, but other on NoSQL databases. One service stores its state in a distributed cache. Note how all traffic routes through an API Gateway service that is responsible for directing traffic to the core back-end services and enforcing many cross-cutting concerns. Most importantly, the application takes full advantage of the scalability, availability, and resiliency features found in modern cloud platforms.
- How can distributed services discover each other and communicate synchronously?
- How can they implement asynchronous messaging?
- How can they maintain contextual information across a transaction?
- How can they become resilient to failure?
- How can they scale to meet fluctuating demand?
- How are they monitored and observed?

But, while distributed applications can help bring agility and speed, they bring many challenges.
For each of these challenges, multiple products are often available. But, shielding your application from product differences and keeping code maintainable and portable become a challenge.

| Challenge | Description |
| :-------- | :-------- |
| State Management | Maintaining contextual information during a transaction |
| Interservice Communication | Communicate with other independent services |
| Messaging | |
| Obseraviblity | End-to-end monitoring of processes executing on different machines |
This book introduces Dapr. Dapr is a distributed application runtime. It directly addresses many of the challenges found that come along with distributed applications. Looking ahead, Dapr has the potential to have a profound impact on distributed application development.

So, what exactly is Dapr? Sit back, relax, and let us help you explore this new world.
## Summary

In this chapter, we introduced Dapr. Blah. We provided a definition along with the key capabilities that drive a cloud-native application. We looked at the types of applications that might justify this investment and effort.
In this chapter, we discussed the adoption of distributed applications. We contrasted a monolithic system approach with that of distributed services. We pointed out many of the common challenges when considering a distributed approach.

With the introduction behind, we now dive into a much more detailed look at cloud native.
Now, sit back, relax, and let us introduce you the new world of Dapr.

### References

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/dapr-for-net-developers/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
items:
- name: The world is distributed
href: the-world-is-distributed.md
displayName: distributed system, distributed application, microservice, monolithic
displayName: distributed system, distributed application, distributed architecture, microservice, SOA, monolithic, monolithic architecture