This article introduces the selection of common technical components for microservices architecture.

Development of language

  • JAVA, the mainstream programming language, is suitable for building large background services
  • Golang Go is Google’s second open source programming language released in 2009. Optimized for programming multiprocessor system applications, programs compiled using Go are as fast as C or C++ code, while being more secure and supporting parallel processes. Google has high hopes for Go. Its design is to make the software give full play to the advantages of multi-core processor synchronous multitasking and solve the trouble of object-oriented programming. Currently as the cloud computing field of choice!

The development tools

  • IntelliJ IDEA JetBrains products, intelligent code assistant, J2EE support, various versions of tools (Git, SVN, Github, etc.), JUnit, CVS integration, etc. Multi-language support, the free version only supports a few languages such as JAVA. The flagship version is a paid version, while offering a free version (less functional than the flagship version).

  • VS Code is a free, open source, high-performance, cross-platform, lightweight Code editor that does a great job in terms of performance, language support, and the open source community.

Development technology

The framework

  • Alibaba: Spring Cloud is an ordered collection of frameworks. It takes advantage of the development convenience of Spring Boot to subtly simplify the development of distributed system infrastructure and provide a full range of microservices solutions.

  • RPC RestTemplate/WebClient: Spring RestTemplate is a client provided by Spring for accessing Rest services. GRPC: GRPC is a high-performance, cross-language RPC framework based on HTTP2 protocol, based on the Protobuf 3.x RPC framework. Multilingual support; Link reuse is supported, and long links can be used in the cluster. Simple performance tuning can meet the requirements of most service scenarios.

  • Distributed transaction Seata: Alibaba key open source project, Java development, high performance, no lock, code non-invasive AT mode 0 code, support MT mode non-transactional storage, active community, version update fast, easy to use!

  • Flow control, fuse downgrade Sentinel: Alibaba key open source project, Java development, convenient secondary development, active community

The middleware

  • Kong: Kong is a highly available API Gateway project written based on Nginx_Lua module, easy to expand by Mashape open source. Excellent performance, rich plug-in basic out of the box, two open a certain threshold of use.

  • Nacos: Alibaba’s key open source project, which can also serve as a registration/center configuration center, simplifies the technology stack, has a perfect management interface, Java development, convenient secondary development, active community, CP mode, and is still constantly updated and iterated. Apollo: a distributed configuration center developed by the Framework department of Ctrip. It can centrally manage configurations in different environments and clusters, and push configurations to applications in real time after modification. It has standardized permissions and process governance features, and is suitable for micro-service configuration management scenarios.

  • Service discovery Nacos: Alibaba’s key open source project, which can also serve as the registration/center configuration center, simplifies the technology stack, has a perfect management interface, Java development, convenient secondary development, active community, CP mode, and is still constantly updated and iterated. Zookeeper: Zookeeper is a distributed, open source distributed application coordination service. It is an open source implementation of Google’s Chubby and an important component of Hadoop and Hbase. It can meet the requirements of large-scale service discovery and configuration centers, and is not suitable for large-scale real-time data synchronization scenarios.

  • Monitor Prometheus: A comprehensive open source monitoring system, CNCF technology stack, community active Grafana: Grafana is an open source metrics and visualization suite. A front-end tool for pure Javascript development that displays custom reports, display charts, and more by accessing libraries such as InfluxDB. Most are used for monitoring temporal data, similar to Kibana. Grafana’s UI is more flexible, rich in plug-ins and powerful. The interface is simple and beautiful, and supports free customization. The community has rich Dashboard support.

  • SkyWalking: distributed tracking system, domestic link tracking, rich community documentation!

  • Log collection EFK: Distributed service log processing, convenient expansion.

Component library

  • Serialized Jackson: Spring preferred, stable and secure. Protobuf: Protocol Buffer(abbreviated for Protobuf) is a lightweight and efficient structured data storage format developed by Google. It can be used for serialization of structured data and is suitable for data storage or RPC data exchange.

tool

  • Maven is an open source project developed by Pure Java under Apache. Maven is a project construction and management tool. It provides methods to help manage builds, documentation, reports, dependencies, SCMS, releases, and distributions. You can easily compile code, manage dependencies, manage binary libraries, and so on.

  • Postman: Postman is a powerful Chrome extension that supports almost all types of HTTP requests.

  • Container Docker is an open source application container engine, which is based on the Go language and complies with the Apache2.0 protocol. Docker allows developers to package their applications and dependencies into a lightweight, portable container that can then be distributed to any popular Linux machine, as well as virtualization. Docker can bring the following advantages: 1. Faster delivery and deployment; 2. 2. Efficient deployment and expansion; 3. Higher resource utilization; 4. Simple management

  • Cluster management Kubernetes: Kubernetes is an open source platform for automated deployment, expansion, and operation and maintenance of container clusters. With Kubernetes, you can respond to user needs quickly and efficiently; Deploy your application quickly and predictably; Scale-up your application; Seamless new application features; Saves resources and optimizes the use of hardware resources. Provides a complete open source solution for container choreography management. Rich ecology, easy to expand; Rich and stable functions, big company endorsement; Easy to get started.

Runtime environment

  • Operating system: Linux

    : Linux is a unix-like operating system that is free to use and spread freely. It is a multi-user, multi-task, multi-threading and multi-CPU operating system based on POSIX and Unix. It can run major UNIX tools, applications, and network protocols. It supports both 32-bit and 64-bit hardware. Linux inherits the design idea of Unix taking network as the core, and is a stable multi-user network operating system.

  • Web server Tomcat<8+> : Tomcat server is a free open source Web application server, belongs to the lightweight application server, in small and medium-sized systems and concurrent access users are not many occasions is widely used, is the first choice for developing and debugging JSP programs. Nginx: lightweight Web server/reverse proxy server and email (IMAP/POP3) proxy server NodeJs: server-side JavaScript environment

Here for everyone to prepare a small gift, pay attention to the public number, enter the following code, you can get baidu network disk address, no routine to receive!

004: “Internet Architecture Teaching Video” 006: “SpringBoot Implementation of Ordering System” 007: “SpringSecurity combat video” 008: “Hadoop combat teaching video” 009: “Tencent 2019Techo Developer Conference PPT” 010: wechat communication group