A high-concurrency system based on hybrid mode
By integrating the presentation layer and business processing layer on the client side, using asynchronous calls to the local web service on the server side, and combining B/S architecture and RIA technology, the server-side computation and business processing are distributed to the client side, solving the server-side performance problem of the three-tier C/S architecture under high concurrency, and achieving stable operation and high throughput under high concurrency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUADI COMP GROUP
- Filing Date
- 2022-11-29
- Publication Date
- 2026-06-30
AI Technical Summary
The existing three-tier client/server architecture is prone to performance issues on the server side under high concurrency. The client is only responsible for the presentation layer, and the business processing relies on the server side, resulting in excessive pressure on the server side.
The high-concurrency system adopts a hybrid model, which integrates the functions of the presentation layer and the business processing layer into the client. It calls the local web service of the server in an asynchronous manner, and the client completes the calculation and business processing. Combining the B/S architecture and RIA technology, the server-side calculation and business processing are distributed to the client, and the business logic is handled by dynamic caching and plug-in.
It effectively improves the concurrency capability of the C/S architecture, the response speed and throughput of the server, reduces the pressure on the server, and achieves stable operation under high concurrency.
Smart Images

Figure CN115865887B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer system technology, and more specifically to a high-concurrency system based on a hybrid mode. Background Technology
[0002] The server-client (C / S) architecture typically employs a two-tier structure. However, with the rapid development of the internet and the advancement of various technologies, the shortcomings of the C / S architecture have become increasingly apparent over time. This has led to the emergence of a three-tier C / S architecture. This three-tier architecture separates business logic processing, user interface presentation, and data processing, ensuring clear division of responsibilities. The three tiers are: Presentation Layer (UI): The user interface, the WYSIWYG interface for users; Business Logic Layer (BLL): Handles business logic operations, processing user interactions; this layer sits between the presentation layer and the data layer; Data Access Layer (DAL): This layer directly manipulates the database, handling data addition, deletion, modification, and querying.
[0003] Currently, the three-tier architecture logically distinguishes the first layer as the presentation layer, i.e., the browser, which only has simple input / output functions and handles a very small amount of transaction logic. Since clients do not need to install a client application; they only need a browser to access the internet, it is geared towards a wide range of users, and its interface design is relatively simple and universal.
[0004] The second layer is the web server. When a user wants to access the database, they first send a request to the web server. After the web server receives the request, it sends a request to the database server to access the database.
[0005] The third layer is the database server, which stores a large amount of data. When the database server receives a request from the web server, it processes the SQL statement and sends the returned result back to the web server.
[0006] The more layers a software design has, the worse its performance becomes. A three-tier client / server architecture has many drawbacks, such as: the client is only responsible for the presentation layer, and all business processing relies on the server. The server is responsible for business processing and all data operations. When the number of clients reaches a certain level, the server will inevitably encounter concurrency performance issues. Summary of the Invention
[0007] To address the above problems, this application provides a high-concurrency system based on a hybrid mode, comprising:
[0008] The client integrates the functions of the presentation layer and the business processing layer. It uses an asynchronous method to call the local web service of the server. The client completes the computation and business processing of the interaction with the server, realizes distributed computing based on C / S, and bears the pressure on the server under high concurrency of the client.
[0009] The server provides a user interface for the client. After the client loads the static page, the static page is combined with the local web service, and the operation service in the user interface is taken over by the local web service, thus distributing business processing to the client. The server also provides dynamic data caching for query requests.
[0010] The database server provides data storage services to the system.
[0011] Furthermore, the presentation layer, located between the server and the client, requests static pages from the server based on the configured server address, and renders the server-side static pages locally using a closed WebKit.
[0012] Furthermore, the static page uses an asynchronous method to call the local web service, migrating the interaction with the server to the client, thereby transferring the server's computation and business processing to the client and realizing distributed computing based on C / S.
[0013] Furthermore, the presentation layer encapsulates hook functions, which are used to uniformly process business logic into plugins.
[0014] After the client starts, the business processing layer loads the plugin through the hook function. The business processing layer triggers the corresponding business components based on the operation of the presentation layer to process the relevant business logic.
[0015] Furthermore, the business processing layer is a passively executed program used to handle the business processing work of the client. After generating business through interaction with the user via the presentation layer, it calls the local web service.
[0016] The local web service invokes the relevant plugins that drive the business layer based on the business type identifier.
[0017] Furthermore, the local web service invokes relevant plugins that drive the business layer based on the business type identifier, including:
[0018] The software installation process calls the breakpoint resume plugin to cache resume software information, ensuring that the download can continue even when the network is interrupted, the download is interrupted by power, or the download is forcibly closed.
[0019] The software downloads a plugin, and then installs the plugin.
[0020] Furthermore, the services provided by the client also include: system configuration service, caching service, monitoring service, data interface service, authentication service, platform management service, basic platform services, and log service.
[0021] Furthermore, the presentation layer and the business processing layer update the data through the server-side data interface using the data processing results.
[0022] Furthermore, the local web service adopts a B / S architecture and, through integration with the interface provided by the server, takes over the server's business processing and data processing functions.
[0023] Based on the business type identifier, the relevant plugins in the driver business layer are invoked. After the business processing is completed, the plugins call the server-side data interface to perform corresponding operations on the data.
[0024] Furthermore, on the server side, dynamic data caching is provided for query requests, including:
[0025] By employing Spring AOP aspect-oriented programming and RAID caching techniques, query operations are intercepted, and data is dynamically cached for each query.
[0026] Data is dynamically cached based on the configured cache boundary values.
[0027] This invention effectively improves the concurrency of the C / S architecture. The server accurately caches parameter data, and a large amount of repetitive data is provided to the client using in-memory methods. The client takes over the server's business processing through the presentation layer and business processing layer. Business logic processing is distributed to each client for independent processing and calculation, thereby achieving high concurrency when a large number of clients access the server. This solution effectively improves the high concurrency throughput of the C / S three-tier architecture. Attached Figure Description
[0028] Figure 1 This is a framework diagram of a high-concurrency system based on a hybrid model provided in this application;
[0029] Figure 2 This application provides a client framework diagram for a high-concurrency system based on a hybrid model.
[0030] Figure 3 This application provides a server-side framework diagram for a high-concurrency system based on a hybrid model.
[0031] Figure 4 This is a diagram of the presentation layer framework involved in this application. Detailed Implementation
[0032] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0033] In view of the above problems, this invention is proposed to provide a solution that overcomes the above problems by combining the advantages of both, adopting a C / S+B / S+BS (Browser / Server) hybrid architecture mode. Based on the B / S three-tier model, it combines RIA (Rich Internet Applications) technology, which is a highly interactive, user-friendly, and powerful client, to distribute all concurrency to various clients for processing, thereby improving server performance and increasing server throughput.
[0034] Addressing performance issues inherent in three-tier architectures, this application presents a hybrid high-concurrency system that redesigns the existing three-tier solution. While maintaining the existing three-tier architecture, it combines a two-tier B / S architecture with a one-tier C / S architecture, employing a hybrid network architecture. The server-side, using a B / S architecture, primarily provides static page services and validation services for the client presentation layer, lightweight RESTful data interface services, and basic data validation services. The client-side, also using a B / S architecture, mainly encapsulates the presentation layer, business processing layer, local web services, and other interactions with the local operating system. The local client and server are integrated using a C / S architecture.
[0035] A high-concurrency system based on a hybrid model, such as Figure 1 As shown, it includes:
[0036] The client integrates the functions of the presentation layer and the business processing layer. It uses an asynchronous method to call the local web service of the server. The client completes the computation and business processing of the interaction with the server, realizes distributed computing based on C / S, and bears the pressure on the server under high concurrency of the client.
[0037] The server provides a user interface for the client. After the client loads the static page, the static page is combined with the local web service. The operation service in the user interface is taken over by the local web service, distributing business processing to the client. The server provides dynamic caching to provide dynamic data caching for query requests, improving the server's response speed and concurrent processing capabilities.
[0038] The database server provides data storage services to the system.
[0039] The client integrates the presentation layer and the business processing layer. The presentation layer encapsulates the rendering architecture and only performs page rendering. It loads static pages provided by the server for rendering. The static pages use cross-domain technology and RIA (Rich Internet Applications) to interact with the local web. This combination of technologies is the key to solving high concurrency. The business processing layer encapsulates hook functions and provides extensible slots. All business processes are uniformly packaged as plugins. After the client starts, it drives business processing by loading plugins through hook functions. The business processing layer mainly triggers corresponding business components based on the operations of the presentation layer, processes relevant business logic, and responds to the presentation layer after data processing. The flexibility of business plugins and the localized operation of business insertion are the main key design features. The data access layer encapsulates all underlying data processing operations and drives data access operations through a lightweight RESTful interface provided by the server. After the client performs business processing, it needs to call the underlying data. It calls the data access layer through the interface, processes the data, and returns the corresponding data and data status.
[0040] Presentation layer module: its framework is as follows Figure 4 As shown, the presentation layer sits between the service and the client. It requests static page services from the server based on the configured server address and renders the server-side static pages locally using a WebKit wrapper. The static pages asynchronously call the local web service. This part migrates a large amount of interaction with the server to the client, thus transferring most of the server's computation and business processing to the client, achieving distributed computing based on a client / server architecture. This ensures the server is not burdened by a large number of clients with high concurrency. The client-side business processing layer is responsible for all computation and business processing capabilities, and updates the data through the server's data interface after processing. For the server, the presentation layer is simply the page published by the server, interacting with the server asynchronously. The server backend only provides basic data interfaces. For the client, this layer provides the user interface. The presentation layer consists of five parts: a page display module responsible for page rendering; a business processing module responsible for handling the page display effects during user interaction; a data validation module responsible for basic data validation after obtaining data through the data communication module; and a data caching module responsible for temporary data caching when the user interacts with the client.
[0041] Business Processing Layer: This layer moves the network communication access processing layer of the existing three-tier architecture to the client side, handling all business processing tasks for the current client. It is developed using the cross-platform language Python. This template uses Python to encapsulate component slots to load various business processing plugins. The business processing layer passively executes programs. After interacting with the user through the presentation layer and generating business logic, it calls local web services. The local web services, based on the business type identifier, call the relevant plugins driving the business layer. For example, in software installation business processing, it first calls the breakpoint resume plugin to cache resume software information, ensuring that downloads can continue even if the network is interrupted, the download is interrupted by power, or the download is forcibly closed. Next, it calls the software download plugin, and after downloading, it calls the software installation plugin. Throughout the process, each plugin calls a logging plugin to record logs.
[0042] The local web service module is the core module for building a local B / S architecture. This module seamlessly integrates with the server-side interface to take over server business processing and data calculation functions, thus distributing all the pressure to each client. The client itself does not provide an interactive interface with the user. The client requests static page services from the server, renders the static page through the local presentation layer, and interacts with the user. The static page communicates with the local web service module through RIA technology (such as synchronous / asynchronous AJAX). The local web service calls the corresponding business processing plugin based on the requested business identifier. After the business processing is completed, it calls the server's data interface through the network plugin to perform corresponding operations on the data.
[0043] The client primarily utilizes Python 2.7 cross-platform technology, with WebKit technology used for the presentation layer rendering. Local web services and other components are encapsulated in Python. Low-level operating system operations are encapsulated using shell scripting language. The client module mainly includes a local web service module, a page display module, business component slots, a script module, a statistics module, a monitoring module, an information collection module, a configuration module, a network module, a data validation module, and other modules (software installation module, software uninstallation module, local data caching module, etc.). The page display module, or presentation layer, is a crucial part of this invention. The presentation layer sits between the service and the client, and its configuration... The client requests a static page service from the server using the specified address. The local machine renders the static page using a WebKit wrapper. The static page asynchronously calls the local web service. This part migrates a large amount of interaction with the server to the client, thereby transferring most of the server's computation and business processing to the client. This achieves distributed computing based on a client / server architecture, ensuring the server is unaffected by high concurrency from a large number of clients. The client's business processing layer handles all computation and business processing capabilities, and updates the data through the server's data interface after processing. For the server, the presentation layer is simply the page published by the server, interacting with the server asynchronously. The server backend only provides basic data interfaces. The client framework is as follows: Figure 2 As shown.
[0044] The business processing layer moves the existing three-tier architecture to the client via network communication access to the processing layer. It is responsible for all business processing tasks on the current client side. This module is a key part of this invention and is developed using the cross-platform language Python. This template uses Python to encapsulate component slots to load various business processing plugins. The business processing layer passively executes programs. After generating business through interaction with the user via the presentation layer, it calls the local web service. The local web service calls the relevant plugins that drive the business layer according to the business type identifier. For example, in software installation business processing, it first calls the breakpoint resume plugin to cache the resume software information, ensuring that the download can continue even if the network is interrupted, the download is interrupted by power, or the download is forcibly closed. Then, it calls the software download plugin, and after downloading, it calls the software installation plugin. Throughout the process, each plugin calls the logging plugin to record logs.
[0045] The local web service module is the core module for building a local B / S architecture. This module seamlessly integrates with the server-side interface to take over server business processing and data calculation functions, thus distributing all the pressure to various clients. The client itself does not provide an interactive interface with the user. The client requests static page services from the server, renders the static page through the local presentation layer, and interacts with the user. The static page communicates with the local web service module through RIA technology (such as synchronous / asynchronous AJAX). The local web service calls the corresponding business processing plugin based on the requested business identifier. After the business processing is completed, it calls the server-side data interface through the network plugin to perform corresponding operations on the data.
[0046] The operating system service module mainly handles operations related to the operating system.
[0047] Other plugins primarily assist with client-side business processing.
[0048] The server-side primarily uses the mainstream Spring MVC framework. The data persistence layer uses MyBatis technology to encapsulate database operations. The data interface uses RESTful technology to publish external interfaces. The authentication system uses Shrio technology to provide authentication services. Static pages use HTML technology to provide the client-side presentation layer. The data caching service dynamically caches data using aspect-oriented programming, primarily relying on RAID technology. The logging service uses Log4j to provide logging support for the system. The server-side framework is as follows: Figure 3 As shown.
[0049] The main service modules of the client include system configuration service, caching service, monitoring service, data interface service, authentication service, platform management service, basic platform service, and log service.
[0050] The system configuration service configures basic system data such as system upload file path, system database configuration, cache service configuration, cache time configuration, system name, system logo, system static resources, static page storage path, system whitelist, and system integration SSO configuration.
[0051] The caching service caches data using strategies. For example, when client A retrieves data block A1, the cache will temporarily store it (the system configuration module configures the temporary storage in milliseconds) and use the hash value of the data retrieval conditions as the key. The next time this data block is hit, the data cache time will be updated, thereby dynamically caching the server-side data, which effectively solves the server request pressure.
[0052] The monitoring service is used to monitor the usage of various services on the server, service callers, and call latency, etc.; the static page service provides static pages and static page validation functions for the client.
[0053] The data interface service provides data operation services to clients. When the interface is called, the strategy module compares the currently obtained data with the previously obtained data. If they match, the data will be retrieved from the cache, and the data expiration time will be updated. Unstructured file downloads use a sliding window for flow control.
[0054] The authentication service provides administrator authentication for the system and access token information for clients.
[0055] The platform management service provides user management, client management, process management, software policy management, and other functions.
[0056] The platform's basic services include platform resource management, access control, and organizational structure management.
[0057] The log service uses log4j to provide logging support for the system.
[0058] Static page service: Provides a user interface for the client. The static page logic handles a service layer between the server and the client, and can simultaneously access the data service submitted by the server and the web service provided by the client. After the client finishes loading the static page, it combines with the local web service to form a local web service. All operation services in the interface are uniformly taken over by the local service, so that all business processing is distributed to the client, and the interface requests are uniformly processed locally.
[0059] Data Interface Service: This service provides basic data operation services, publishes services to the outside world through RESTful interfaces, and caches data dynamically for all client-side search services.
[0060] Dynamic caching method: This method mainly uses Spring AOP aspect-oriented programming and RAID caching technology to intercept all query operations and dynamically cache data for each query, thereby improving server response speed. This method dynamically caches data based on configured cache boundary values, which greatly improves the server's concurrent processing capabilities.
[0061] This invention effectively improves the concurrency of the C / S architecture. The server accurately caches parameter data, and a large amount of repetitive data is provided to the client using in-memory methods. The client takes over the server's business processing through the presentation layer and business processing layer. Business logic processing is distributed to each client for independent processing and calculation, thereby achieving high concurrency when a large number of clients access the server. This solution effectively improves the high concurrency throughput of the C / S three-tier architecture.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A high-concurrency system based on a hybrid model, characterized in that, include: The client integrates the functions of the presentation layer and the business processing layer. It asynchronously calls the local web service of the server, and the client completes the computation and business processing of the interaction with the server, realizing distributed computing based on C / S and absorbing the pressure on the server under high client concurrency. The presentation layer is located between the server and the client. It requests static pages from the server according to the configured server address and renders the static pages of the server locally through the enclosed WebKit. The static pages asynchronously call the local web service, migrating the interaction with the server to the client, thereby transferring the computation and business processing of the server to the client and realizing distributed computing based on C / S. The business processing layer is a passively executed program used to handle business processing tasks on the client side. After generating business through interaction with the user via the presentation layer, it calls local web services. The local web service invokes the relevant plugins that drive the business layer based on the business type identifier; The local web service adopts a B / S architecture and takes over the server's business processing and data processing functions by combining with the interface provided by the server. Based on the business type identifier, the relevant plugins in the driver business layer are invoked. After the business processing is completed, the server-side data interface is invoked through the plugin to perform corresponding operations on the data. The server provides the user interface for the client. After the client loads the static page, the static page is combined with the local web service. The operation services in the user interface are taken over by the local web service, distributing business processing to the client. On the server side, dynamic data caching is provided for query requests. The database server provides data storage services to the system.
2. The system according to claim 1, characterized in that, The presentation layer encapsulates hook functions, which are used to uniformly process business logic into plugins. After the client starts, the business processing layer loads the plugin through the hook function. The business processing layer triggers the corresponding business components based on the operation of the presentation layer to process the relevant business logic.
3. The system according to claim 1, characterized in that, The local web service invokes relevant plugins that drive the business layer based on the business type identifier, including: The software installation process calls the breakpoint resume plugin to cache resume software information, ensuring that the download can continue even when the network is interrupted, the download is interrupted by power, or the download is forcibly closed. The software downloads a plugin, and then installs the plugin.
4. The system according to claim 1, characterized in that the service provided by the client further includes: System configuration service, caching service, monitoring service, data interface service, authentication service, platform management service, platform basic service, and log service.
5. The system according to claim 1, characterized in that, The presentation layer and the business processing layer update the data through the server-side data interface, and process the data processing results.
6. The system according to claim 1, characterized in that, On the server side, dynamic data caching is provided for query requests, including: By employing Spring AOP aspect-oriented programming and RAID caching techniques, query operations are intercepted, and data is dynamically cached for each query. Data is dynamically cached based on the configured cache boundary values.