Readers should have the basics:

– Have some practical experience in microservices and have used more than one microservice development framework – have a certain understanding of Service Mesh, know what it is and how it works; Can share to know through my past [Service Mesh in the practice of public cloud huawei] (https://gitbook.cn/books/5a1e7dca387c5b4ee351790b/index.html)

Topic scope:

– ServiceComb contains the microservice development framework and supporting management side services. It is a set of microservice solutions, but it does not solve DevOps, application life cycle management, etc. No discussion here.

background

2018 is known as the year of Service Mesh, with an endless stream of service mesh products and more and more vendors participating in providing their own solutions.

One of them, Istio, has even become synonymous with service grid. But what I see so far is that after two years of development, ISTIO has not yet been used in large-scale production.

Spring Cloud, Dubbo and other frameworks that have been developed for many years still have a backlog of users, and it is not easy to switch to the service grid, because this inevitably means that two solutions exist together, so how to smooth the transition to the service grid is also the concern of the users of these frameworks.

In this post I’ll talk about Apache Service Ecomb’s practice of integrating development frameworks with service grids, and see how Spring Cloud can make a smooth transition to service grids.

ServiceComb architecture and implementation mechanism

Apache ServiceComb this year launched a service grid (https://github.com/apache/servicecomb-mesher), [a] configuration management (https://github.com/apache/servicecomb-kie), and other new services.

After seeing the rise of service grid in 2017, we started the research and development of service grid. At the end of this year, it went online for commercial use in Huawei cloud. This year, we donated it to Apache Foundation as an open source, and improved the multi-language capability of ServiceComb.

Thanks to our original accumulation in the development of ServiceComb (Go, Java language development framework), we quickly developed the service grid based on the original GO microservice development framework, so as to achieve multi-language access.

This is a panoramic view of the current components. Mesher is a service grid solution that connects services to distributed systems and connects with microservices developed by Go Chassis and Java Chassis.

Service center

Register a discovery center, manage metadata such as microservices and version information, and manage open API documents generated by the framework. This also greatly enhances the cooperation efficiency between the team, according to the document to carry out client development, testing.

Kie

A universal configuration management center, currently an independent service, will be connected to the configuration management center in the future, so that users can conduct configuration management (fusing, limiting traffic and other rules) in a unified center, and can manage the configuration of services.

Go Chassis and Java Chassis

Both frameworks implement consistent features to ensure a consistent user experience, such as fusing and limiting traffic. Open API documentation is automatically generated from the code and uploaded to the Service Center

Taking the go Chassis implementation as an example, the basic operation mechanism is as follows:

Different protocol requests are sent to each protocol Server. The Server converts the specific protocol request to the Invocation unified abstract model and sends it to the Handler chain. In this chassis, many handlers have been implemented by default, such as fuse breaker and flow limiting. Finally, it enters the Transport handler and transfers to the target using the specific protocol client.

The generated monitoring data is exported through the HTTP API and collected by Prometheus

Archaius is a dynamic configuration framework that can read configurations from various sources, such as kie.

Mesher

In the service grid scheme, Mesher can be quickly established on the basis of Go Chassis because of the concept of Go Chassis

The Invocation is not protocol-aware, the protocol can be translated to the Invocation, and all the microservice management is based on the Invocation standard, so these functions can be fully reused, just need to extend the Server implementation. After the request is translated by the broker service, the subsequent code can be reused. Mesher currently supports GRPC and HTTP protocols based on this framework, as well as developer customization.

Spring cloud

Provide [spring cloud extensions] (https://github.com/huaweicloud/spring-cloud-huawei), which can make its access to management ServiceComb surface, Help Spring Cloud users smooth the transition to multi-language, service grid, Java is no longer the only choice to develop microservices, smooth the transition to use go language or NodeJS, and free part of the development team from the framework.

.Net

Mesher support. Net applications are connected to the service grid and can be connected with other languages to be governed under a system.

Use ServiceComb to build microservice systems

ServiceComb can be deployed independently and is not bound to the deployment system. It can be deployed on VMS, containers, and Kubernetes platforms with low deployment restrictions.

Unified microservice solution can get through the capabilities of various business services within the company, constantly reuse the current capabilities, to respond to the demand faster and do more business integration through the data exposed by the business, so as to build a more powerful business platform.

I use a practical example to illustrate users’ experience with ServiceComb.

Mace medical

After years of ACCUMULATION of PHP technology, many programs are BASED on PHP, which is very difficult to be transformed into micro-services. Meanwhile, the newly developed business based on Java technology needs to be rapidly developed to cope with market changes. So microservitization is very important in order for services to work together.

Java can adopt Java Chassis for microservitization. For the existing PHP business, it is required to be stable, do not touch the business code, and complete microservitization with zero intrusion. For newly developed services, high performance is required, which is detailed to service governance and monitoring. In this scenario, a unified microservices solution becomes critical.

Here is the transformed architecture

Income after transformation:

Java Chassis is a high-performance Java microservice development framework. With the improved performance, PHP, as a dynamic language, is difficult to bear the future growth of business volume. More language choices mean that business teams can freely choose the language suitable for service implementation and implement governance in a unified system. External exposure Edge Service, a gateway development framework, is deployed on the same network with services to expose Service capabilities to other applications.

Tongji university,

The original system is an independent chimney-type monomer, and its business capabilities cannot be reused. In order to cope with changing demands, the monomer needs to be split and microservitized to quickly reuse the decouple existing business capabilities. Nodejs is selected for development in the foreground, and service grid is used for access, while Java Chassis is used for development in the background.

Tongji uses a variety of cloud services to build its own platform services, among which EI service, cloud container engine and other commercial solutions are not included in this topic. The microservice engine is the commercial solution name for ServiceComb.

Why is a development framework still necessary

Not all services will fit into the service grid. As the service grid is an application proxy service, the data replication between the user mode and the kernel mode leads to performance degradation, and the degree of degradation is basically related to the payload size transmitted by a request invocation. The larger the performance degradation is, the more obvious the performance degradation is. At smaller sizes, the performance degradation is minimal. Therefore, it is best not to apply the service grid to interfaces that handle large requests with high concurrency, such as images and large amounts of data. Development frameworks are still preferred for this scenario.

Even with user mode stack, to avoid the kernel mode user mode switching and data copy, but it is/is not a perfect solution, (https://blog.cloudflare.com/why-we-use-the-linux-kernels-tcp-stack/), So in some scenarios, using a service grid will always result in performance degradation, and there is currently no good solution.

With ServiceComb, you can start with a full service grid for a new project and consider optimizing with a development framework when you hit performance bottlenecks.

conclusion

ServiceComb’s years of experience in microservices enabled us to quickly respond to the rise of the service grid and quickly build a development framework and service grid integration solution. Performance requirements can be met using the framework and are compatible with other languages. Users of Spring Cloud can also plug into Service ecomb and use the Service Grid or go language framework.

Why architectural design is so important is that it helps you solve non-functional problems, and helps your business succeed.

As an architectural pattern, microservices provide an architectural guide and a best practice. And the introduction of the model to help you solve the problem at the same time it introduces some problems need to solve, need a powerful framework to help you to complete the structure transformation, make you more focused on business functions, from architecture design input, ServiceComb micro service solution is to solve the complexity of the micro services.

One of the great values that microservitization brings to business is that it can decouple and reuse the internal business capabilities of enterprises, opening up data and quickly responding to changing market demands. However, with the development of many years, companies usually accumulate a lot of technology stacks and languages, and there is no relationship between these systems (i.e., heterogeneous systems), so data cannot be connected. It has become an urgent problem to integrate these businesses and break the chimney. ServiceComb provides a complete solution in this regard. It can be used for enterprise transformation.

For readers who want to learn more about ServiceComb, read our project introduction to Getting involved in the community:

– https://github.com/apache/servicecomb-mesher: Service grid – https://github.com/apache/servicecomb-kie: configuration management center – https://github.com/go-chassis/go-chassis: Go micro service framework – https://github.com/apache/servicecomb-java-chassis: Java micro service framework