Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am a .net developer and trying to learn implementing Microservice using .NET Framework >4.0.
All the article that I refer from internet search, they all talks about implementing Microservices using .NET Core. But I wonder, I could not find any article that says how to develop microservice using .NET Framework >4.0.

I knew that .net core has all the features and run time for Microservices but my question is as below Question - 1. Is not possible develop Microservice using .NET framework at all ? If not then what are all constrain and limitation ? 2. What are the alternatives if we choose .NET Framework only to develop Microservices oriented architecture 3. Any example/ sample code will be helpful

Thank you

like image 319
Sam K Avatar asked Mar 03 '23 04:03

Sam K


1 Answers

As mentioned in the comments, microservices (MS) is not bound to any language, it's an architectual principle.

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

You can build MS/SOA with any language and a variety of platform solutions, but there are drawbacks of course to some implementations.

All you do is define a small service A and another small service B to act as your system, exposing data through lightweight REST API(s) (maybe even gRPC) and let them talk to each other - and voila! you have your MS system.

But why are e.g. Microsoft pushing to use .NET Core for MS systems? My best guess would be because of Docker (and other container solutions), to containerize each MS. The difference between .NET Core and .NET Framework in this context is containerization, .NET Core can run on all platforms, such as linux - and docker supports linux containers.

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)

Why are the linux containers important? Well, I would argue because of Kubernetes (or other container orchestration tools).

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 is a very powerful container orchestration system. I't can scale your loosely coupled MS linux containers at will - and so much more.

Now, I'd suggest you to keep on reading, a good start would be this:

Read

  • https://learn.microsoft.com/en-us/dotnet/architecture/microservices/

Source code

  • https://github.com/dotnet-architecture/eShopOnContainers
  • https://github.com/EdwinVW/pitstop

Videos

  • https://www.youtube.com/watch?v=-AfZxdXa7yc
  • https://www.youtube.com/watch?v=qWUINCZHs6E
like image 169
Henkolicious Avatar answered Mar 05 '23 18:03

Henkolicious