A basic middleware for network and distributed development

By designing basic middleware, including proxy layer, core layer and interface layer, supporting multi-level reverse proxy and unique programming language, it solves the problem of my country's Internet application underlying architecture relying on foreign products and achieves efficient network communication and load balancing. , improves development efficiency and system stability, and enhances security and reliability.

CN112882848BActive Publication Date: 2024-08-23WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110213002.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-25
Publication Date
2024-08-23
Estimated Expiration
2041-02-25

AI Technical Summary

Technical Problem

Our country relies on foreign products for the underlying architecture of Internet applications, which may lead to a perpetual cycle of low-level repetition and lack of breakthroughs in core technologies.

Method used

Designed a basic middleware, including proxy layer, core layer and interface layer, supporting multi-level reverse proxy, unique platform-level programming language Zoolina Script, with database and memory variables, built-in functions and classes, plug-in expansion capabilities, and monitoring and security functions, as well as distributed storage and visual programming, forming a complete middleware platform ecosystem.

Benefits of technology

It achieves efficient network communication, load balancing, security protection and development efficiency improvement, supports complex topology and multiple load balancing strategies, has good stability and scalability, is suitable for large file access and web application development, and has the ability to independently The self-organizing capabilities of the platform and clusters enhance the security and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112882848B
    Figure CN112882848B
Patent Text Reader

Abstract

The present invention discloses a basic middleware applied to network and distributed development, which is based on the system call and library function provided by the operating system to provide support for network and distributed application development. Through the outstanding performance of the basic middleware in basic functions such as network communication, message transmission, task scheduling, load balancing, application execution, data horizontal expansion, security protection, and programming scripts, a complete set of middleware platforms is formed. Not only does it have good applicability in existing artificial intelligence, big data, network security and other fields, but it is also planned to be further extended to digital media art, finance, transportation, energy, electricity, environmental protection and other industries, forming a rich field / industry middleware library, in order to break the monopoly of foreign software in China's basic middleware market, avoid the long-term low-level repetitive cycle of Chinese software companies, and achieve breakthroughs in key core technologies of domestic software, and make due contributions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology and relates to a basic middleware, in particular to a basic middleware providing support for network and distributed application development. Background Art

[0002] In the underlying architecture of Internet applications, my country basically uses foreign products for web servers, application servers, and basic development frameworks. The mainstream development languages ​​are Java, C#, node.js, etc., web servers are mostly apache, nginx, and IIS, and application servers are mostly weblogic, webshpere, tomcat, JBOSS, etc. The combination of these products has become the mainstream ecology of domestic application development. If this situation continues to develop, my country may always be in a low-level repetitive cycle in this field, and the breakthrough of key core technologies is even more distant. Summary of the invention

[0003] In order to solve the above technical problems, the present invention has chosen the positioning of basic middleware. Starting from the infrastructure such as network communication, message transmission, task scheduling, load balancing, application execution, data horizontal expansion, security protection, programming scripts, etc., a complete middleware platform ecology has been formed.

[0004] The technical solution adopted by the present invention is: a basic middleware applied to network and distributed development, characterized by: comprising a proxy layer, a core layer and an interface layer;

[0005] The proxy layer is a user-oriented layer, which is deployed in the form of a zlproxy server and can form a multi-level proxy structure for providing access to static resources and establishing a communication channel between users and back-end servers;

[0006] The core layer is deployed in the form of zlserver servers, and several zlserver servers form a cluster structure; the Zlserver server is responsible for processing the user's dynamic resource request;

[0007] The interface layer is used to provide an access interface to the operating system and hardware resources, and it provides underlying security for expanding the functions of zlserver.

[0008] The innovative features of the basic middleware (hereinafter referred to as Zoolina) of the present invention include:

[0009] 1. Zoolina supports three forwarding modes: Prefix-Through, Ip-Through, and Prefix-Keep, which can realize multi-level reverse proxy and form a complex topology structure;

