diff --git a/docs/architecture/dapr-for-net-developers/index.md b/docs/architecture/dapr-for-net-developers/index.md index 1d4c6e2e0a485..c43d5338d2f1d 100644 --- a/docs/architecture/dapr-for-net-developers/index.md +++ b/docs/architecture/dapr-for-net-developers/index.md @@ -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: @@ -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 diff --git a/docs/architecture/dapr-for-net-developers/media/SOA.png b/docs/architecture/dapr-for-net-developers/media/SOA.png new file mode 100644 index 0000000000000..3dfe1b51878b3 Binary files /dev/null and b/docs/architecture/dapr-for-net-developers/media/SOA.png differ diff --git a/docs/architecture/dapr-for-net-developers/media/cover.png b/docs/architecture/dapr-for-net-developers/media/cover.png index 0ba5d2e6d8025..ff1b7a23e2652 100644 Binary files a/docs/architecture/dapr-for-net-developers/media/cover.png and b/docs/architecture/dapr-for-net-developers/media/cover.png differ diff --git a/docs/architecture/dapr-for-net-developers/media/soa-basic.png b/docs/architecture/dapr-for-net-developers/media/soa-basic.png new file mode 100644 index 0000000000000..cdc5a45f94b60 Binary files /dev/null and b/docs/architecture/dapr-for-net-developers/media/soa-basic.png differ diff --git a/docs/architecture/dapr-for-net-developers/the-world-is-distributed.md b/docs/architecture/dapr-for-net-developers/the-world-is-distributed.md index d45bb3472e982..b97c2775f2cd2 100644 --- a/docs/architecture/dapr-for-net-developers/the-world-is-distributed.md +++ b/docs/architecture/dapr-for-net-developers/the-world-is-distributed.md @@ -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 diff --git a/docs/architecture/dapr-for-net-developers/toc.yml b/docs/architecture/dapr-for-net-developers/toc.yml index 56d8262c7fd2f..45a85c7663fd1 100644 --- a/docs/architecture/dapr-for-net-developers/toc.yml +++ b/docs/architecture/dapr-for-net-developers/toc.yml @@ -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