CN111314212B - API gateway based on Netty and plug-in mechanism and control method - Google Patents

API gateway based on Netty and plug-in mechanism and control method Download PDF

Info

Publication number
CN111314212B
CN111314212B CN202010048489.5A CN202010048489A CN111314212B CN 111314212 B CN111314212 B CN 111314212B CN 202010048489 A CN202010048489 A CN 202010048489A CN 111314212 B CN111314212 B CN 111314212B
Authority
CN
China
Prior art keywords
request
plug
client
module
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010048489.5A
Other languages
Chinese (zh)
Other versions
CN111314212A (en
Inventor
刘志锋
罗伟杰
黄楚龙
卢彬
潘伟健
苏兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingmu Digital Technology Co ltd
Original Assignee
Qingmu Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingmu Digital Technology Co ltd filed Critical Qingmu Digital Technology Co ltd
Priority to CN202010048489.5A priority Critical patent/CN111314212B/en
Publication of CN111314212A publication Critical patent/CN111314212A/en
Application granted granted Critical
Publication of CN111314212B publication Critical patent/CN111314212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an API gateway based on Netty and plug-in mechanism, comprising a request receiving module, a link establishing module, a plug-in module and a service module; the request receiving module is used for acquiring an access cluster request sent by a user; the link establishing module is used for decoding a data packet accessed to the cluster request through the Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool and establishing a service link; the plug-in module is used for judging the request entity through a preset plug-in, filtering the request which does not accord with the preset condition, and sending the request which accords with the preset condition to the service module; the service module is used for sending the request meeting the preset condition to the corresponding processing module according to the type of the request meeting the preset condition so as to complete the processing of the user request, and the high concurrent connection mode of the API gateway is realized by applying the Netty technology, so that more network connection accesses are supported on the basis of lower cost.

Description

API gateway based on Netty and plug-in mechanism and control method
Technical Field
The invention relates to the technical field of information processing, in particular to an API gateway and system based on Netty and plug-in mechanisms.
Background
Under a modern distributed architecture, a large website and an application are necessarily composed of a plurality of types of business function modules, generally, the application is deployed in a distributed cluster mode, a plurality of service providers are necessarily available for reducing the coupling degree, and the number of service resources of each type of service provider is increased and changed along with the increase of the whole system size. Compared with remote service, the request of the client terminal may need to aggregate data from a plurality of service providers, the division and structure of the internal service are changed along with the change of time, and the change of the service necessarily causes the change of the request processing flow, which brings difficulty to the uniform management of the service.
In the internet environment, a distributed service cluster exposes service resources to the outside, and needs to consider the problems of security risk, access control and the like, while a gateway is a front control layer of the cluster, is an edge service of the cluster, shields the change details of an internal cluster to the outside, is essentially control over terminal access information flow, and can realize internal conversion, load balancing, uniform authentication, protocol conversion, monitoring and detection and the like of request information as required.
Disclosure of Invention
The embodiment of the invention aims to provide the API gateway based on the Netty and plug-in mechanism, which applies the Netty technology, realizes a high concurrent connection mode of the API gateway and supports more network connection access on the basis of lower cost.
In order to achieve the above object, an embodiment of the present invention provides an API gateway based on Netty and plug-in mechanisms, including the following steps:
the system comprises a request receiving module, a link establishing module, a plug-in module and a service module;
the request receiving module is used for acquiring an access cluster request sent by a user;
the link establishing module is used for decoding the data packet requested by the access cluster through a Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool and establishing a service link;
the plug-in module is used for judging the request entity through a preset plug-in, filtering the request which does not accord with the preset condition and sending the request which accords with the preset condition to the service module;
and the service module is used for sending the request meeting the preset condition to a corresponding processing module according to the type of the request meeting the preset condition so as to complete the processing of the user request.
Further, the link establishing module comprises a receiving unit and a first processing unit;
the receiving unit is used for randomly selecting one thread in an Acceptor main thread pool as an Acceptor thread to bind a port and receive a client connection request;
the first processing unit is configured to, after the Acceptor thread receives the connection request, process login, handshake and security authentication of the client through other threads of the Acceptor main thread pool to establish a service link.
Furthermore, the plug-in module comprises a plug-in management unit, a filtering unit and a plug-in configuration updating unit;
the plug-in management unit is used for asynchronously acquiring the configuration data of all plug-ins after the client establishes a service link, and managing the starting state of the plug-ins according to the configuration data of all plug-ins;
the filtering unit is used for sending each request of the client to all the plug-ins in the opening state for filtering;
and the plug-in configuration updating unit is used for updating the cache configuration information of a certain plug-in real time after the configuration information of the plug-in is changed.
Further, the configuration data of the plug-in includes the type of the plug-in and the enabling state of the plug-in.
Further, the service module includes a second processing unit and a third processing unit;
the second processing unit is used for sending the request of the client to any thread of the IO sub-thread so that the thread can read, write and encode the request of the client;
and the third processing unit is configured to send the request of the client to a corresponding workthreads pools according to a request type of the request of the client, so as to complete processing of the request of the client.
As a preferred embodiment of the present invention, the present invention further provides a control method for an API gateway based on Netty and plug-in mechanisms, including the following steps:
acquiring an access cluster request sent by a user;
decoding the data packet requested by the access cluster through a Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool, and establishing a service link;
judging the request entity through a preset plug-in, filtering the requests which do not accord with the preset condition, and sending the requests which accord with the preset condition to the service module;
and sending the request meeting the preset condition to a corresponding processing module according to the type of the request meeting the preset condition so as to finish the processing of the user request.
Further, the decoding, by the Netty service layer, the data packet requested by the access cluster to generate a request entity and request data, allocating the request data to a specific service thread pool, and establishing a service link, specifically:
randomly selecting one thread from an Acceptor main thread pool as an Acceptor thread to bind a port and receive a client connection request;
and after the Acceptor thread receives the connection request, processing login, handshake and security authentication of the client through other threads of the Acceptor main thread pool to establish a service link.
Further, the request entity is judged through a preset plug-in, the request which does not accord with the preset condition is filtered, and the request which accords with the preset condition is sent to the service module, specifically:
after a service link is established at a client, asynchronously acquiring configuration data of all plug-ins, and managing the starting state of the plug-ins according to the configuration data of all plug-ins;
sending each request of the client to all plug-ins in an open state for filtering;
and when the configuration information of a certain plug-in is changed, updating the cache configuration information of the plug-in real time.
Further, the configuration data of the plug-in includes the type of the plug-in and the enabling state of the plug-in.
Further, according to the type of the request meeting the preset condition, the request meeting the preset condition is sent to a corresponding processing module to complete processing of the user request, and specifically, the processing is as follows:
sending the request of the client to any thread of IO sub-threads for the thread to read, write and encode the request of the client;
and sending the request of the client to corresponding WorkThreadsPools according to the request type of the request of the client so as to finish the processing of the request of the client.
The embodiment of the invention has the following beneficial effects:
the invention provides an API gateway based on Netty and plug-in mechanism, comprising a request receiving module, a link establishing module, a plug-in module and a service module; the request receiving module is used for acquiring an access cluster request sent by a user; the link establishing module is used for decoding a data packet accessed to the cluster request through the Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool and establishing a service link; the plug-in module is used for judging the request entity through a preset plug-in, filtering the request which does not accord with the preset condition, and sending the request which accords with the preset condition to the service module; the service module is used for sending the request meeting the preset condition to the corresponding processing module according to the type of the request meeting the preset condition so as to complete the processing of the user request, and the high concurrent connection mode of the API gateway is realized by applying the Netty technology, so that more network connection accesses are supported on the basis of lower cost.
Drawings
FIG. 1 is a schematic structural diagram of an embodiment of the API gateway based on Netty and plug-in mechanisms provided by the present invention;
fig. 2 is a schematic diagram of a Reactor concurrency model of Netty according to an embodiment of the present invention.
Fig. 3 is an overall architecture diagram of an API gateway for implementing a plug-in mechanism through a Netty technology according to an embodiment of the present invention.
Fig. 4 is a flowchart illustrating an embodiment of a method for controlling an API gateway based on Netty and plug-in mechanisms according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
referring to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of the API gateway based on Netty and plug-in mechanisms provided in the present invention. As shown in fig. 1, the API gateway includes a request receiving module, a link establishing module, a plug-in module, and a service module;
the request receiving module is used for acquiring an access cluster request sent by a user; the link establishing module is used for decoding the data packet requested by the access cluster through a Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool and establishing a service link; the plug-in module is used for judging the request entity through a preset plug-in, filtering the request which does not accord with the preset condition and sending the request which accords with the preset condition to the service module; and the service module is used for sending the request meeting the preset condition to a corresponding processing module according to the type of the request meeting the preset condition so as to complete the processing of the user request.
After requesting to access the cluster, the Netty service layer processes link access, decodes the data packet to generate a request entity, distributes the data to a specific service thread pool, and establishes a service link. After the request entity enters the service processing stage, the gateway Web ensures that the network request must trigger the plug-in chain to execute, and executes the logic of request filtering. The administrator maintains the type, activation status, execution order, and rule information of the plug-ins, and the execution of each plug-in determines whether the request is activated, matches the traffic threshold, and executes the rule. The execution of each plug-in will be shown in the following table according to the requested information:
GatePlugin
+ plug-in identification: int
+ plug-in type: string
+ enabled state: int
+ plug-in name: string
+ execution order: int
+ plug-in configuration: string
+ plugPiece rule: string
Then, calculation judgment is made, requests which do not accord with the rule conditions are filtered, and failure prompts are directly returned; the eligible requests are forwarded to the service layer or streamed to the next plug-in. The request forwarded to the service layer is processed by the service layer.
Example 2:
in this embodiment, the link establishing module includes a receiving unit and a first processing unit;
the receiving unit is used for randomly selecting one thread in an Acceptor main thread pool as an Acceptor thread to bind a port and receive a client connection request; the first processing unit is configured to, after the Acceptor thread receives the connection request, process login, handshake and security authentication of the client through other threads of the Acceptor main thread pool to establish a service link.
It should be noted that Netty is an asynchronous event-driven web application framework that supports the rapid development of maintainable high-performance protocol-oriented servers and clients. In the modern application development, a scenario that thousands of concurrent clients are supported, namely a so-called high-performance system, is always faced, in order to realize the desire of enterprises for high-performance products, developers need to master professional knowledge in several complicated fields (network programming, multithreading processing and concurrency) besides requiring super-first programming skills, and long practice proves that the direct use of network APIs at the bottom of Java to write network programs can be a complicated operation process. And a basic requirement of application system development is to adapt to higher throughput and scalability requirements on the basis of lower cost. The Netty encapsulates a complex underlying network API and hides the complex underlying network API behind an easy-to-use API, and developers only need to realize a complex business process and give the network underlying layer to Netty as long as the developers are familiar with Netty use guidance, so that a high-concurrency system can be realized.
Referring to fig. 2, fig. 2 is a Reactor concurrent model of Netty according to an embodiment of the present invention, in which the Reactor model is implemented and extended by Netty:
1) the Acceptor main thread pool is an independent NIO thread pool, which plays the role of Acceptor in network links in the form of NIO, also known as Acceptor Reactor.
2) After the program is started, a thread is randomly selected from an Acceptor main thread pool to serve as an Acceptor thread, the Acceptor thread is used for binding a port, and client connection is received.
3) The Acceptor thread receives the connection request and gives the request to other threads of the Acceptor reactor to process login, handshake and security authentication of the client, so that a service link is established.
Example 3:
in this embodiment, the plug-in module includes a plug-in management unit, a filtering unit, and a plug-in configuration updating unit;
the plug-in management unit is used for asynchronously acquiring the configuration data of all plug-ins after the client establishes a service link, and managing the starting state of the plug-ins according to the configuration data of all plug-ins; the filtering unit is used for sending each request of the client to all the plug-ins in the opening state for filtering; and the plug-in configuration updating unit is used for updating the cache configuration information of a certain plug-in real time after the configuration information of the plug-in is changed.
It should be noted that the core idea of the system modular design is decoupling, and the design between modules generally follows a mode based on interface programming, an interface is an abstraction of a certain service and a function, different interfaces have different implementations, which meets the requirement of the system for function expandability, and the system operation necessarily needs to manage a certain interface, such as finding a specific implementation of an interface, managing a life cycle of a specific interface implementation, and the like, so that the system is implemented, and a strategy of starting, stopping, expanding, or replacing functions according to actual needs is an implementation of pluggable and hot-loading.
A plug-in is an extension to existing clean systems or third party implementations. The method is an implementation of a specific interface exposed by a system, and the operation of the method depends on resources of an existing clean system and accepts governance of the existing clean system, so that the AP I gateway for implementing the plug-in mechanism through the Netty technology in the embodiment of the present invention is shown in fig. 3, and fig. 3 is an overall architecture diagram of the AP I gateway for implementing the plug-in mechanism through the Netty technology provided in the embodiment of the present invention.
As a preferred embodiment of the present invention, the gateway is a middleware that directly receives concurrent client network connections, and the Netty handling network communication part is used, so that more client connections and more services can be handled by utilizing server resources to the maximum extent, and the possibility of service congestion is reduced.
In this embodiment, the gateway is composed of a management service and a service, and separates service processing from data maintenance. The business service processing client is connected, the forwarding client is connected to the business service layer, the business service asynchronously obtains all configuration data about the plug-in chain from the management service, and the configuration data comprises: the plug-in list and the detailed configuration of each plug-in manage the life cycle of the plug-ins according to the configuration data governing plug-ins, for example, a business service determines whether to open the plug-ins or not according to the starting state of the plug-ins, and a plug-in entity is created according to the information of a plug-in chain, and the like.
In the embodiment of the invention, each request is forwarded by Netty to the business service process, and the business service guarantees that the request is filtered by all enabled plugins.
Preferably, the management service maintains gateway configuration data and provides an interface layer for acquiring configuration information, the business service does not store data, all data come from the same management service, and the data of the business service are consistent no matter how many instances are deployed.
It should be noted that, in the multi-instance deployment mode, a plurality of business services access the data acquisition interface opened by the management service in an HTTP or Socket manner, and each time, the same full configuration data, that is, the configuration information of all plug-ins, is acquired, so that when the configuration information is updated, the business services can be synchronized in real time, and the configuration can take effect in time.
The method comprises the steps that cache configuration information of each plug-in is thread-safe in business service, when the configuration information of a certain plug-in is changed, the business service updates the cache configuration information of the plug-in time, and the plug-in can be applied in real time only by reading the latest configuration information in the running process.
Example 4:
in this embodiment, the service module includes a second processing unit and a third processing unit;
the second processing unit is used for sending the request of the client to any thread of the IO sub-thread so that the thread can read, write and encode the request of the client; and the third processing unit is configured to send the request of the client to a corresponding workthreads pools according to a request type of the request of the client, so as to complete processing of the request of the client.
After the business layer link is formally established, the request is transferred to a certain thread of the IO sub-thread pool, IO read-write and encoding operations are processed by the certain thread, and finally the request is transferred to a specific type of WorkThreadsPools according to different request types to perform specific business processing.
In the Netty concurrency model, concurrent access of the client, reading and writing of the bottom Socket and processing of the service request are multithreading asynchronous operations, so that Netty gives an application program a core capability: the network events generated at any time point can be responded in any sequence, and the thread resources of the computer can be continuously reused in the determined resources, so that the requirements of higher throughput and expandability are met.
Example 5:
referring to fig. 4 as a preferred embodiment of the present invention, fig. 4 is a flowchart illustrating an embodiment of a method for controlling an API gateway based on Netty and plug-in mechanisms according to the present invention. As shown in fig. 4, the control method includes steps S1 to S4, which are as follows:
and S1, acquiring the access cluster request sent by the user.
S2, decoding the data packet of the access cluster request through the Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool, and establishing a service link.
In the embodiment of the present invention, step S2 specifically includes: randomly selecting one thread from an Acceptor main thread pool as an Acceptor thread to bind a port and receive a client connection request; and after the Acceptor thread receives the connection request, processing login, handshake and security authentication of the client through other threads of the Acceptor main thread pool to establish a service link.
And S3, judging the request entity through a preset plug-in, filtering the request which does not accord with the preset condition, and sending the request which accords with the preset condition to the service module.
In the embodiment of the present invention, step S3 specifically includes: after a service link is established at a client, asynchronously acquiring configuration data of all plug-ins, and managing the starting state of the plug-ins according to the configuration data of all plug-ins; sending each request of the client to all plug-ins in an open state for filtering; and when the configuration information of a certain plug-in is changed, updating the cache configuration information of the plug-in real time.
The configuration data of the plug-in comprises the type of the plug-in and the enabling state of the plug-in.
And S4, sending the request meeting the preset conditions to a corresponding processing module according to the type of the request meeting the preset conditions so as to complete the processing of the user request.
In the embodiment of the present invention, step S4 specifically includes: sending the request of the client to any thread of IO sub-threads for the thread to read, write and encode the request of the client; and sending the request of the client to corresponding WorkThreadsPools according to the request type of the request of the client so as to finish the processing of the request of the client.
The control method of the API gateway based on the Netty and plug-in mechanism provided by the invention comprises the steps of acquiring an access cluster request sent by a user; decoding the data packet requested by the access cluster through a Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool, and establishing a service link; judging the request entity through a preset plug-in, filtering the requests which do not accord with the preset condition, and sending the requests which accord with the preset condition to the service module; and sending the request meeting the preset condition to a corresponding processing module according to the type of the request meeting the preset condition so as to complete the processing of the user request, realizing a high concurrent connection mode of the API gateway by applying a Netty technology, and supporting more network connection accesses on the basis of lower cost.
The embodiment provided by the invention has the following beneficial effects:
1) the method is realized by completely using java industrial computer language, and the universality is high.
2) Network access is realized by using Netty, and 100 million links can be supported by a single machine 4CoreCPU and 16 GRAM.
3) The whole gateway application realizes hot plug, and the application does not need to be restarted after the plug-in is started and stopped, so that the usability is improved.
4) After the service of a single gateway service is abnormally stopped, the service is accessed into the cluster again, and the configuration is pulled again.
5) The system is divided into a gateway service and a gateway management background, and the configuration data of all the gateway services are uniformly managed in the configuration background.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (8)

