[go: up one dir, main page]

CN119814869A - Gateway system and implementation method for implementing REST access service based on transaction middleware - Google Patents

Gateway system and implementation method for implementing REST access service based on transaction middleware Download PDF

Info

Publication number
CN119814869A
CN119814869A CN202510003995.5A CN202510003995A CN119814869A CN 119814869 A CN119814869 A CN 119814869A CN 202510003995 A CN202510003995 A CN 202510003995A CN 119814869 A CN119814869 A CN 119814869A
Authority
CN
China
Prior art keywords
gateway
rest
data
transaction middleware
client
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.)
Pending
Application number
CN202510003995.5A
Other languages
Chinese (zh)
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.)
Shanghai Baosight Software Co Ltd
Original Assignee
Shanghai Baosight Software 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 Shanghai Baosight Software Co Ltd filed Critical Shanghai Baosight Software Co Ltd
Priority to CN202510003995.5A priority Critical patent/CN119814869A/en
Publication of CN119814869A publication Critical patent/CN119814869A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明提供了一种基于交易中间件实现REST访问服务的网关系统及实现方法,包括:交易中间件采用分布式架构,自上而下包括应用接口层、服务框架层、数据访问层以及基础支持层;所述应用接口层,用于将交易中间件内部的不同模块、服务或系统之间的交互以一种标准化的方式进行封装;所述服务框架层,用于为交易中间件提供网络通信方式,实现与外部系统信息交互。所述数据访问层,用于为交易中间件处理各类业务数据;所述基础支持层,用于为交易中间件涉及的数据服务资源处理平台和分散的应用客户端提供各类硬件、网络、操作系统和数据库服务器。其中,所述服务框架层包括REST网关,所述REST网关用于提供REST访问服务方式实现与外部系统信息交互。

The present invention provides a gateway system and implementation method for implementing REST access services based on transaction middleware, including: the transaction middleware adopts a distributed architecture, including an application interface layer, a service framework layer, a data access layer and a basic support layer from top to bottom; the application interface layer is used to encapsulate the interaction between different modules, services or systems within the transaction middleware in a standardized manner; the service framework layer is used to provide a network communication method for the transaction middleware to realize information interaction with external systems. The data access layer is used to process various types of business data for the transaction middleware; the basic support layer is used to provide various types of hardware, networks, operating systems and database servers for the data service resource processing platform and scattered application clients involved in the transaction middleware. Among them, the service framework layer includes a REST gateway, and the REST gateway is used to provide a REST access service method to realize information interaction with external systems.

Description