[0010] 2. Zoolina has its own unique platform-level programming language, Zoolina Script, which can fully and efficiently utilize Zoolina's internal functions and facilitate the development of distributed applications;

[0011] 3. Zoolina Script has two types of variables: database variables and memory variables. It can complete database operations with a very small amount of code, simplify the development process, and improve development efficiency;

[0012] 4. Zoolina Script provides a large number of built-in functions and built-in classes, and you can use this language to write custom functions and classes;

[0013] 5. You can easily use C / C++ and Java to write plug-ins to expand the functions of Zoolina Script;

[0014] 6. Template files written in Zoolina Script can be automatically discovered and compiled, and the generated binary tpt files can be cached across the entire cluster, thereby improving the loading efficiency of the application;

[0015] 7. You can use template files to write websocket services, thereby reducing the difficulty of websocket server development;

[0016] 8. Users’ access behavior can be monitored and services can be refused to users suspected of malicious access;

[0017] 9. It can convert the computational flow graph into a template file, thus supporting visual programming of special functions;

[0018] 10. Realizes distributed storage of files, thus supporting storage and access services for large files;

[0019] 11. Ability to use template files to write timed services to facilitate the completion of time-based tasks.

[0020] The beneficial effects of the present invention include:

[0021] 1. It runs on Linux-like operating systems and has good stability;

[0022] 2. The system is developed from the bottom up using C / C++ language, which has high execution efficiency;

[0023] 3. Support http and https protocols, which can meet the development of various web application systems;

[0024] 4. Support the convenient use of template scripts to implement websockets server development;

[0025] 5. The system has its own platform-level programming language Zoolina Script, forming an environment with an internal development ecosystem;

[0026] 6. Support multi-level reverse proxy, support three forwarding modes: Prefix-Through, Ip-Through, and Prefix-Keep;

[0027] 7. It has the self-organizing function of the cluster, and new nodes can be added at any time. Once an abnormal node is found, the node will be automatically removed from the cluster;

[0028] 8. Support multiple load balancing strategies and can be expanded as needed;

[0029] 9. Supports automatic discovery and compilation of script files, which improves the convenience of development;

[0030] 10. Support remote editing, compiling and debugging to meet the needs of the team for large-scale software development;

[0031] 11. The system has good scalability and can be deployed in a variety of flexible ways to form a cluster structure that meets the needs of the actual environment;

[0032] 12. The system supports a variety of mainstream system databases and non-relational database structures, and supports horizontal expansion of data;

[0033] 13. The system has low-level communication interfaces with C, C++ and Java languages, which can facilitate secondary development and expansion of system functions;

[0034] 14. Support system-level logging function to help system analysis and management;

[0035] 15. Support hot deployment of applications to enhance reliability, convenience and stability;

[0036] 16. It has the function of detecting malicious access, which can block malicious users and thus improve the security of the system;

[0037] 17. It has multi-level cache capability for executing code to improve the access efficiency of the system;

[0038] 18. Support cluster-wide variable sharing and event triggering;

[0039] 19. The application integration of legacy systems and new systems can be realized through reverse proxy function;

[0040] 20. Improve the application system functions through the timed execution mechanism of template files;

[0041] 21. Supports quick and easy generation of JSON data, facilitating data exchange between the server and the client. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the framework of an embodiment of the present invention;

[0043] Figure 2 This is the basic middleware deployment method of the embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0045] Please see Figure 1 The present invention provides a basic middleware for network and distributed development, which is divided into three layers: a proxy layer, a core layer and an interface layer. The proxy layer is deployed in the form of a zlproxy server, and a multi-level proxy structure can be formed. Its main function is to provide access to static resources and establish a channel for users to communicate with back-end servers. The proxy layer is a user-oriented layer. The core layer is deployed in the form of a zlserver server, and multiple zlserver servers can form a cluster structure. Zlserver is responsible for completing critical computing tasks, that is, it is responsible for processing users' dynamic resource requests. The reason why Zlserver is called the core layer is that for network applications, most of the business logic is implemented on this layer. The interface layer provides an access interface to the operating system and hardware resources, which provides underlying protection for expanding the functions of zlserver.