1. An API gateway based on Netty and plug-in mechanism is characterized by comprising a request receiving module, a link establishing module, a plug-in module and a service module;
the request receiving module is used for acquiring an access cluster request sent by a user;
the link establishing module is used for decoding the data packet requested by the access cluster through a Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool and establishing a service link; the link establishing module comprises a receiving unit and a first processing unit; the receiving unit is used for randomly selecting one thread in an Acceptor main thread pool as an Acceptor thread to bind a port and receive a client connection request; the first processing unit is configured to, after the Acceptor thread receives the connection request, process login, handshake and security authentication of the client through other threads of the Acceptor main thread pool to establish a service link;
the plug-in module is used for judging the request entity through a preset plug-in, filtering the request which does not accord with the preset condition and sending the request which accords with the preset condition to the service module;
and the service module is used for sending the request meeting the preset condition to a corresponding processing module according to the type of the request meeting the preset condition so as to complete the processing of the user request.
2. The Netty and plugin mechanism-based API gateway of claim 1 wherein the plugin module includes a plugin management element, a filtering element and a plugin configuration update element;
the plug-in management unit is used for asynchronously acquiring the configuration data of all plug-ins after the client establishes a service link, and managing the starting state of the plug-ins according to the configuration data of all plug-ins;
the filtering unit is used for sending each request of the client to all the plug-ins in the opening state for filtering;
and the plug-in configuration updating unit is used for updating the cache configuration information of a certain plug-in real time after the configuration information of the plug-in is changed.
3. The Netty and plugin mechanism-based API gateway of claim 2 in which the configuration data for a plugin includes the type of plugin and the enablement status of the plugin.
4. The Netty and plugin mechanism-based API gateway of claim 1 wherein the traffic module includes a second processing unit and a third processing unit;
the second processing unit is used for sending the request of the client to any thread of the IO sub-thread so that the thread can read, write and encode the request of the client;
and the third processing unit is configured to send the request of the client to a corresponding workthreads pools according to a request type of the request of the client, so as to complete processing of the request of the client.
5. A control method of the Netty and plug-in mechanism based API gateway according to any of claims 1-4, characterized by comprising the following steps:
acquiring an access cluster request sent by a user;
decoding the data packet requested by the access cluster through a Netty service layer to generate a request entity and request data, distributing the request data to a specific service thread pool, and establishing a service link; the method specifically comprises the following steps: randomly selecting one thread from an Acceptor main thread pool as an Acceptor thread to bind a port and receive a client connection request; after the Acceptor thread receives the connection request, processing login, handshake and security authentication of a client through other threads of the Acceptor main thread pool to establish a service link;
judging the request entity through a preset plug-in, filtering the requests which do not accord with the preset condition, and sending the requests which accord with the preset condition to the service module;
and sending the request meeting the preset condition to a corresponding processing module according to the type of the request meeting the preset condition so as to finish the processing of the user request.
6. The method according to claim 5, wherein the determining of the request entity is performed by a preset plugin, the filtering of the request that does not meet the preset condition is performed, and the sending of the request that meets the preset condition to the service module is specifically:
after a service link is established at a client, asynchronously acquiring configuration data of all plug-ins, and managing the starting state of the plug-ins according to the configuration data of all plug-ins;
sending each request of the client to all plug-ins in an open state for filtering;
and when the configuration information of a certain plug-in is changed, updating the cache configuration information of the plug-in real time.
7. The method of claim 6, wherein the configuration data of the plug-in includes a type of the plug-in and an enabling state of the plug-in.
8. The method according to claim 5, wherein the request meeting the preset condition is sent to a corresponding processing module according to the type of the request meeting the preset condition, so as to complete processing of the user request, specifically:
sending the request of the client to any thread of IO sub-threads for the thread to read, write and encode the request of the client;
and sending the request of the client to corresponding WorkThreadsPools according to the request type of the request of the client so as to finish the processing of the request of the client.
CN202010048489.5A 2020-01-16 2020-01-16 API gateway based on Netty and plug-in mechanism and control method Active CN111314212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010048489.5A CN111314212B (en) 2020-01-16 2020-01-16 API gateway based on Netty and plug-in mechanism and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010048489.5A CN111314212B (en) 2020-01-16 2020-01-16 API gateway based on Netty and plug-in mechanism and control method

