Abstract

This paper will introduce the overall architecture and characteristics of ServiceComb open source project, the enhanced functions of ServiceComb Release 0.3.0, and the ways and methods of participating in software open source development based on ServiceComb.

On October 26, 2017, Jiang Ning, an expert in the field of Huawei PaaS open source, shared his speech “Introduction to ServiceComb Open Source Project” at ServiceComb Live. IT big said as the exclusive video partner, by the organizers and speakers review authorized release.

Read the word count: 1822 | 4 minutes to read

Video playback of guest speech:
suo.im/3ISGit

Problems facing enterprise application microservices development

Enterprise business logic is complex, how to carry out cross-team collaborative development?

A large number of old system code, how to support its rapid service transformation?

Complex cloud applications, monitoring distribution call tracking problems?

As a fully functional micro-service framework, ServiceComb provides developers with end-to-end application development experience, including application framework code generation, service registration discovery, service configuration management, service monitoring, service call tracing, and multi-communication protocol support. In addition, ServiceComb has the advantages of service contract enhancement, event-driven and other features, and provides distributed transaction tracking capability, which can better solve the problems mentioned above in enterprise application microservices development. ServiceComb adopts the design concept of open architecture and is compatible with various popular micro-service frameworks in the industry. Developers can customize business plug-ins according to their own business requirements.

Meanwhile, Huawei’s microservices engine, a homology of ServiecComb, will go live in a separate public beta in early November.



The ServiceComb runtime contains two core modules. One is the service contract, which is a standard description of Restful services based on the Open API and is language-independent. Service contracts are an important core feature of ServiceComb.

There is also a variety of service extension capabilities, such as service discovery, fuses, load balancing, configuration, and tracing, provided at run time through plug-ins. As microservices exist in the form of independent processes, the microservice framework first needs to guarantee the network calls between services. Meanwhile, because these network calls are unreliable on the cloud, the microservice framework needs to guarantee the reliability of calls between services through fault tolerance and load balancing. In terms of programming model, ServiceComb supports synchronous, asynchronous, Reactive and other programming modes. The communication model here is mainly responsible for serialization of messages and transport protocols.

Why do YOU need a service contract

As a service consumer:

Need to know exactly how to invoke a service?

What do I need to know about the service invocation parameters?

Need to know what is being transmitted?

As a service provider:

Is it difficult to document detailed descriptions?

Is it difficult to provide and maintain standard SDKS?

Providing user support is also inconvenient.

A service contract can be regarded as a transaction or communication contract between producers and consumers. Service contracts can ensure that service consumers and service providers can interact in a mutually agreed manner. The biggest benefit of this is that the code and documentation can be consistent, and the contracts can provide a more specific capability limit for each service, which helps us better coordinate and manage the calls between services.

Service Contract Definition



The ServiceCombJava SDK supports both API First and Code First development modes. Users can flexibly choose them according to their own needs.

Interface contract oriented rather than logic, with tools that can generate related studs or service invocators based on contracts;

Through service contract, the parameters of service invocation and related services can be clearly defined, so that service consumers do not have to wait for the completion of service provider development before related development, which greatly improves the efficiency of application development.

The contract is defined as language neutral, which can generate service code or call code in different languages through related tools.

With the help of related interface tools, API description documents can be automatically generated according to the service interface code, so that the implementation code and the document synchronization;



The ServiceCombJava SDK directly analyzes the Class file of the service interface, obtains Restful interface description information from the code level, and generates contract description information. Currently, the ServiceComb Java SDK supports Spring MVC and JAXRS and other Restful service definition methods.

Ensure system performance through asynchronous event operations



The whole framework is event-driven and handled in an event-loop manner, which brings the biggest benefit of not having too many thread switches. Asynchronous operations can greatly improve application processing efficiency. Currently, the ServiceCombJavaSDK event processing framework supports both Restful and RPC protocols.

Distributed call tracing

The ServiceComb Java SDK supports standard tracing protocols based on Zipkin, as well as @SPAN to extend transaction tracing capabilities.

In the process of concrete implementation we also provide a call chain, based on this call chain we can very convenient query their definition of the processor, docking their required protocol, and then some corresponding tracking.

ServiceComb code base information

Java-chassis: Java version of the microservices framework;

Service-center: service center based on the GO language.

Servicecomb-saga: Long-running transaction processing framework.

New features of the ServiceComb component

Service – Center0.2.0:

An administrative console is provided to manage registered service instances.

Java – Chassis0.3.0:

Support for defining transactions via @span annotations; Http request processing is unified and custom processing of Rest calls is supported.

Saga0.1.0:

A preliminary Saga invocation service is provided, supporting sequential and concurrent invocation processing.

Contribution to the community

Through community feedback, users’ needs can be captured in time and improved quickly and transparently in the community. So please get involved in the community.

The ServiceComb project is fully open source, adhering to the three principles of openness, standards, and ecology from its inception. ServiceComb collaborates with the community in an open source way, and users can participate in community development for any role, be it Developer, Writer, Tester, or User, which is welcome. At the current work load in the making of the community (https://github.com/ServiceComb), the website (https://www.servicecomb.io) and JIRA (https://servicecomb.atlassian.net) , developers and users can look up all the information of the project. ServiceComb is looking for community participation. Users can post issues they find on the issue list or JIRA or start a discussion. They can also claim an issue and contribute PR, either way is very welcome.

Developer can through http://servicecomb.io/cn/developers/ reading guide.

That’s all for today’s sharing, thank you!