[0046] This embodiment uses Socket connection pool to complete communications at all levels. In zlproxy, two connection pools are maintained, one is the connection pool initiated by the client to connect to the proxy server (the server here refers to the server where zlproxy is installed, because it is mainly engaged in reverse proxy work, generally called a proxy server), and the other is the connection pool initiated by zlproxy to connect to the backend zlserver server. The sockets in these two connection pools are in the form of long connections, that is, a connection will only be destroyed when an error occurs or the complete access task has ended, otherwise it will be reused, which can improve the work efficiency of the entire system. For a specific customer visit, the sockets in these two connection pools will form a socket-pair according to the rules to form a communication channel. After the communication is completed, the two sockets in this socket-pair will be unbound;

[0047] This embodiment completes the task distribution according to the different resources requested by the user. If the URL contains a specific prefix, it will be forwarded to the specified server according to the request. Otherwise, it determines whether the request is a local static resource or a backend dynamic service. If it is the latter, the request is forwarded according to the load balancing strategy;

[0048] This embodiment divides dynamic resources into four types to complete different processing tasks. These four types are websocket service, template service, lightweight specialmethod and heavyweight specialmethod. These service types involve implementation strategies and details such as load balancing, priority allocation, thread creation and destruction, and database services;

[0049] This embodiment improves the operation efficiency by maintaining a thread pool and a database connection pool inside zlserver. For heavyweight specialmethods, threads and database connections are opened separately to complete complex tasks that require long processing time.

[0050] In this embodiment, all zlservers in the same cluster share a memory-based cache system, which can implement transaction operations within the cluster, complete message transmission between nodes in the cluster, and maintain data consistency and operation integrity;

[0051] The zlservere service in the zoolina system of this embodiment monitors all template files in a specific directory. Once a new template file is found or an existing template file is modified, these files will be immediately compiled into binary code and loaded into the cache system of the cluster to provide a processing program for subsequent access;

[0052] This embodiment uses the QTimer class provided by Qt to form multiple clock sequences in zlproxy and zlserver. These sequences have local data structures and backward-triggered timing tasks, and are responsible for releasing space after the sequence tasks are completed.

[0053] In this embodiment, when multiple systems need to be integrated, the URL prefix of each subsystem to be integrated can be specified in the configuration file, and the forwarding mode can be set to prefix-keep, so as to efficiently complete the system integration;

[0054] This embodiment utilizes the C++ plug-in provided by Qt and the jar package mechanism provided by Java to expand the functions of the API supported by zlserver and seamlessly integrate the excellent framework into the Zoolina framework;

[0055] In this embodiment, ZoolinaScript can be used to write classes and functions to form a template framework, providing reusable codes for future software development in specific fields.

[0056] Please see Figure 2 The deployment mode of Zoolina in this embodiment is very flexible, and is mainly deployed according to the needs of the distributed application system. A zlproxy server can be connected to a zlserver server to form a minimized zoolina deployment, realizing the basic functions of a small and medium-sized website system. Complex applications may form a multi-level tree configuration, with a zlproxy node as the root of the tree, accepting user requests, and then distributing them to the next level of nodes according to the forwarding rules or proxy rules, until it reaches the last application server node to complete the operation and transmit the results back to the client.

[0057] In complex configurations, multiple clusters of different natures are formed, including storage clusters and computing clusters, to achieve the development of a single system and the integration of multiple application systems.

[0058] The following is an experimental comparison of the running effects of Zoolina and mainstream middleware software. The test (virtualization environment): 2609V3-single cpu-8G / liunx 3.10.0-514.26.2.el7.x86_64#1SMP Tue Jul 4 / Jmeter4.0r1823414 / static html page, including pictures. The experimental results are shown in Table 1.

