面向.NET开发人员的Dapr——前言

2023-11-05 23:58

本文主要是介绍面向.NET开发人员的Dapr——前言,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Foreword

前言

With the wave of cloud adoption well underway, there is a major shift happening towards “cloud native” development, often built with microservice-architectures. These microservices are both stateless and stateful, and run on the cloud and edge, embracing the diversity of languages and frameworks available today. This enterprise shift is driven by both the market forces of faster time to market, as well as the scale and efficiencies of building services for the cloud. Even before COVID-19, cloud adoption was accelerating for enterprises and developers were being asked to do even more to deliver on building these distributed system applications, and that has only accelerated since. Developers in enterprises seek to focus on business logic, while leaning on platforms to imbue their applications with scale, resiliency, maintainability, elasticity, and the other attributes of cloud-native architectures, which is why there is also shift towards serverless platforms that hide the underlying infrastructure. Developers should not be expected to become distributed systems experts. This is where Dapr steps in to help you, whether you are building on infrastructure such as Kubernetes, or on a serverless platform.

随着云采用浪潮的发展,我们在 "云原生" 开发方面发生了重大转变,通常使用微服务体系结构构建。这些微服务可以是无状态也可以是有状态的,可以在云上运行也可以在边缘上运行,从而支持当今可用的各种语言和框架。驱动企业转型因素是,更快速地回应市场需求,以及构建云服务的规模和效率。即使在 COVID-19 之前,企业和开发人员仍需要做更多的工作来交付这些分布式系统应用程序,而自那以后,云的采用速度就加快了。企业中的开发人员寻求专注于业务逻辑,同时学习依靠平台为其应用注入扩展、弹性、可维护性、灵活性以及云原生架构的其他特征,这就是为什么也出现了向无服务平台(隐藏基础设施架构)的转变原因。不应期望开发人员成为分布式系统专家。 无论您是在 Kubernetes 等基础设施上构建,还是在无服务平台上进行构建,Dapr 都在此介入帮助您。

Dapr is designed as an enterprise, developer-focused, microservices programming model platform with the mantra “any language, any framework, run anywhere”. It makes building distributed applications easy and portable across any infrastructure, from public-cloud, through hierarchical edge, and even down to single node IoT devices.  It emerged from both our experiences building services in Azure as well as time spent working with customers building applications on Azure Kubernetes Service and Azure Service Fabric. Over and over, we saw common problems that they had to address. It became clear that there was a need to provide a “library” of common microservice best practices that developers could use, not only in new greenfield applications, but also to aid in the modernization of existing applications. In the containerized, distributed, and networked cloud native world, the sidecar model has emerged as the preferred approach, in the same way DLLs are preferred in the client/server generation. Using Dapr’s sidecar and APIs give you, as a developer, all the power of distributed systems functionality, with the ease of a single HTTP or gRPC local call.

Dapr 是一种以开发人员为中心的企业级微服务编程模型平台,其口号是"任何语言、任何框架、随处运行"。它使得跨任何基础设施、公有云、分层边缘,甚至是单节点 IoT 设备构建分布式应用程序变得简单、可移植。它体现我们在 Azure 中生成服务的经验,以及与客户在 Azure Kubernetes 服务和 Azure Service Fabric 上构建应用程序所做的努力。同时,我们看到了他们必须解决的常见问题。显然,需要提供一种可供开发人员使用的微服务最佳实践的"库",不仅可以用于开发新应用,还可以帮助应对现有应用程序的现代化改造。在容器化、分布式和网络云原生世界中,边车模式已成为首选方式,其方式与在客户端/服务器生时代中首选 Dll 的方式相同。使用 Dapr 的边车和 Api,为开发人员提供了分布式系统功能的所有能力,只需使用 HTTP 或 gRPC 本地调用。

To address the wide range of scenarios that developers face, Dapr provides features such as state management, service to service invocation, pub/sub and integration to external systems with I/O bindings, which are based on the triggers and bindings of Azure Functions. These in turn take advantage of Dapr’s component model which allows you to “swap out”, say different underlying state stores, without having to change any code, making code more portable, more flexible and allowing for experimentation of what best suits your needs. Developers don’t need to learn and incorporate service SDKs into their code, worry about authentication, secret management, retries or conditional code that targets specific deployment environments.