Gateway system for realizing REST access service based on transaction middleware and realization method
Technical Field
The invention relates to the technical field of computer communication under an industrial Internet platform environment, in particular to a gateway system for realizing REST access service based on transaction middleware and a realization method thereof.
Background
The industrial Internet is an emerging state and application mode formed by deep fusion of a new generation of information technology and manufacturing industry, and realizes interconnection and intercommunication of an enterprise internal control system and a management information system, optimization of configuration of manufacturing resources and integrated sharing of data resources by constructing an open cloud platform which takes data as a core and is efficient in resource configuration and active in innovation.
The transaction middleware is a software system for providing application-oriented transaction for an industrial Internet platform. The system provides a development environment and a transaction processing platform for an application system through a distributed architecture, shields a heterogeneous environment and supports fast response of high concurrency processing.
The transaction middleware is widely applied to core online transaction systems in industries such as manufacturing industry, finance, traffic, communication, electric power, color, petrochemical industry and the like, and helps the enterprises to realize key business.
In the actual application process, due to performance, safety and other reasons, the transaction middleware often adopts a private protocol to carry out data communication, the client needs to link an application access interface provided by the server, and resource calling can be completed through multi-layer application protocol forwarding, so that the server cannot widely share the loaded application service through an industrial internet platform.
In order to overcome the defects of the existing functions, the invention provides a gateway system and a method for realizing REST access service based on transaction middleware, which can effectively improve the working efficiency of an application system.
By opening service resources through REST/HTTP software communication technology, a user can quickly and completely use remote application services through browser/server architecture, even if he does not have the expertise of a network, an operating system and an application programming interface, as long as he grasps a simple calling method.
The result shows that the gateway software system and the method thereof have practical significance for improving the use convenience of users and the speed and performance of service resource calling.
Meanwhile, by adapting to the REST service gateway, the domestic middleware has the capability of large-scale application of standard foreign similar excellent software products in terms of comprehensive functions, performance supporting capability, safety and the like.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a gateway system for realizing REST access service based on transaction middleware and an implementation method thereof.
The gateway system for realizing REST access service based on transaction middleware provided by the invention comprises transaction middleware;
The transaction middleware adopts a distributed architecture and comprises an application interface layer, a service framework layer, a data access layer and a basic support layer from top to bottom;
The application interface layer is used for packaging interaction among different modules, services or systems in the transaction middleware in a standardized manner;
The service framework layer is used for providing a network communication mode for the transaction middleware and realizing information interaction with an external system.
The data access layer is used for processing various business data for the transaction middleware;
The basic support layer is used for providing various hardware, networks, operating systems and database servers for the data service resource processing platform and the scattered application clients related to the transaction middleware.
The service framework layer comprises a REST gateway, and the REST gateway is used for providing REST access service modes to realize information interaction with external systems.
Preferably, the REST gateway is a network software system based on REST architecture style and adopting the international open standard HTTP/1.1 protocol;
The REST gateway defines the operation mode of the resource by using a unified interface specification, identifies the resource position by using a unified resource identifier URI and performs data interaction by using a media type.
Preferably, the REST gateway comprises a listener and a gateway processor;
The listener transmits the socket connection handle to the gateway processor to realize the communication connection between the client and the gateway processor;
The client finishes network transmission of the request data through the HTTP protocol, the gateway processor transmits the application data contained in the request message to the application server for processing through inter-process communication, the application server returns response data after the service program is executed, the gateway processor obtains the response data and packages the response data into an HTTP response message, and the HTTP response message is encrypted through the SSL protocol and then replied to the client.
Preferably, the monitor is configured to monitor an HTTP/S protocol port and a UNIX domain socket port, and receive a connection between an external client and an internal gateway processor, respectively;
the monitor selects a gateway processor according to a random scheduling strategy or a lightest load strategy of load balancing, and transmits a client connection handle to the gateway processor, and the gateway processor performs data interaction with the client based on the client connection handle.
Preferably, the gateway processor comprises a connection management module, an information security processing module, an HTTP protocol processing module and an application data interaction module;
The connection management module is used for connecting the gateway processor and the monitor, establishing and managing the connection with the external client request, and simultaneously establishing association between the socket connection handle and the SSL layer and setting a data read-write event;
The information security processing module is used for encrypting and decrypting the messages transmitted by both communication parties based on the symmetric key;
the HTTP protocol processing module is used for analyzing and packaging HTTP/1.1 request and response messages;
the application data interaction module is used for reading the processed response data from the memory through an inter-process communication mechanism, packaging the response data into an HTTP response message, and then encrypting and replying to the client.
The gateway system implementation method for realizing the REST access service based on the transaction middleware comprises the steps of constructing the transaction middleware, wherein the transaction middleware adopts a distributed architecture and comprises an application interface layer, a service framework layer, a data access layer and a basic support layer from top to bottom;
The application interface layer is used for packaging interaction among different modules, services or systems in the transaction middleware in a standardized manner;
The service framework layer is used for providing a network communication mode for the transaction middleware and realizing information interaction with an external system.
The data access layer is used for processing various business data for the transaction middleware;
The basic support layer is used for providing various hardware, networks, operating systems and database servers for the data service resource processing platform and the scattered application clients related to the transaction middleware.
The service framework layer comprises a REST gateway, and the REST gateway is used for providing REST access service modes to realize information interaction with external systems.
Preferably, the REST gateway is a network software system based on REST architecture style and adopting the international open standard HTTP/1.1 protocol;
The REST gateway defines the operation mode of the resource by using a unified interface specification, identifies the resource position by using a unified resource identifier URI and performs data interaction by using a media type.
Preferably, the REST gateway comprises a listener and a gateway processor;
The listener transmits the socket connection handle to the gateway processor to realize the communication connection between the client and the gateway processor;
The client finishes network transmission of the request data through the HTTP protocol, the gateway processor transmits the application data contained in the request message to the application server for processing through inter-process communication, the application server returns response data after the service program is executed, the gateway processor obtains the response data and packages the response data into an HTTP response message, and the HTTP response message is encrypted through the SSL protocol and then replied to the client.
Preferably, the monitor is configured to monitor an HTTP/S protocol port and a UNIX domain socket port, and receive a connection between an external client and an internal gateway processor, respectively;
the monitor selects a gateway processor according to a random scheduling strategy or a lightest load strategy of load balancing, and transmits a client connection handle to the gateway processor, and the gateway processor performs data interaction with the client based on the client connection handle.
Preferably, the gateway processor comprises a connection management module, an information security processing module, an HTTP protocol processing module and an application data interaction module;
The connection management module is used for connecting the gateway processor and the monitor, establishing and managing the connection with the external client request, and simultaneously establishing association between the socket connection handle and the SSL layer and setting a data read-write event;
The information security processing module is used for encrypting and decrypting the messages transmitted by both communication parties based on the symmetric key;
the HTTP protocol processing module is used for analyzing and packaging HTTP/1.1 request and response messages;
the application data interaction module is used for reading the processed response data from the memory through an inter-process communication mechanism, packaging the response data into an HTTP response message, and then encrypting and replying to the client.
Compared with the prior art, the invention has the following beneficial effects:
1. The invention greatly improves the flexibility of the use of the client and ensures the accuracy of the process by adding the browser/server side architecture calling mode, wherein the browser/server side architecture calling mode refers to the mode that the client accesses the application program on the server through the browser. The core part of the architecture is a server which is responsible for processing all business logic and data access operations, and a client only needs to install a standard browser to interact with the server through a network to acquire required information or execute corresponding operations;
2. the domestic middleware can be used for standard foreign similar excellent software products in the aspects of functional comprehensiveness, performance supporting capability, safety and the like, wherein the throughput of a system under the same scene can be improved by ten percent, and the CPU use load rate is reduced by sixty percent in a comparable way;
3. By collecting the running experience of the similar excellent software abroad in the actual use process of the enterprise project, the running efficiency of the software, the user feedback and other problems are analyzed, and the functional optimization can be performed for domestic software in a targeted manner. For example, by analyzing the operation habit and common problems of a user, the use of the software and the logic processing function can be optimized, and the user experience and the overall performance of the software are improved;
4. The REST service gateway system successfully carries out engineering implementation after design, coding and comprehensive test, and all test indexes reach industry standards through the overall test of the system, thereby completely realizing the design target.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a system architecture diagram of transaction middleware.
Fig. 2 is a functional block diagram of the REST gateway.
Fig. 3 is a functional flow diagram of a listener module.
Fig. 4 is an event flow diagram of a gateway processor module infrastructure.
Fig. 5 is a diagram showing the configuration of the gateway processor module.
Fig. 6 is a flowchart of the SSL protocol establishing a secure channel based on a handshake protocol and a recording protocol.
Fig. 7 is an HTTP protocol processing parsing workflow diagram.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present invention.
Example 1
The gateway system for realizing REST access service based on transaction middleware provided by the invention comprises the following components:
The transaction middleware software system adopts a distributed architecture, which is an application interface layer, a service framework layer, a data access layer and a basic support layer from top to bottom, has distributed transaction processing and application communication functions, and provides various perfect services to build, run and manage the application system, as shown in fig. 1.
The application interface layer mainly comprises a client program, an application programming interface, a WEB browser, a third-party software tool and a management console. The management console is a user management interface that provides management and configuration functions for the administrator for application services.
The service framework layer comprises a monitor and a gateway system (comprising a private gateway and a REST gateway) which are responsible for processing external concurrent call connection and analyzing request data, and functional modules such as a BBS bulletin board, system management, an application server, transaction processing and running real-time library which are responsible for application interaction.
The data access layer is composed of application service programs written by users and is responsible for processing various business data.
The base support layer is responsible for supporting heterogeneous hardware, networks, operating systems, and database servers.
The application interface layer, the service framework layer, the data access layer and the basic support layer form an enterprise transaction middleware platform, so that developers can establish a cross-platform interoperable application system, and the unified and centralized data service resource processing platform and the independent and scattered application clients work cooperatively to jointly realize resource integrated management under an industrial Internet platform.
The gateway of the transaction middleware is a software system for realizing application layer protocol conversion, and is also an inlet and an outlet for information interaction with an external system. The private gateway adopts an enterprise private protocol to carry out data communication, and a client program invokes a specific application programming interface to finish the functions of connecting a gateway system, requesting service, processing business data, logging off connection and the like, so that the safety and privacy of the data are protected.
The REST gateway is a network software system based on REST architecture style and adopting international open standard HTTP (hypertext transfer protocol)/1.1 protocol. It uses a uniform interface specification to define the way the resource operates, uses a uniform resource identifier URI (Uniform Resource Identifier) to identify the resource location, uses media types (e.g., JSON, XML, etc.) for data interactions.
Through HTTP protocol, REST gateway can realize loose coupling based on data interaction between WEB browser, client program and server application service processing program, provides convenient, flexible and safe interface calling mode based on browser/server architecture in service frame layer, and possesses basic functions of load balancing, flow control, SSL encryption, authentication, etc.
The REST gateway is composed of a monitor and a gateway processor, as shown in fig. 2.
Each set of transaction middleware REST gateway system comprises a monitor and a plurality of gateway processors which are flexibly configured, so that the throughput of the system and the processing capacity of a server side can be effectively improved. The client program completes network transmission of the request data through HTTP protocol, the gateway processor efficiently transmits the application data contained in the request message to the application server for processing through inter-process communication, and after obtaining the response data, the response message is replied, and the main service functions are as follows:
1. and the client calls the REST resource address and establishes socket connection with the monitor.
2. The listener passes the socket connection handle to the gateway processor, after which the communication connection of the client is handled by the latter, and the listener is no longer involved.
3. The gateway processor is responsible for transmitting data at the TCP layer, decrypting and analyzing the HTTP request message through an upper SSL protocol, and obtaining application data.
4. The gateway processor delivers the data to the application server, which returns response data after execution by the service program.
5. The gateway processor obtains the response data, encapsulates the response data into an HTTP response message, and replies to the client after encrypting the HTTP response message through SSL protocol.
Wherein the listener module comprises:
The listener module is a network entry of the transaction middleware software system, and the client is connected with the REST gateway system through the listener. The listener is responsible for listening to the HTTP/S protocol port and the UNIX domain socket (Unix Domain Socket) port, receiving the connections of the external client and the internal gateway processor, respectively.
It selects a gateway processor according to a random scheduling policy of load balancing or a lightest load policy and transmits a client connection handle to the gateway processor, and the gateway processor performs data interaction with a client by the gateway processor, and the functional flow is shown in the following figure 3.
The "load balancing random scheduling policy" and the "lightest load policy" are the existing techniques that the trading middleware has implemented.
The gateway processor module includes:
the gateway processor responsible for resolving and packaging HTTP request and response messages is a core module of the REST gateway system and is also a basic component for realizing rapid calling of application services and processing of high-concurrency connection.
The bottom layer structure is based on an event driven software design mode, adopts a single thread asynchronous processing and concurrent connection Reactor (Reactor) programming model, uses an I/O multiplexing separator (select/poll function) of an operating system as a basic component of an event driven cycle, continuously checks signal events, timing events and I/O handle input/output read-write events, processes other ready network events by waiting for the timing events to be triggered, performs data dispatch, executes a callback function registered for the events in advance, notifies a service object of receiving data, and then completes protocol analysis of HTTP request messages.
The method combines an efficient inter-process communication mechanism in the transaction middleware, and reads response data processed by the application from the memory in a non-blocking manner while processing various network events in a serial and asynchronous manner, so that the efficient communication function of the system is realized.
The gateway processor module workflow is shown in fig. 4.
As shown in FIG. 5, the gateway processor module is composed of four functional sub-modules, namely a connection management sub-module, an information security processing sub-module, an HTTP protocol processing sub-module and an application data interaction sub-module.
The connection management sub-module is responsible for communication between the gateway processor and the monitor, establishes and manages connection with external client requests, establishes association between the socket connection handle and the SSL layer, sets data read-write events, and ensures stable and efficient data transmission. The functions are as follows:
1. Responsible for connecting, disconnecting, or reconnecting listeners.
2. And receiving the client socket connection handle forwarded by the listener.
3. An association is established between the connection handle and the SSL layer.
4. And interacting with the SSL layer, and establishing a secure connection through the information security processing sub-module exchange key and authentication.
5. And setting a callback function of the data read-write event for the socket connection handle.
6. The running state of the gateway processor is informed to the monitor in real time.
The information security processing sub-module comprises:
the secure sockets layer (Secure Sockets Layer, abbreviated SSL) protocol is an industrial internet privacy standard for encrypting and securing communications. The method is positioned between a TCP transmission layer and an application layer, and establishes a secure communication channel for both a client and a server.
The information security processing sub-module is responsible for encrypting and decrypting the actual transmission message for both communication parties. The key links of the information security accurate processing and the high-efficiency realization are checking certificates, identity verification, selection algorithms, negotiation protocol versions and keys.
First, the SSL protocol establishes a secure channel based on a handshake protocol and a recording protocol by the following steps, as shown in fig. 6.
And then, the information security processing sub-module encrypts and decrypts the data message by using the generated symmetric key, wherein the rules are as follows:
1. And the plaintext data which is decrypted by the SSL layer and arrives is informed to the HTTP protocol processing submodule for analysis by an event-driven callback mechanism.
2. The transmitted plaintext data is encrypted by the symmetric key of the SSL layer and then transmitted to the outside by the TCP transmission layer.
The mechanism realizes the data encryption function in the transmission process and provides safer and more reliable network communication service.
The HTTP protocol processing sub-module comprises:
The submodule is used for analyzing and packaging HTTP/1.1 request and response messages.
Firstly, it is responsible for analyzing the received plaintext data according to the HTTP/1.1 protocol requirement, removing the beginning line, the head field and the blank line ending symbol of the HTTP request message, collecting the subsequent data body according to the length field value of the head, and then delivering to the application server for processing, wherein the analyzing workflow is shown in figure 7:
The application service interaction submodule comprises:
the REST gateway adopts an FML32 (FIELD MANAGEMENT Language) format as a data structure for interaction between the gateway and the application server, and the dynamic construction problem of the application data structure is flexibly realized.
The application service interaction sub-module reads the processed response data from the memory through an inter-process communication mechanism, encapsulates the response data into an HTTP response message, encrypts the HTTP response message through the information security sub-module and replies to the client.
The invention also provides a gateway system for realizing the REST access service based on the transaction middleware, which can be realized by executing the flow steps of the gateway system realizing method for realizing the REST access service based on the transaction middleware, namely, the gateway system realizing method for realizing the REST access service based on the transaction middleware can be understood as a preferred implementation mode of the gateway system for realizing the REST access service based on the transaction middleware by a person skilled in the art.
Those skilled in the art will appreciate that the invention provides a system and its individual devices, modules, units, etc. that can be implemented entirely by logic programming of method steps, in addition to being implemented as pure computer readable program code, in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Therefore, the system and the devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units for realizing various functions included in the system can be regarded as structures in the hardware component, and the devices, modules and units for realizing various functions can be regarded as structures in the hardware component as well as software modules for realizing the method.
The foregoing describes specific embodiments of the present application. It is to be understood that the application is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the application. The embodiments of the application and the features of the embodiments may be combined with each other arbitrarily without conflict.