Publications (2)

Publication Number Publication Date
CN111314212A CN111314212A (en) 2020-06-19
CN111314212B true CN111314212B (en) 2022-04-19

Family

ID=71161404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010048489.5A Active CN111314212B (en) 2020-01-16 2020-01-16 API gateway based on Netty and plug-in mechanism and control method

Country Status (1)

Country Link
CN (1) CN111314212B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929210B (en) * 2021-01-25 2023-04-18 城云科技(中国)有限公司 Method and system for gateway routing application plug-in built on WebFlux framework and application of gateway routing application plug-in
CN114666554B (en) * 2022-05-23 2023-04-11 创意信息技术股份有限公司 Edge gateway cloud service management system
CN115174342B (en) * 2022-06-15 2024-03-08 阿里巴巴(中国)有限公司 Plug-in management method, device and equipment of gateway
CN117093639B (en) * 2023-10-18 2024-01-26 北京安华金和科技有限公司 Socket connection processing method and system based on audit service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429645A (en) * 2018-03-05 2018-08-21 深圳乐信软件技术有限公司 A kind of configuration method of API gateway, device, storage medium and API gateway
US10120734B1 (en) * 2016-08-29 2018-11-06 Equinix, Inc. Application programming interface and services engine with application-level multi-tenancy
CN110147915A (en) * 2018-02-11 2019-08-20 陕西爱尚物联科技有限公司 A kind of method and its system of resource distribution

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742505A (en) * 2009-11-24 2010-06-16 广东宇天信通通信科技有限公司 System and method for providing integration of multiple data services
CN105635298B (en) * 2016-01-12 2018-12-18 安徽科力信息产业有限责任公司 A kind of data acquisition equipment uniform access system based on business separation principle
CN107154922A (en) * 2016-03-04 2017-09-12 北京京东尚科信息技术有限公司 Configuration management system and configuring management method
CN106992908A (en) * 2017-03-31 2017-07-28 上海斐讯数据通信技术有限公司 A kind of intelligent household management system and its management method
CN109379430B (en) * 2018-11-30 2021-01-08 四川芯波智创物联技术有限公司 'Internet of things +' industry ecosphere sharing and sharing platform
CN109672612A (en) * 2018-12-13 2019-04-23 中国电子科技集团公司电子科学研究院 API gateway system
CN109618347B (en) * 2019-02-17 2021-06-11 中国—东盟信息港股份有限公司 Intelligent gateway system for automatically distributing service requests

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10120734B1 (en) * 2016-08-29 2018-11-06 Equinix, Inc. Application programming interface and services engine with application-level multi-tenancy
CN110147915A (en) * 2018-02-11 2019-08-20 陕西爱尚物联科技有限公司 A kind of method and its system of resource distribution
CN108429645A (en) * 2018-03-05 2018-08-21 深圳乐信软件技术有限公司 A kind of configuration method of API gateway, device, storage medium and API gateway

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
《The Design and Realization of Embedded Gateway Based on WSN》;Ping Song;《2008 International Conference on Computer Science and Software Engineering》;20081222;全文 *
《基于异构网络的物联网智能家居系统设计与实现》;张应昌;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160315;全文 *
《基于异构计算的IPv4/IPv6互通并行处理技术研究》;张伟新;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160115;全文 *
基于Netty框架的数据通讯服务系统的设计;龚鹏等;《无线通信技术》;20160315(第01期);全文 *
基于Netty高并发物联网服务器研究与设计;陈强等;《电子技术与软件工程》;20180406(第07期);全文 *