为了解决开发人员面临的各种情况,Dapr 提供了状态管理、服务到服务调用、发布/订阅和与外部系统的集成(基于输入/输出绑定)。它们利用了 Dapr 的组件模型,允许您可以替换(例如不同的底层状态存储),而无需更改任何代码,使代码更具可移植性,更具灵活性,并允许实验什么最适合你的需要。开发人员无需了解服务 Sdk 并将其合并到代码中,无需担心身份验证、机密管理、重试或特定部署环境相关的条件代码。

This book shows how Dapr reduces your development time and overall code maintenance by incrementally “Daperizing” the canonical .NET reference application, eShop. For example, in the original eShop implementation, significant amounts of code were written to abstract between Azure Service Bus and RabbitMQ for publishing events between services. All this code can be discarded and simply replaced with Dapr’s pub/sub API and component model which had an even wider range of pub/sub brokers, rather than just two. Dapr’s actor model, when used in the reworked eShop application, shows the ease of building long running, stateful, event driven, workflow applications with all the difficulties of concurrency and multi-threading removed. By the end of this book, you will see the drastic simplification that Dapr brings to your application development, and I firmly believe all developers embarking on a cloud native app building journey should leverage Dapr.

本书说明了 Dapr 如何逐步简化 标准.NET 参考应用程序 eShop,来缩短开发时间和总体代码维护。例如,在原始 eShop 实现中,编写大量代码来抽象Azure 服务总线和 RabbitMQ,以在服务之间发布事件。所有这些代码都可以丢弃,只需替换为 Dapr 的 订阅/发布 API 和组件模型,订阅/发布代理有很多种,不只是两个。在修订的eShop 应用程序中使用时,Dapr 的执行组件模型可让你轻松构建长时间运行、有状态、事件驱动的工作流应用程序,同时移除了并发和多线程处理的所有难题。本书结束后,您将看到 Dapr 为您的应用程序开发带来的极大简化,我坚信所有踏上云原生应用构建之旅的开发人员都应该利用 Dapr。

We publicly announced Dapr with the v0.1 release in Oct 2019 and now, a year and half later, I am thrilled to say that Dapr is ready for production usage with the v1.0 release. Getting Dapr to v1.0 has truly been a community effort. It has been amazing to see the open-source community coalesce around Dapr and grow since it was first announced – from 114 contributors in October 2019 to over 700 in early 2021 - a six-fold increase in 16 months! Contributions to the project have gone to every Dapr repo and have ranged from opening issues, commenting on feature proposals, providing samples, and of course contributing code. The parts of the project community members have contributed to the most include the Dapr runtime, docs, CLI, SDKs and the creation of a rich ecosystem of components. Maintaining this openness is critical to Dapr’s future.

我们已在2019年10月推出了 Dapr 的0.1 版发布,现在,我兴奋不已说 Dapr  V1.0已准备就绪以供生产使用。发布Daprv1.0确实是社区努力的结果。自Dapr首次宣布以来,Dapr开源社区联合起来并不断发展壮大,令人惊叹——从2019年10月的114个贡献者增加到2021年初的700多个——在16个月内增长了6倍!对项目的贡献已提交到每个 Dapr 存储库,包括打开问题、评论功能提案、提供示例,以及贡献代码。 项目社区成员贡献最大的部分包括 Dapr 运行时、文档、CLI、SDK 和创建丰富的组件生态系统。保持这种开放性对Dapr的未来至关重要。

Dapr is really just getting started, though, and you should expect to see more Dapr capabilities and more support for Dapr in Azure services. I hope that you will take advantage of Dapr to enable you to focus on your core business logic and accelerate your microservices development. I am are excited to have you join us in the Dapr community on this journey at https://github.com/dapr/ and on Discord https://aka.ms/dapr-discord.

不过,Dapr 刚刚开始,你应该期待更多的 Dapr 功能,并在Azure 服务中为 Dapr 提供更多支持。我希望您能够利用 Dapr 来使您能够专注于核心业务逻辑,并加速微服务开发。我很高兴有你加入我们Dapr社区的:https://github.com/dapr/ 旅程和https://aka.ms/dapr-discord 。

Modern distributed systems are complex. You start with small, loosely coupled, independently deployable services. These services cross process and server boundaries. They then consume different kinds of infrastructure backing services (databases, message brokers, key vaults). Finally, these disparate pieces compose together to form an application.