Claims (10)

1.一种基于交易中间件实现REST访问服务的网关系统,其特征在于,包括:交易中间件;1. A gateway system for implementing REST access services based on transaction middleware, characterized by comprising: transaction middleware; 所述交易中间件采用分布式架构,自上而下包括应用接口层、服务框架层、数据访问层以及基础支持层;The transaction middleware adopts a distributed architecture, which includes an application interface layer, a service framework layer, a data access layer and a basic support layer from top to bottom; 所述应用接口层,用于将交易中间件内部的不同模块、服务或系统之间的交互以一种标准化的方式进行封装;The application interface layer is used to encapsulate the interactions between different modules, services or systems within the transaction middleware in a standardized manner; 所述服务框架层,用于为交易中间件提供网络通信方式,实现与外部系统信息交互。The service framework layer is used to provide a network communication method for the transaction middleware to realize information interaction with the external system. 所述数据访问层,用于为交易中间件处理各类业务数据;The data access layer is used to process various types of business data for the transaction middleware; 所述基础支持层,用于为交易中间件涉及的数据服务资源处理平台和分散的应用客户端提供各类硬件、网络、操作系统和数据库服务器。The basic support layer is used to provide various types of hardware, networks, operating systems and database servers for the data service resource processing platform and scattered application clients involved in the transaction middleware. 其中,所述服务框架层包括REST网关,所述REST网关用于提供REST访问服务方式实现与外部系统信息交互。The service framework layer includes a REST gateway, and the REST gateway is used to provide a REST access service method to achieve information interaction with an external system. 2.根据权利要求1所述的基于交易中间件实现REST访问服务的网关系统,其特征在于,所述REST网关是基于REST架构风格、采用国际开放标准HTTP/1.1协议的网络软件系统;2. The gateway system for implementing REST access services based on transaction middleware according to claim 1, characterized in that the REST gateway is a network software system based on the REST architectural style and adopting the international open standard HTTP/1.1 protocol; 所述REST网关使用统一的接口规范定义资源的操作方式,使用统一资源标识符URI标识资源位置,使用媒体类型进行数据交互。The REST gateway uses a unified interface specification to define the operation mode of resources, uses a uniform resource identifier URI to identify the resource location, and uses a media type to perform data interaction. 3.根据权利要求1所述的基于交易中间件实现REST访问服务的网关系统,其特征在于,所述REST网关包括:监听器和网关处理器;3. The gateway system for implementing REST access services based on transaction middleware according to claim 1, characterized in that the REST gateway comprises: a listener and a gateway processor; 客户端调用REST资源地址与所述监听器建立socket连接;所述监听器将socket连接句柄传递给所述网关处理器,实现客户端与网关处理器的通信连接;The client calls the REST resource address to establish a socket connection with the listener; the listener passes the socket connection handle to the gateway processor to achieve a communication connection between the client and the gateway processor; 客户端通过HTTP协议完成请求数据的网络传输,并由所述网关处理器将请求报文包含的应用数据通过进程间通信传给应用服务器处理,应用服务器在服务程序执行后返回应答数据,网关处理器获得应答数据后封装为HTTP响应报文,并通过SSL协议加密后回复客户端。The client completes the network transmission of the request data through the HTTP protocol, and the gateway processor transmits the application data contained in the request message to the application server for processing through inter-process communication. The application server returns the response data after the service program is executed. After obtaining the response data, the gateway processor encapsulates it into an HTTP response message and replies to the client after encrypting it through the SSL protocol. 4.根据权利要求3所述的基于交易中间件实现REST访问服务的网关系统,其特征在于,所述监听器用于监听HTTP/S协议端口和UNIX域套接字端口,分别接收外部客户端和内部网关处理器的连接;4. The gateway system for implementing REST access services based on transaction middleware according to claim 3, characterized in that the listener is used to monitor the HTTP/S protocol port and the UNIX domain socket port, and receive connections from external clients and internal gateway processors respectively; 所述监听器按照负载均衡的随机调度策略或最轻负载策略选择网关处理器,并向其传递客户端连接句柄,网关处理器基于客户端连接句柄与客户端进行数据交互。The listener selects a gateway processor according to a random scheduling strategy or a lightest load strategy of load balancing, and transmits a client connection handle to the gateway processor. The gateway processor performs data interaction with the client based on the client connection handle. 5.根据权利要求3所述的基于交易中间件实现REST访问服务的网关系统,其特征在于,所述网关处理器包括:连接管理模块、信息安全处理模块、HTTP协议处理模块和应用数据交互模块;5. The gateway system for implementing REST access services based on transaction middleware according to claim 3, characterized in that the gateway processor comprises: a connection management module, an information security processing module, an HTTP protocol processing module and an application data interaction module; 所述连接管理模块用于连接网关处理器和监听器,建立和管理与外部客户端请求之间的连接,同时为socket连接句柄和SSL层之间建立关联、设置数据读写事件;The connection management module is used to connect the gateway processor and the listener, establish and manage the connection with the external client request, and establish the association between the socket connection handle and the SSL layer and set the data read and write events; 所述信息安全处理模块用于基于对称密钥为通信双方传输报文进行加密和解密;The information security processing module is used to encrypt and decrypt messages transmitted by both parties of communication based on a symmetric key; 所述HTTP协议处理模块用于解析和封装HTTP/1.1请求和响应报文;The HTTP protocol processing module is used to parse and encapsulate HTTP/1.1 request and response messages; 所述应用数据交互模块用于通过进程间通信机制,从内存读取处理后的应答数据,然后封装为HTTP响应报文再进行加密回复客户端。The application data interaction module is used to read the processed response data from the memory through the inter-process communication mechanism, and then encapsulate it into an HTTP response message and then encrypt and reply to the client. 6.一种基于交易中间件实现REST访问服务的网关系统实现方法,其特征在于,包括:构建交易中间件,所述交易中间件采用分布式架构,自上而下包括应用接口层、服务框架层、数据访问层以及基础支持层;6. A method for implementing a gateway system for implementing REST access services based on transaction middleware, characterized in that it includes: constructing transaction middleware, wherein the transaction middleware adopts a distributed architecture and includes an application interface layer, a service framework layer, a data access layer, and a basic support layer from top to bottom; 所述应用接口层,用于将交易中间件内部的不同模块、服务或系统之间的交互以一种标准化的方式进行封装;The application interface layer is used to encapsulate the interactions between different modules, services or systems within the transaction middleware in a standardized manner; 所述服务框架层,用于为交易中间件提供网络通信方式,实现与外部系统信息交互。The service framework layer is used to provide a network communication method for the transaction middleware to realize information interaction with the external system. 所述数据访问层,用于为交易中间件处理各类业务数据;The data access layer is used to process various types of business data for the transaction middleware; 所述基础支持层,用于为交易中间件涉及的数据服务资源处理平台和分散的应用客户端提供各类硬件、网络、操作系统和数据库服务器。The basic support layer is used to provide various types of hardware, networks, operating systems and database servers for the data service resource processing platform and scattered application clients involved in the transaction middleware. 其中,所述服务框架层包括REST网关,所述REST网关用于提供REST访问服务方式实现与外部系统信息交互。The service framework layer includes a REST gateway, and the REST gateway is used to provide a REST access service method to achieve information interaction with an external system. 7.根据权利要求6所述的基于交易中间件实现REST访问服务的网关系统实现方法,其特征在于,所述REST网关是基于REST架构风格、采用国际开放标准HTTP/1.1协议的网络软件系统;7. The method for implementing a gateway system for implementing REST access services based on transaction middleware according to claim 6, wherein the REST gateway is a network software system based on the REST architecture style and adopting the international open standard HTTP/1.1 protocol; 所述REST网关使用统一的接口规范定义资源的操作方式,使用统一资源标识符URI标识资源位置,使用媒体类型进行数据交互。The REST gateway uses a unified interface specification to define the operation mode of resources, uses a uniform resource identifier URI to identify the resource location, and uses a media type to perform data interaction. 8.根据权利要求6所述的基于交易中间件实现REST访问服务的网关系统实现方法,其特征在于,所述REST网关包括:监听器和网关处理器;8. The method for implementing a gateway system for implementing REST access services based on transaction middleware according to claim 6, wherein the REST gateway comprises: a listener and a gateway processor; 客户端调用REST资源地址与所述监听器建立socket连接;所述监听器将socket连接句柄传递给所述网关处理器,实现客户端与网关处理器的通信连接;The client calls the REST resource address to establish a socket connection with the listener; the listener passes the socket connection handle to the gateway processor to achieve a communication connection between the client and the gateway processor; 客户端通过HTTP协议完成请求数据的网络传输,并由所述网关处理器将请求报文包含的应用数据通过进程间通信传给应用服务器处理,应用服务器在服务程序执行后返回应答数据,网关处理器获得应答数据后封装为HTTP响应报文,并通过SSL协议加密后回复客户端。The client completes the network transmission of the request data through the HTTP protocol, and the gateway processor transmits the application data contained in the request message to the application server for processing through inter-process communication. The application server returns the response data after the service program is executed. After obtaining the response data, the gateway processor encapsulates it into an HTTP response message and replies to the client after encrypting it through the SSL protocol. 9.根据权利要求8所述的基于交易中间件实现REST访问服务的网关系统实现方法,其特征在于,所述监听器用于监听HTTP/S协议端口和UNIX域套接字端口,分别接收外部客户端和内部网关处理器的连接;9. The method for implementing a gateway system for implementing REST access services based on transaction middleware according to claim 8, characterized in that the listener is used to monitor the HTTP/S protocol port and the UNIX domain socket port to receive connections from external clients and internal gateway processors respectively; 所述监听器按照负载均衡的随机调度策略或最轻负载策略选择网关处理器,并向其传递客户端连接句柄,网关处理器基于客户端连接句柄与客户端进行数据交互。The listener selects a gateway processor according to a random scheduling strategy or a lightest load strategy of load balancing, and transmits a client connection handle to the gateway processor. The gateway processor performs data interaction with the client based on the client connection handle. 10.根据权利要求8所述的基于交易中间件实现REST访问服务的网关系统实现方法,其特征在于,所述网关处理器包括:连接管理模块、信息安全处理模块、HTTP协议处理模块和应用数据交互模块;10. The method for implementing a gateway system for implementing REST access services based on transaction middleware according to claim 8, characterized in that the gateway processor comprises: a connection management module, an information security processing module, an HTTP protocol processing module and an application data interaction module; 所述连接管理模块用于连接网关处理器和监听器,建立和管理与外部客户端请求之间的连接,同时为socket连接句柄和SSL层之间建立关联、设置数据读写事件;The connection management module is used to connect the gateway processor and the listener, establish and manage the connection with the external client request, and establish the association between the socket connection handle and the SSL layer and set the data read and write events; 所述信息安全处理模块用于基于对称密钥为通信双方传输报文进行加密和解密;The information security processing module is used to encrypt and decrypt messages transmitted by both parties of communication based on a symmetric key; 所述HTTP协议处理模块用于解析和封装HTTP/1.1请求和响应报文;The HTTP protocol processing module is used to parse and encapsulate HTTP/1.1 request and response messages; 所述应用数据交互模块用于通过进程间通信机制,从内存读取处理后的应答数据,然后封装为HTTP响应报文再进行加密回复客户端。The application data interaction module is used to read the processed response data from the memory through the inter-process communication mechanism, and then encapsulate it into an HTTP response message and then encrypt and reply to the client.
CN202510003995.5A 2025-01-02 2025-01-02 Gateway system and implementation method for implementing REST access service based on transaction middleware Pending CN119814869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510003995.5A CN119814869A (en) 2025-01-02 2025-01-02 Gateway system and implementation method for implementing REST access service based on transaction middleware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510003995.5A CN119814869A (en) 2025-01-02 2025-01-02 Gateway system and implementation method for implementing REST access service based on transaction middleware