Also Published As

Publication number Publication date
CN111314212A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN111314212B (en) API gateway based on Netty and plug-in mechanism and control method
US10552448B2 (en) Systems and methods for event driven object management and distribution among multiple client applications
US8468541B2 (en) Event driven sendfile
WO2021147288A1 (en) Container cluster management method, device and system
CN109542611A (en) Database, that is, service system, database dispatching method, equipment and storage medium
US20180091449A1 (en) Event-driven policy-based distributed container management system
JP2013507690A (en) Self-service configuration for data environments
CN106161537A (en) The processing method of remote procedure call, device, system and electronic equipment
CN105786603B (en) Distributed high-concurrency service processing system and method
CN111865900A (en) RPC protocol-based cross-network regional proxy access method and system
CN110968603B (en) Data access method and device
CN111064626B (en) Configuration updating method, device, server and readable storage medium
WO2023197874A1 (en) Application access method and apparatus, and device and medium
CN114553693B (en) Gateway upgrading method and device
CN110543315B (en) Distributed operating system of kbroker, storage medium and electronic equipment
CN111897551B (en) Platform and method for rapidly cloning software environment in cloud environment
CN109766131A (en) The system and method for the intelligent automatic upgrading of software is realized based on multithreading
CN106911739B (en) Information distribution method and device
CN114077756A (en) Method and system for processing informatization service based on block chain
CN106936643B (en) Equipment linkage method and terminal equipment
CN115102999A (en) DevOps system, service providing method, storage medium, and electronic device
WO2020259326A1 (en) Signal transmission method and apparatus
CN114896258B (en) Transaction data synchronization method and device, computer equipment and storage medium
CN116614323B (en) Cloud storage enterprise network management method and system based on Rclone
CN117076508B (en) Method for supporting batch data processing by stream data processing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant