Skip to main content

[From users to Committer, participation in the Apache ShenYu community is not far away]

· 4 min read

Introduction of new Committer#

Hello everyone, my name is Tang Zhen. I am currently working in Dmall(Chengdu)E-commerce Co.,Ltd, and I focus on distributed task scheduling and messaging engine. I am very honored to receive an invitation from the Apache ShenYu community to become the Committer of Apache ShenYu. Let me share with you my growth and suggestions during the time I participated in the Apache ShenYu community.

Getting to know the Apache Shenyu community for the first time#

At the beginning of this year, I learned about the Apache ShenYu gateway during the research of the API gateway (hereafter referred to as Apache ShenYu (incubating) by ShenYu). ShenYu has high-performance, multi-protocol, easy to expand, and reactive features, and has provided a variety of plug-ins, out-of-the-box, very potential, I try to learn it.

In addition to the official documents, ShenYu also has source code analysis provided by many community partners, so you can quickly understand the implementation principle on the basis of rapid use. The community is very active, everyone actively reports and fixes bugs encountered, discusses new ideas together, and helps new friends integrate into the community. For the problems encountered in the first use, if you raise an issue or consult in the community exchange area, friends in the community will actively answer your doubts. These documents and community friends helped me quickly get started with the ShenYu gateway, and also made me feel the friendly and positive atmosphere of the ShenYu community.

Open source is not far away#

When I first read the source code of ShenYu, I saw that the code was a bit redundant and could be streamlined. Based on this, I wanted to create an issue, and worried that the optimization was too small to be accepted by the community. After tangled up, I still created an issue based on the previous issue format to express my thoughts. After a short while, I received feedback from the community, encouraging me to submit a PR to optimize this code. I followed the community's contribution guide and completed this small optimization step by step. The new PR was quickly merged and I saw myself in the Contributor list. This is the transition from ordinary users to contributor. Although it is simple, it motivates me a lot and makes me feel that open source is not far away.

After that, I became more and more familiar with ShenYu's code, and the relationship between the various modules was gradually sorted out. And I learned a lot of elegant design ideas from the project. During the period, I occasionally found some bugs, code and functions that can be optimized. I took the initiative to put forward issues to fix and improve these problems. The Committer of the community will review the code very carefully every time and give some suggestions for improvement. Later, I also participated in the construction of the official website of the community, writing and improving documents.

The ShenYu community is open and inclusive. Some tasks are often released, and many of them are suitable for novices. In fact, they are to help more people integrate into the community. You can follow the community mail, issue, WeChat group, etc. to receive tasks, have a goal to complete, and get familiar with the project faster. At the same time, the community has an open weekly meeting, everyone can participate in, and you can understand the current function development progress of ShenYu, and the community's planning.

After becoming Committer, in addition to continuing to follow up on issues in the community, I will also actively think about and participate in the development of some new features, and strive to make more contributions to the community and grow together with the community.

Some suggestions for newcomers#

For those who want to participate in open source, here are some small suggestions:

  • Starting from the official documentation, first use the main functions of the project to have an overall understanding. Then refer to some source code analysis articles in the community to understand the details of the internal implementation. There may be some small difficulties at the beginning. You can start with a simple small issue and gradually participate in the contribution of the community.

  • Boldly put forward your ideas, whether it is code structure, new functions, or questions about use, you can raise them. The form of contribution is not limited to code, but also includes documentation, active participation in feature discussions, helping other friends to answer questions, and so on.

  • Actively pay attention to the community, receive the tasks released by the community, and communicate with other people in the community if you have any questions about the implementation.

【Release the first version of Apache ShenYu(Incubating)2.4.0】 Make API gateway easy

· 14 min read

[Release the first version of Apache - 2.4.0] Make API Gateway Simple#

Disclaimer: In this article, Apache ShenYu refers to Apache ShenYu (incubating) Author: Xiao Yu Apache ShenYu(incubating) Founder && PPMC 2.4.0 Release Manager: Zhang Yonglun Apache ShenYu(incubating) PPMC && Apache ShardingSphere PMC

The Apache ShenYu gateway is renamed from the original Dromara/soul gateway after donated to the Apache foundation. The 2.4.0 version released this time is the first version after the Apache ShenYu gateway enters the Apache Incubator. This version involves many new features,The project name, package name, and maven coordinates are changed.

What Is Apache ShenYu?#

Apache ShenYu is developed using the Java reactor programming method, and is an API gateway with features such as asynchronous, high performance, and cross-language. In terms of flow control, there is an exquisite Admin console, which can precise and dynamic control flow to meet complex business scenarios. In terms of functions, it uses plug-in design ideas and supports many common protocols: such as http/https, Dubbo, Spring Cloud, gRPC, Motan, Sofa, Tars, etc. And built-in very rich function plug-ins, such as circuit breaking, current limit, authentication, access control, firewall, monitoring, parameter change and so on. Its architecture diagram is as follows:

Flow Control#

The control of flow is the soul of the gateway. For flow control, Apache ShenYu has designed two concepts of selector and rule to control the flow.

Selector and Rule are the most soulful things in the Apache ShenYu gateway. Master it, you can manage any traffic.

A plug-in has multiple selectors, and a selector has multiple rules. The selector is equivalent to the first-level screening of traffic, and the rule is the final screening.

For a plug-in, we hope that according to our configuration, the plug-in will be executed only if the traffic meets the conditions.

The purpose of selectors and rules is to allow traffic to perform what we want when certain conditions are met. This kind of rules must first be understood.

The plug-in, selector, and rule execution logic are as follows. When traffic enters the Apache ShenYu gateway, it will first determine whether there is a corresponding plug-in and whether the plug-in is enabled; then it will determine whether the traffic matches the plug-in's selector.

Then determine whether the traffic matches the rule of the selector. If the requested traffic meets the matching conditions, the plug-in will be executed, otherwise the plug-in will not be executed and the next one will be processed.

This is how the Apache ShenYu gateway completes flow control through layers of filtering. The flow chart is as follows:

Traffic filtering#

Traffic filtering is the soul of selectors and rules, corresponding to the matching conditions in the selectors and rules. According to different traffic filtering rules, we can handle various complex scenarios.

Traffic filtering can obtain data from Http requests such as Header, URI, Query, Cookie,

Then you can use Match, =, SpEL, Regex, Groovy and other matching methods to match the data you expected.

You can use the matching strategy of And/Or to add multiple sets of matching. The above are all using SPI design ideas, users can self-expand: For more, please see: https://shenyu.apache.org/projects/shenyu/selector-and-rule/

The process diagram is as follows:

Data synchronization and caching#

In order to improve the performance of the gateway, the Apache ShenYu gateway will cache all flow control rules in the JVM memory.

In the cluster deployment/distributed scenario, Apache ShenYu independently developed a set of Remote synchronization of Admin console data to the JVM memory of each Apache ShenYu gateway node.

Each scheme adopts the design idea of SPI, so that users can choose flexibly. Currently supported schemes are HttpLongPull, Websocket, Zookeeper, Nacos, Consul, ETCD.

The overall process is as follows:

Admin console#

In order to facilitate the user to quickly and conveniently control the flow and all the functional characteristics of the gateway, Apache ShenYu provides a very beautiful Admin console, the user can Chinese and English switch, on this, you can freely control the flow , Start-stop plug-in, Configure different parameters and strategies, these operation changes are synchronized to the gateway's JVM memory through the aforementioned data synchronization principle. The background diagram is as follows:

Menu/data permissions#

The background management of the gateway is agent. For enterprise-level users and cross-departmental applications, Apache Shenyu designs a common authorization control system, including button level menu permissions, and row data level data Permissions. And these permissions are automatically configurable by the administrator.

Protocol Proxy#

Protocol proxy is the core function of the gateway. Currently Apache ShenYu supports http to http/https, Websocket, Dubbo, Spring Cloud, gRPC, Motan, Sofa The conversion of protocols such as Tars, etc. will support TCP, MQTT, MQTT and other protocols in the future.

Divide Plugin#

The Divide plug-in is a plug-in used to specifically proxy http/https/websocket and other methods to request the Apache ShenYu gateway. It has functions such as load balancing, traffic preheating, node discovery, timeout retry, timeout control and so on. If users want to use it, please add the following dependencies in the gateway, and then set it to on in Admin console --> Plugin management --> Divide plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/http-proxy/

<dependency>    <groupId>org.apache.shenyu</groupId>    <artifactId>shenyu-spring-boot-starter-plugin-divide</artifactId>    <version>${project.version}</version></dependency><dependency>    <groupId>org.apache.shenyu</groupId>    <artifactId>shenyu-spring-boot-starter-plugin-httpclient</artifactId>    <version>${project.version}</version></dependency>

Dubbo Plugin#

Dubbo plug-in is a plug-in used by Apache ShenYu gateway to convert http/https requests into dubbo protocol. It adopts the mechanism of Dubbo generalization call, integrates Dubbo client, and has functions such as service discovery, load balancing and so on. To use it, please add the following dependencies in the gateway, and then set it to on in Admin console --> Plugin management --> dubbo plugin, and configure the Registry Center, For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/dubbo-proxy/

 <!-- apache shenyu alibaba dubbo plugin start--> <dependency>   <groupId>org.apache.shenyu</groupId>   <artifactId>shenyu-spring-boot-starter-plugin-alibaba-dubbo</artifactId>    <version>${project.version}</version> </dependency> <!-- apache shenyu apache dubbo plugin start--> <dependency>   <groupId>org.apache.shenyu</groupId>   <artifactId>shenyu-spring-boot-starter-plugin-apache-dubbo</artifactId>    <version>${project.version}</version> </dependency>

SpringCloud Plugin#

The SpringCloud plugin is a plugin for Apache ShenYu gateway proxy SpringCloud microservice business. It integrates the registration center of SpringCloud, and load balancing service, and realizes the proxy of the service. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> SpringCloud plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/spring-cloud-proxy/

 <dependency>   <groupId>org.apache.shenyu</groupId>   <artifactId>shenyu-spring-boot-starter-plugin-springcloud</artifactId>    <version>${project.version}</version> </dependency>

gRPC Plugin#

The gRPC plug-in is a plug-in used by the Apache ShenYu gateway to convert the http/https request into the GRPC protocol. It integrates the GRPC client and implements the proxy of the GRPC service. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> GRPC plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/grpc-proxy/

 <dependency>   <groupId>org.apache.shenyu</groupId>   <artifactId>shenyu-spring-boot-starter-plugin-grpc</artifactId>    <version>${project.version}</version> </dependency>

Tars Plugin#

Tars plug-in is a plug-in used by Apache ShenYu gateway to convert http/https requests into Tars protocol. Tars is Tencent's open source RPC framework. The plug-in integrates the Tars-JAVA client and implements the proxy of the Tars service. If users want to use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> Tars plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/tars-proxy/

  <dependency>    <groupId>org.apache.shenyu</groupId>    <artifactId>shenyu-spring-boot-starter-plugin-tars</artifactId>     <version>${project.version}</version>  </dependency>

Sofa Plugin#

The Sofa plug-in is a plug-in used by the Apache ShenYu gateway to convert the http/https request into the Sofa-RPC protocol. It uses the Sofa generalization call mechanism, integrates the Sofa-RPC client, and has functions such as service discovery, load balancing and so on. To use it, please add the following dependencies in the gateway, and then set it to on in Admin Console --> Plugin Management --> Sofa Plugin, and configure the Registry Center. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/sofa-rpc-proxy/

  <dependency>    <groupId>org.apache.shenyu</groupId>    <artifactId>shenyu-spring-boot-starter-plugin-sofa</artifactId>     <version>${project.version}</version>  </dependency>

Circuit Breaking and Rate Limiting#

Hystrix Plugin#

The Hystrix plug-in is the Hystrix framework integrated with the Apache ShenYu gateway, which provides the function of requesting fuse. The Hystrix fuse parameters can be dynamically configured. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> Hystrix plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/hystrix-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-hystrix</artifactId>   <version>${project.version}</version></dependency>

Sentinel Plugin#

The Sentinel plug-in is the Apache ShenYu gateway integrated with the Sentinel framework, providing the function of requesting fuse current limiting. The Sentinel fuse current limiting parameters can be dynamically configured. If users want to use it, please add the following dependencies in the gateway, and then set it to on in Admin Console --> Plugin Management --> Sentinel Plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/sentinel-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-sentinel</artifactId>   <version>${project.version}</version></dependency>

Resilience4j Plugin#

The Resilience4j plug-in is the Apache ShenYu gateway integrated with the Resilience4j framework, providing the function of requesting fuse current limiting. The Resilience4j fuse current limiting parameters can be dynamically configured. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> Resilience4j plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/resilience4j-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-resilience4j</artifactId>   <version>${project.version}</version></dependency>

RateLimiter Plugin#

The RateLimiter plug-in is the Apache ShenYu gateway using redis to provide the function of requesting cluster current limiting. The current limiting algorithm strategies include: Token Bucket Algorithm, Concurrent Current Limiting, Leaky Bucket Algorithm, Sliding window algorithm. To use it, please add the following dependencies in the gateway, and then set it to on in Admin console --> Plugin management --> RateLimiter plugin, and configure redis. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/rate-limiter-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-ratelimiter</artifactId>   <version>${project.version}</version></dependency>

Security/Authorization#

Waf Plugin#

The Waf plug-in is an Apache ShenYu gateway, which is used to implement a firewall for traffic. It is mainly used to intercept illegal requests or abnormal requests, and to provide related denial policies. It provides the function of black and white list configuration. If users want to use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> Waf plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/waf-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-waf</artifactId>   <version>${project.version}</version></dependency>

Sign Plugin#

The Sign plug-in is the Apache ShenYu gateway, which is used to sign the request. If users want to use it, please add the following dependencies in the gateway, and then set it to Enable in Admin Console --> Plugin Management --> Sign Plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/sign-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-sign</artifactId>   <version>${project.version}</version></dependency>

JWT Plugin#

The JWT plug-in is an Apache ShenYu gateway, which performs authentication judgments based on the token attribute of the http request header or the value carried by the authorization attribute, and is compatible with OAuth2.0. If users want to use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> jwt plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/jwt-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-jwt</artifactId>   <version>${project.version}</version></dependency>

OAuth2 Plugin#

The OAuth2 plug-in is the Apache ShenYu gateway, which is implemented using the Webflux OAuth2 client to support the OAuth2 protocol. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> oauth2 plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/oauth2-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-oauth2</artifactId>   <version>${project.version}</version></dependency>

Personalized Processing#

Rewrite Plugin#

The Rewrite plug-in is the Apache ShenYu gateway, which supports the use of regular expressions to rewrite the URI. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> rewrite plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/rewrite-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-rewrite</artifactId>   <version>${project.version}</version></dependency>

Redirect Plugin#

The Redirect plug-in is a plug-in for the Apache ShenYu gateway to redirect requests. It supports the internal interface and external address of the gateway. To use it, please add the following dependencies to the gateway, and then set it to on in Admin console --> Plugin management --> redirect plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/redirect-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-redirect</artifactId>   <version>${project.version}</version></dependency>

Request Plugin#

The Request plug-in is the Apache ShenYu gateway that allows users to perform functions such as add, modify, and delete to request parameters, request headers and Cookies. If users want to use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> request plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/request-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-request</artifactId>   <version>${project.version}</version></dependency>

Context-Path Plugin#

The Context-Path plug-in is an Apache ShenYu gateway, which allows users to perform add, modify, and delete functions on the Context-Path on the request path. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> plugin management --> context_path plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/context-path-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-context-path</artifactId>   <version>${project.version}</version></dependency>

Param-Mapping Plugin#

The Param-Mapping plug-in is an Apache ShenYu gateway, allowing users to perform functions such as add, modify, and delete fields in the Body in the request body. To use it, please add the following dependency in the gateway, and then set it to on in Admin console --> Plugin management --> param_mapping plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/param-mapping-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-param-mapping</artifactId>   <version>${project.version}</version></dependency>

ModifyResponse Plugin#

The ModifyResponse plug-in is an Apache ShenYu gateway, which is used to perform functions such as add, modify, and delete on the response header, status code, and response content in the request response body. If users want to use it, please add the following dependency in the gateway, and then set it to on in Admin Console --> Plugin Management --> modifyResponse Plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/modify-response-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-modify-response</artifactId>   <version>${project.version}</version></dependency>

Observability#

Monitor Plugin#

The Monitor plug-in is a Apache ShenYu gateway. It uses prometheus to complete the plug-in for monitoring requests, QPS, JVM and other related metrics. To use it, please add the following dependencies in the gateway, and then set it to on in Admin console --> Plugin management --> monitor plugin, and configure the relevant parameters of prometheus. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/monitor-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-monitor</artifactId>   <version>${project.version}</version></dependency>

Logging Plugin#

The Logging plug-in is the Apache ShenYu gateway, which allows the user log to print this request information, including request path, request method, request parameters, response header, response body, etc. Information. To use it, please add the following dependencies to the gateway, and then set it to on in Admin console --> Plugin management --> Logging plugin. For a more detailed introduction, please see: https://shenyu.apache.org/projects/shenyu/logging-plugin/

<dependency>  <groupId>org.apache.shenyu</groupId>  <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>   <version>${project.version}</version></dependency>