Publications (1)

Publication Number Publication Date
CN119814869A true CN119814869A (en) 2025-04-11

Family

ID=95274380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510003995.5A Pending CN119814869A (en) 2025-01-02 2025-01-02 Gateway system and implementation method for implementing REST access service based on transaction middleware

Country Status (1)

Country Link
CN (1) CN119814869A (en)

Similar Documents

Publication Publication Date Title
Grüner et al. RESTful industrial communication with OPC UA
US9817657B2 (en) Integrated software development and deployment architecture and high availability client-server systems generated using the architecture
CN113079159A (en) Edge computing network architecture based on block chain
CN114172929B (en) Communication method, device and gateway
CN113791758B (en) Service arrangement localization execution system and method thereof
WO2011150600A1 (en) Enterprise service bus and message processing method for enterprise service bus
CN109614822A (en) A kind of Information Resource Access method, apparatus and system based on block chain
CN115412329A (en) An information processing method and related device for the Internet of Things
Ranawaka et al. Custos: Security middleware for science gateways
Bhat et al. CORECONF, NETCONF, and RESTCONF: Benchmarking network orchestration in constrained IIoT devices
CN118740899A (en) Virtual debugging communication method, device, equipment and storage medium
CN117149884A (en) Data processing transaction method
CN114189532B (en) Mass connection control strategy and instruction distribution method
CN111901384A (en) System, method, electronic device and readable storage medium for processing message
CN102082772A (en) Method and system for realizing resource information access
Bernstein et al. Using XMPP as a transport in Intercloud Protocols
CN119814869A (en) Gateway system and implementation method for implementing REST access service based on transaction middleware
CN117811833B (en) Unified network crypto-engine management system and method based on publishing and subscribing mode
CN118885237A (en) A method and device for calling application service
Vick et al. Using solana blockchain and OPC UA for trusted third party industrial robot control services
CN1611052A (en) Method and apparatus for controlling a multi-node process
CN112667393B (en) Method and device for building distributed task computing scheduling framework and computer equipment
CN116360374A (en) An industrial data acquisition gateway and method
KR100309561B1 (en) Security devices and methods in the corridor of web and information providers and their recording media
JP5035286B2 (en) Bus-type message exchange system, bus-type message exchange method and program

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