现代分布式系统非常复杂。首先,你从小的、松散耦合且可部署的服务开始。这些服务跨进程和服务边界。然后,它们使用不同类型的基础设施支持服务 (数据库、消息代理、key vault) 。最后,这些分散的部分组合在一起构成应用程序。

Mark Russinovich Azure CTO and Technical Fellow Microsoft

马克·鲁西诺维奇 Azure CTO微软技术研究员

这篇关于面向.NET开发人员的Dapr——前言的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/353273

相关文章

C#借助Spire.XLS for .NET实现在Excel中添加文档属性

《C#借助Spire.XLSfor.NET实现在Excel中添加文档属性》在日常的数据处理和项目管理中,Excel文档扮演着举足轻重的角色,本文将深入探讨如何在C#中借助强大的第三方库Spire.... 目录为什么需要程序化添加Excel文档属性使用Spire.XLS for .NET库实现文档属性管理Sp

C#借助Spire.XLS for .NET实现Excel工作表自动化样式设置

《C#借助Spire.XLSfor.NET实现Excel工作表自动化样式设置》作为C#开发者,我们经常需要处理Excel文件,本文将深入探讨如何利用C#代码,借助强大的Spire.XLSfor.N... 目录为什么需要自动化工作表样式使用 Spire.XLS for .NET 实现工作表整体样式设置样式配置

Java AOP面向切面编程的概念和实现方式

《JavaAOP面向切面编程的概念和实现方式》AOP是面向切面编程,通过动态代理将横切关注点(如日志、事务)与核心业务逻辑分离,提升代码复用性和可维护性,本文给大家介绍JavaAOP面向切面编程的概... 目录一、AOP 是什么?二、AOP 的核心概念与实现方式核心概念实现方式三、Spring AOP 的关

C#利用Free Spire.XLS for .NET复制Excel工作表

《C#利用FreeSpire.XLSfor.NET复制Excel工作表》在日常的.NET开发中,我们经常需要操作Excel文件,本文将详细介绍C#如何使用FreeSpire.XLSfor.NET... 目录1. 环境准备2. 核心功能3. android示例代码3.1 在同一工作簿内复制工作表3.2 在不同

在.NET项目中嵌入Python代码的实践指南

《在.NET项目中嵌入Python代码的实践指南》在现代开发中,.NET与Python的协作需求日益增长,从机器学习模型集成到科学计算,从脚本自动化到数据分析,然而,传统的解决方案(如HTTPAPI或... 目录一、CSnakes vs python.NET:为何选择 CSnakes?二、环境准备:从 Py

C#使用Spire.Doc for .NET实现HTML转Word的高效方案

《C#使用Spire.Docfor.NET实现HTML转Word的高效方案》在Web开发中,HTML内容的生成与处理是高频需求,然而,当用户需要将HTML页面或动态生成的HTML字符串转换为Wor... 目录引言一、html转Word的典型场景与挑战二、用 Spire.Doc 实现 HTML 转 Word1

Go语言使用net/http构建一个RESTful API的示例代码

《Go语言使用net/http构建一个RESTfulAPI的示例代码》Go的标准库net/http提供了构建Web服务所需的强大功能,虽然众多第三方框架(如Gin、Echo)已经封装了很多功能,但... 目录引言一、什么是 RESTful API?二、实战目标:用户信息管理 API三、代码实现1. 用户数据

在ASP.NET项目中如何使用C#生成二维码

《在ASP.NET项目中如何使用C#生成二维码》二维码(QRCode)已广泛应用于网址分享,支付链接等场景,本文将以ASP.NET为示例,演示如何实现输入文本/URL,生成二维码,在线显示与下载的完整... 目录创建前端页面(Index.cshtml)后端二维码生成逻辑(Index.cshtml.cs)总结

解决hive启动时java.net.ConnectException:拒绝连接的问题

《解决hive启动时java.net.ConnectException:拒绝连接的问题》Hadoop集群连接被拒,需检查集群是否启动、关闭防火墙/SELinux、确认安全模式退出,若问题仍存,查看日志... 目录错误发生原因解决方式1.关闭防火墙2.关闭selinux3.启动集群4.检查集群是否正常启动5.

解决未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4‘问题

《解决未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4‘问题》:本文主要介绍解决未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4... 目录未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4‘打开pom.XM