Planning For The Next Version#

  • RPC framework grayscale release enhancement, including SpringCloud, gRPC, Dubbo, Sofa-RPC, Tars, etc.
  • Added the ShenYu-Agent module to create observability systems such as the gateway metrics, tracing, and logging.
  • Custom plug-ins are dynamically loaded, which is convenient for users to expand and update quickly and without stopping.
  • Comprehensive coverage of integration testing and unit testing.

Community#

Apache ShenYu is an autonomous community open source project completely dominated by Chinese people. It is currently in a period of rapid development. Function development Complete documentation, fix BUG and many other things need to be completed. The Apache ShenYu community follows the community philosophy of Apache Way and creates a completely open and government community. Every half month, a full community meeting will be held, and the community’s committers, contributors, and users will participate in it, At the meeting, everyone can speak freely and put forward their own views and opinions, such as discussing different functions and different codes, and it is best to reach a consistent point of view. In the Apache ShenYu community, we respect the principle of communication priority of mailing list > GitHub Issue > WeChat group. The main purpose is to keep a record of every problem, no point of view, to better help others, to promote the sustainable development of the community.

[How I became an Apache ShenYu Committer one year after graduation]

· 6 min read

Introduction of new Committer#

Hello, everyone. My name is Liu Liang. I am working as a software development engineer in China Merchants Network Technology Co., LTD. It is my great honor to receive the invitation of Apache ShenYu community to become a Committer of Apache ShenYu. Now I would like to share with you my growth and suggestions during my participation in Apache ShenYu community.

Know Open Source#

After graduation last year, I feel that my skills are far from enough, so I am constantly learning. Along the way, one of the teachers offered the opportunity to participate in an open source project. I started with the idea that working on open source projects would improve my skills and help me get a job.

The open source project involved is Apache ShenYu(Incubating), which is an asynchronous, high-performance, cross-language, responsive API gateway. In the community communication group, there are many active students who actively discuss issues and consciously find bugs.

Participate in the open source#

My first task was to add test cases. Tasks are usually posted as an issue, and if you're interested, reply under the issue. Fortunately, the official community provides an action document that simply follows the steps above, mainly forking the project into its repository, pulling it locally, creating the corresponding issue branch locally, and then actually writing code.

The first task is to write unit tests for the entity class. The solution is to call the get/set method via reflection, and when you're done, submit your code and merge it. This was my first PR contribution to an open source project, and I've been a contributor to open source projects ever since, hahaha.

Then I did other tasks. The second time, I looked back at the code I submitted the first time and found it was different from the one I submitted. I checked the git submission record and found that my code was committer refactored. I took a close look at my code and the refactored code and said, "Well, this is a more elegant way to write it.

In continuing to be involved, I've gained a deeper understanding of Apache ShenYu(Incubator) projects and a greater understanding of the open source culture.

Apache ShenYu(Incubating) committers can often publish tasks through mail, issues, and community groups. I noticed that there was a feature on gRPC optimization that no one had done yet, and was ready to take it on. However, I still remember hesitating for a long time at that time. I don't know what to do with this feature. Can I handle it? GRPC is not used, I can also go to optimize? In constant doubt and denial...... This function is a core part of the project, so it's a rare opportunity. Why not try it first? Finally, I took a step to complete the task.

The next step is how to solve this problem. This is a very specific technical problem, I will not expand, mainly about their feelings. When you encounter a problem, you should first analyze what the specific problem is, where to start to solve it, why the existing solution does not work, and what results to achieve in the end, and communicate with others more. I've also been in constant communication with Apache ShenYu(Incubating) PPMC while I've been working on this issue, to discuss whether my solution is feasible. In the process of research and analysis, I have always backed down, because this problem is not easy for me to do. But PPMC in Apache ShenYu(Incubator) has been encouraging me: There's no time limit on this, you can take your time and talk to others about it. In this way, step by step, constantly consult, finally solved the problem, the submitted code was successfully merged by the project.

And then later, you started in Apache ShenYu(Incubator weekly meetings) to learn what other people are doing, learn about incubating, and learn more about open source culture. I also contributed more to Apache ShenYu(Incubating) in its own website.

Experience in the Apache ShenYu(Incubating) community#

