使用 .net Framework 4 及更高版本(而不是 .NET Core)的微服务

Microservices using .net Framework 4 and above ( instead of .NET Core)

我是一名 .NET 开发人员,正在尝试学习使用 .NET Framework >4.0 实现微服务。
我从互联网搜索中引用的所有文章,他们都在谈论使用 .NET Core 实现微服务。但我想知道,我找不到任何说明如何使用 .NET Framework >4.0 开发微服务的文章。

我知道 .net core 具有微服务的所有功能和 运行 时间,但我的问题如下 题 - 1. 根本不可能使用 .NET 框架开发微服务吗?如果不是那么所有的约束和限制是什么? 2.如果我们只选择.NET Framework来开发面向微服务的架构,有什么选择 3.任何示例/示例代码都会有所帮助

谢谢

如评论中所述,微服务 (MS) 不受任何语言的约束,它是一种架构原则。

Microservices are a software development technique —a variant of the service-oriented architecture (SOA) structural style— that arranges an application as a collection of loosely coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight.

https://en.wikipedia.org/wiki/Microservices

您可以使用任何语言和各种平台解决方案构建 MS/SOA,但是某些实现当然存在缺点。

你所要做的就是定义一个小服务 A 和另一个小服务 B 作为你的系统,通过轻量级的 REST API(s)(甚至可能是 gRPC)暴露数据并让它们相互通信- 瞧!你有你的 MS 系统。

但是为什么例如微软推动将 .NET Core 用于 MS 系统?我最好的猜测是因为 Docker(和其他容器解决方案),将每个 MS 容器化。 .NET Core 和 .NET Framework 在这方面的区别是容器化,.NET Core 可以 运行 在所有平台上,例如 linux - 而 docker 支持 linux 容器.

In computing, self-contained system (SCS) is a software architecture approach that focuses on a separation of the functionality into many independent systems, making the complete logical system a collaboration of many smaller software systems

https://en.wikipedia.org/wiki/Self-contained_system_(software)

为什么 linux 容器很重要?好吧,我会争论是因为 Kubernetes(或其他容器编排工具)。

Kubernetes (commonly stylized as k8s) is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google, and is now maintained by the Cloud Native Computing Foundation. It aims to provide a "platform for automating deployment, scaling, and operations of application containers across clusters of hosts". It works with a range of container tools, including Docker. Many cloud services offer a Kubernetes-based platform or infrastructure as a service (PaaS or IaaS) on which Kubernetes can be deployed as a platform-providing service. Many vendors also provide their own branded Kubernetes distributions.

https://en.wikipedia.org/wiki/Kubernetes

Kubernetes 是一个非常强大的容器编排系统。我无法随意扩展松散耦合的 MS linux 容器 - 等等。

现在,我建议您继续阅读,一个好的开始是:

阅读

源代码

视频