[0059] Table 1

[0060]

[0061]

[0062]

[0063] It can be clearly seen from the data in Table 1 that Zoolina software middleware has reached the level of first-class foreign software middleware in processing network request data and calculations.

[0064] In Zoolina's view, the bottom layer is the most important. A weak foundation will inject bad genes into the development of the entire industry, and sooner or later it will expose the defect of insufficient stamina at a certain moment. What we are doing now is to lay the foundation for the information industry of the entire country. There is reason to believe that the maturity and development of Zoolina will inevitably bring new prospects for the development of China's information industry.

[0065] The middleware of this embodiment has been experimentally applied to a number of application systems in different fields and with different requirements, and has achieved satisfactory results.

[0066] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A basic middleware for network and distributed development, characterized by: Includes proxy layer, core layer and interface layer; The proxy layer is a user-oriented layer, which is deployed in the form of a zlproxy server and can form a multi-level proxy structure for providing access to static resources and establishing a communication channel between users and back-end servers; the zlproxy server maintains two connection pools, one is a connection pool initiated by the client to connect to the proxy server, and the other is a connection pool initiated by zlproxy to connect to the back-end zlserver server; the sockets in the two connection pools are in the form of long connections; for a specific customer access, the sockets in the two connection pools will form a socket-pair according to the rules to form a communication channel; after the communication is completed, the two sockets in the socket-pair will be unbound; The core layer is deployed in the form of zlserver servers, and several zlserver servers form a cluster structure; the Zlserver server is responsible for processing the user's dynamic resource request, and completes different processing tasks by dividing the dynamic resources into four types; the four types include websocket service, template service, lightweight specialmethod and heavyweight specialmethod; the Zlserver server is responsible for processing the user's dynamic resource request, and completes the distribution of tasks according to the different resources requested by the user; if the URL contains a specific prefix, it will be forwarded to the specified server according to the request; otherwise, it is determined whether the request is a local static resource or a backend dynamic service, and if it is the latter, the request is forwarded according to the load balancing strategy; The interface layer is used to provide an access interface to the operating system and hardware resources, and it provides underlying security for expanding the functions of zlserver; The zlserver server maintains a thread pool and a database connection pool to improve operation efficiency. For heavyweight specialmethods, threads and database connections are opened separately to complete complex tasks that require long processing time. Using the QTimer class provided by Qt, multiple clock sequences are formed in the zlproxy server and zlserver server. These sequences have local data structures and backward-triggered timing tasks, and are responsible for releasing the space after the sequence task is completed.

2. The basic middleware for network and distributed development according to claim 1, characterized in that: All zlserver servers in the same cluster share a memory-based cache system that can implement transaction operations within the cluster, complete message transmission between nodes in the cluster, and maintain data consistency and operational integrity.

3. The basic middleware for network and distributed development according to claim 1, characterized in that: The zlservere service in the zoolina system monitors all template files in a specific directory. Once new or modified template files are found, these files will be immediately compiled into binary code and loaded into the cluster's cache system to provide a handler for subsequent access.

4. The basic middleware for network and distributed development according to claim 1, characterized in that: When integrating multiple systems, specify the URL prefix of each subsystem that needs to be integrated in the configuration file and set the forwarding mode to prefix-keep.

5. The basic middleware for network and distributed development according to any one of claims 1 to 4, characterized in that: The basic middleware can be deployed according to the needs of distributed application systems; or a zlproxy server is connected to a zlserver server to form a minimized basic middleware deployment to realize the basic functions of a small or medium-sized website system; or a zlproxy server node is used as the root of the tree to accept user requests, and then distribute them to the next level node according to forwarding rules or proxy rules until it reaches the last application server node to complete the calculation and transmit the result back to the client, forming a multi-level tree configuration.