I have been talking about my open source experience in the past. In fact, this is my true inner activity and a process of growth. Since you've been in open source, you've slowly felt more open source charm, and the Apache ShenYu(Incubating) community is in a good mood.

  • Community over Code: Building a good community is more important than writing code. The Apache ShenYu(Incubator) community is also working to improve, to get new users in and lower the threshold where possible;

  • Transparent and open decision making: community development, feature development, and user issues are made public and archived in mailing lists;

  • Equality and respect: focus on the communication of technical community, your contribution determines your authority;

  • Broaden vision: not satisfied with CRUD in daily work, participate in open source, your code will be reviewed, see what is good code, learn more about open source projects, improve personal technical ability;

  • No size of contribution: Whether you complete a core feature, write a test case, build a website, modify documentation, these contributions are the same and will be recognized by the community.

A little advice for the new guy#

If you have friends who are interested in open source, but have not participated in it yet, do you have these problems?

  • If you ask too simple questions, do you seem incompetent? No, people are well prepared for technical discussions, their own questions, have more background information, and the community is happy to respond to you and answer your questions.

  • Newcomers don't know how to participate? The community provides documentation, follows through, and can participate. There are also novice missions that can be directly participated in.

  • No time? The development of the community is personal investment, no commercial interests, members are free time to participate in it, I believe you can also.

  • Too difficult to solve? Talk to people in your community. That's how you develop your skills.

【Soul gateway release milestone version 2.3.0】New support for grpc, tars and sofa protocols!

· 4 min read

It's half a year since the last release. In this half a year, our community friends and I have done too much. Completed nearly 200 PR, published nearly 300 articles of source code analysis, added more than 120 contributors, promoted 7 members of the commiter who won the legitimate JetBrains. We have completed many, many functions With their help. Thank you very much.

soul-admin(dashboard)#

Admin is the control panel of the whole gateway, which is in charge of all traffic and rules matching.

  • The Shiro framework is integrated into admin to complete the permission control in user button level.
  • Templated plug-ins allow users to focus on data configuration without perceiving front-end pages.
  • The internationalization of the whole backend of admin , supports switching between Chinese and English.
  • New support for H2 to store data.
  • Beautiful optimization of admin interface (table, button).
  • New unit tests have been added, with a coverage rate of 70%.

Soul gateway plugin#

New plugins#

  • Add Grpc plugin to fully support grpc protocol.
  • Add Tars plugin to support Tencent tars RPC Protocol.
  • Add sofa plugin supports the sofa RPC Protocol.
  • Add sentinel plugin to integrate the fusing and current limiting function of sentinel framework.
  • Add The resilience4j plugin to integrate the fusing and current limiting function of resilience4j framework.
  • Add the redisect plugin to support user redirection.
  • Add context path plugin to support user-defined context path

plugins optimization#

  • Divide plugin: optimization of node detection mode and flow preheating mode.
  • Ratelimit plugin: add some different current limiting algorithms such as concurrent, leaky bucket and other for users to choose .
  • Sign plugin: fix the bug that URL must be set; add whether to verify flag, which can be used for URI authentication of open platform.
  • Dubbo plugin: add form, URI parameter request, direct connection to registration center , parameter verification and other functions.

Soul Client#

Soul client only provides a client to access the soul gateway with a quick way, which is not necessary. you can configure the rules in Soul admin If you don't use Soul Client.

  • Spring MVC client optimization, support spring, spring boot all versions.
  • Spring cloud client optimization, support spring, spring boot all versions.
  • Dubbo client optimization, support spring, spring boot all versions.
  • Soul grpc client is added to support grpc Java user access.
  • Soul tars client is added to support tars Java user access.
  • Soul sofa client is added to support sofa Java user access.

In the previous version, only HTTP access is supported, but the registry access is added this time.

  • Zookeeper is added as the registration center to access Soul gateway.
  • Nacos is added as the registration center to access Soul gateway.
  • Consul is added as the registration center to access Soul gateway.
  • Etcd is added as the registration center to access Soul gateway.
  • Please refer to https://shenyu.apache.org/en/projects/shenyu/register-center-design/

Soul data synchronization#

  • Fix bugs in Nacos configuration center that do not have namespace set.
  • Optimize websocket synchronization mode.
  • Solve the HTTP long polling synchronous data bug when the soul admin in deployed in cluster

Thanks#

This is a milestone release and a formal change of Soul gateway. Our dashboard, code, documents, issue and PR are all internationalized in English, and the unit test coverage of the whole project has reached 70%.Thank you again for your hard work. Although we have completed a lot of functions (I did not fully list them above), we will have more challenges in the future. I believe that with you, this is not our end, but our starting point.

Join us#

At present, Soul is in the stage of rapid development. If you want to write high-quality code, or want to deeply understand the API gateway, or enjoy the fun of open source, you are welcome to join our community