abp vNext Micro Services Framework Analysis

Heat abp vNext new framework has been very high, so recently started a micro vNext service Demo done a lot of research. My experience is, vNext's micro Services Architecture is certainly a more mature, but very difficult to get started, no micro-services personnel for .net development experience is almost not read, so after some research here to do some simple analysis easy to quickly understand and use the novice.

difficulty

Before starting the analysis first introduced to the difficulty of this framework, there is no experience in the development of micro-services may have to be studied less difficult.

A difficulty : identity server4 authentication framework, which is based on the .net core identity identity mechanism extensible framework, vNext micro-service authentication service is based on the framework. The official document: http://docs.identityserver.io/en/latest/

Two difficulties : ocelot gateway framework, vNext use the framework to provide a unified gateway address, vNext carried to the gateway classified into internal gateway, the gateway backstage management, public gateways agents were different downstream micro-services. The official document: https://ocelot.readthedocs.io/en/latest/

Difficulties three : docker container management, service development micro commonly applied to container technology, rapidly build and deploy the technology can achieve based, greatly improving the efficiency of micro-services team, if you want selection of micro-services technology, the difficulties must be overcome .

Difficulties summary

Cited above vNext important difficulties which identity server4 identity services framework is the most important, but also very difficult. Currently on the framework document is not a lot, so I want to use vNext actual development, ids4 framework should first study. ocelot gateway configuration relatively simpler, there is no need to configure a separate database ocelot, as long as the respective downstream micro-configured service address can be, started faster. docker container and build deployment belong DevOps, if the company money to buy a server Azure, Azure is very professional but expensive, if an ordinary purchase cloud services it can only be built by Jenkins himself.

MicroserviceDemo service analysis

abp vNext service Demo micro provide more public services and a Micro products and services, namely the identity of authorized service (AuthServer), backstage Management Gateway Service (BackendAdminAppGateway), Interior Gateway Service (InternalGateway), portal gateway service (PublicWebSiteGateway), blog service (BloggingService), user management services (IdentityService), goods and services (ProductService). On the basis of these services can be done on a variety of business development, has vNext document is still not perfect, the proposed business development being integrated in the product service. Here is the beginning of the above services are introduced, MicroserviceDemo there are several other services that do not have access because it is not introduced.

Services stratified

MicroserviceDemo stratified micro service, the service layer includes minute (microservices), the gateway layer (Gateways), the application layer (Applications) and a module layer (modules).

Micro service layer (microservices):

MicroserviceDemo service offers three micro-micro-services layer, namely: IdentityService (user), BloggingService (blog), ProductService (product). IdentityService provides user and role information management, but the interface is not in the service, vNext in the bottom of the interface module, ie volo package, this implementation may be somewhat flexible in the future custom development. BloggingService services provide blog management, service management interface is no longer implemented. ProductService services provided goods and services are the same, the service and there is no interface, just publishing interface module layer product module out of the equivalent of Host host ProductManagement.

The three micro-services can be deployed separately, can also be deployed in the service published interfaces can be called directly by docker cluster, but it is recommended not to invoke a separate service interfaces, preferably through a gateway calls. docker deployment effect:

The actual development of these projects without basic changes, because there is no business code within the project, the only global Autofac dependency injection framework for registration and identity and .net core pipeline register.

 

Layer Gateway (gateways):

gateway services are Gateway service, if you want to develop back-end management system (B-side), just to provide auth-server and backend-adminapp-gateway port to the front end can be. public-website-gateway is a portal gateway service provider blog and reception (C-terminus) website Unified Gateway; internal-gateway is an interior gateway service to provide micro-services system calls, the service does not provide api interface can only be invoked within the system; backend-adminapp-gateway is a background management system gateway provides the B-side systems unified gateway. Gateway project structure is very simple in understanding ocelot configured, check the configuration of downstream services you can use.

Application layer (applications):

MicroserviceDemo also provides a simple application service implementation, namely: AuthServer.Host (Identity Services), BackendAdminApp.Host (back-end web application), ConsoleClientDemo (console application), PublicWebSite.Host (public web applications). AuthServer among the most important, is the core of the whole micro-service, integrated identity server4 AuthServer framework that provides micro-authorized service unified identity authentication. AuthServer provides a simple login page and jump serve, but these are based on mvc development, if you want to change is necessary for the development of spa .net core identity mechanisms and ids4 framework is very understanding. Since I intend to direct instead spa project, so the back of the application no longer introduced, if interested in comparing mvc can understand.

Module layer (modules)

Module layer service code is implemented layer, which layer may be implemented according to various needs of business systems, such as CRM, OMS, ERP and the like. Module layer using ddd architectural style, the same style and aspnet zero, with ddd escort, I believe that behind the business development will be very smooth, later I will introduce the actual business development module.

 to sum up

Here abp vNext micro-services introduced over the basic framework, the framework to successfully deploy and description of the actual development itself complete and powerful, has recently also vue-element-admin login framework and vNext access, and there will be more comprehensive follow-up all-end reports, and interested friends can continue to the next concern. In short oaks from little acorns, just think of ways to boundless possibilities for .net want to enter the field of micro-services siege lion, abp vNext is the choice of learning.

Guess you like

Origin www.cnblogs.com/yanglang/p/11856697.html