Design method, device, storage medium and processor of distributed architecture

By introducing a listening process and a mounting process into the distributed architecture, the problem of controlling the upper limit of memory usage was solved, enabling reasonable allocation of memory and concurrent processing of multiple client requests, thereby improving system performance and bandwidth performance.

CN116346838BActive Publication Date: 2026-02-03BEIJING XSKY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310301371.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2026-02-03
Estimated Expiration
2043-03-24

AI Technical Summary

Technical Problem

In a distributed architecture, the inability to effectively control the upper limit of memory usage leads to improper resource management.

Method used

By introducing a combination of a listening process and a mounting process in the distributed architecture, the listening process handles client protocol requests, while the mounting process shares authentication and configuration functions. These processes are independent of each client's child process, thus achieving reasonable allocation and control of memory.

Benefits of technology

It achieves effective control over memory usage, enables concurrent processing of multiple client requests, and improves system performance and bandwidth performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346838B_ABST
    Figure CN116346838B_ABST
Patent Text Reader

Abstract

The application discloses a design method and device of a distributed architecture, a storage medium and a processor. The method comprises the following steps: obtaining at least one to-be-processed request; in response to the to-be-processed request, calling a monitoring process and a mounting process associated with the monitoring process, wherein the monitoring process is used for executing a query operation through the mounting process; executing the query operation on attribute information of the to-be-processed request through the mounting process to obtain a query result, wherein the attribute information comprises authentication information and / or configuration information; and determining a feedback result of the to-be-processed request based on the query result and the monitoring process, wherein the feedback result is used for representing whether the to-be-processed request is completed under the distributed architecture. The application solves the technical problem that the upper limit of the use of memory cannot be controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed storage, and more specifically, to a design method, apparatus, storage medium, and processor for a distributed architecture. Background Technology

[0002] In the relevant technologies, the current distributed architecture mainly uses a single process to serve a single client. However, since each client connection requires a separate child process, it leads to the technical problem of not being able to control the upper limit of memory usage.

[0003] There is currently no effective solution to the problem of not being able to control the upper limit of memory usage. Summary of the Invention

[0004] This invention provides a design method, apparatus, storage medium, and processor for a distributed architecture, to at least address the technical problem of the inability to control the upper limit of memory usage.

[0005] According to one aspect of the present invention, a method for designing a distributed architecture is provided. The method may include: acquiring at least one request to be processed; in response to the request to be processed, invoking a listening process and a mounting process associated with the listening process, wherein the listening process is used to perform a query operation through the mounting process; performing a query operation on the attribute information of the request to be processed through the mounting process to obtain a query result, wherein the attribute information includes authentication information and / or configuration information; and determining a feedback result for the request to be processed based on the query result and the listening process, wherein the feedback result is used to characterize whether the request to be processed has been completed under the distributed architecture.

[0006] Optionally, obtaining at least one request to be processed includes: obtaining a request message to be processed, wherein the request message to be processed is data to be transmitted corresponding to the request to be processed; and determining at least one request to be processed based on the request message to be processed.

[0007] Optionally, in response to pending requests, the listening process and the mounting process associated with the listening process are invoked, including: in response to pending requests, determining the number of concurrent users and the number of pending requests; and invoking the listening process and the mounting process associated with the listening process based on the number of users and the number of pending requests.

[0008] Optionally, based on the number of users and the number of pending requests, the listening process and the mounting process associated with the listening process are invoked, including: creating the listening process and the mounting process associated with the listening process based on the number of users and the number of pending requests; and invoking the listening process and the mounting process.

[0009] Optionally, the mounting process performs a query operation on the attribute information of the request to be processed to obtain query results, including: recording the authentication information and configuration information of the request to be processed through the mounting process; performing a query operation on the authentication information and configuration information to obtain query results, wherein the query results are used to enable the server to process the request to be processed.

[0010] Optionally, based on the query results and the listening process, the feedback result of the pending request is determined, including: based on the query results and the listening process, determining the target pending request; processing the target pending request as a pending request, and determining the feedback result of the pending request.

[0011] Optionally, after determining the feedback result of the request to be processed based on the query results and the listening process, the design method further includes: performing a feedback operation on the feedback result to obtain a feedback result, wherein the feedback result is used to characterize the processing status of the request to be processed.

[0012] According to one aspect of the present invention, a design apparatus for a distributed architecture is provided. The apparatus may include: an acquisition unit for acquiring at least one request to be processed; an invocation unit for invoking a listening process and a mounting process associated with the listening process in response to the request to be processed, wherein the listening process is used to perform a query operation through the mounting process; a query unit for performing a query operation on the attribute information of the request to be processed through the mounting process to obtain a query result, wherein the attribute information includes authentication information and / or configuration information; and a determination unit for determining a feedback result of the request to be processed based on the query result and the listening process, wherein the feedback result is used to characterize whether the request to be processed has been completed under the distributed architecture.

[0013] According to another aspect of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to execute the distributed architecture design method of the present invention.

[0014] According to another aspect of the present invention, a processor is also provided. The processor is used to run a program, wherein the program, when run by the processor, executes the design method of the distributed architecture of the present invention.

[0015] In this embodiment of the invention, at least one request to be processed is obtained; in response to the request to be processed, a listening process and a mounting process associated with the listening process are invoked, wherein the listening process is used to perform a query operation through the mounting process; a query operation is performed on the attribute information of the request to be processed through the mounting process to obtain a query result, wherein the attribute information includes authentication information and / or configuration information; based on the query result and the listening process, a feedback result of the request to be processed is determined, wherein the feedback result is used to characterize whether the request to be processed is completed in a distributed architecture. In other words, in this embodiment of the invention, the pending request sent by the client is first obtained. Then, in response to the specific type of the pending request, the listening process and the mounting process associated with the listening process are invoked. After invoking the listening process and the mounting process, the listening process performs a query operation on the authentication information and / or configuration information of the pending request through the mounting process to obtain the query result. Finally, based on the obtained query result and the invoked listening process, the feedback result of the pending request is determined, that is, whether the pending request is completed according to the specific type of the pending request under the designed distributed architecture. This achieves the goal of concurrently processing multiple concurrent requests from a single client, thereby solving the technical problem of being unable to control the upper limit of memory usage and realizing the technical effect of being able to control the upper limit of memory usage. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of a distributed architecture design method according to an embodiment of the present invention;

[0018] Figure 2(a) is a schematic diagram of a distributed storage system according to an embodiment of the present invention;

[0019] Figure 2(b) is a schematic diagram of a message processing system based on a thread pool according to an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram of a concurrent request according to an embodiment of the present invention;

[0021] Figure 4(a) is a schematic diagram of server performance data comparison according to an embodiment of the present invention;

[0022] Figure 4(b) is a schematic diagram of bandwidth performance data comparison according to an embodiment of the present invention;

[0023] Figure 5 This is a schematic diagram of a design apparatus for a distributed architecture according to an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] Example 1

[0027] According to embodiments of the present invention, a design method for a distributed architecture is provided. It should be noted that the steps shown in the flowcharts in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0028] The design method of the distributed architecture of this invention will be described below from the management perspective.

[0029] Figure 1 This is a flowchart of a distributed architecture design method according to an embodiment of the present invention, such as... Figure 1 As shown, the method may include the following steps:

[0030] Step S101: Obtain at least one pending request.

[0031] In the technical solution provided by step S101 of the present invention, the main process obtains at least one pending request sent by the client. The at least one pending request may include at least one of the following: creation request, write request, read request, insert request, delete request, etc. This is only an example and is not specifically limited.

[0032] Optionally, the pending requests can be one or more concurrent requests sent by the same client at the same time, or they can be one or more concurrent requests sent by different clients at the same time.

[0033] Step S102: In response to the pending request, the listening process and the mounting process associated with the listening process are invoked.

[0034] In the technical solution provided by step S102 of the present invention, after obtaining at least one pending request, the main process responds to the pending request by creating a listening process and a mounting process associated with the listening process. Then, it calls the created listening process to handle the client protocol request and accesses the mounting process associated with the listening process by calling the listening process, thereby calling the mounting process to perform a query operation. The listening process can be used to perform a query operation through the mounting process. The number of listening processes can correspond to the number of clients. The mounting process can be used to provide authentication and / or configuration functions to the listening process. The mounting process can be shared by all clients.

[0035] For example, if 10 clients send 12 pending requests, in response to these 12 requests, 10 listening processes and 1 mounting process are created. Then, the 10 listening processes are called to handle the protocol requests from the 10 clients, and the mounting process shared by the 10 clients is accessed by calling the 10 listening processes, thereby calling the mounting process to perform query operations. This is just an example and is not a specific limitation.

[0036] Step S103: The mounting process performs a query operation on the attribute information of the request to be processed to obtain the query result.

[0037] In the technical solution provided by step S103 of the present invention, after calling the listening process and the mounting process associated with the listening process, the mounting process performs a query operation on the attribute information of the request to be processed to obtain the query result. The attribute information may include authentication information and / or configuration information, and the query result can be used to characterize the relevant data corresponding to the authentication information and / or configuration information.

[0038] Optionally, depending on the type of pending request, attribute information corresponding to the different types of pending requests can be stored. For example, if the pending request is a deletion request, the authentication information and / or configuration information corresponding to the deletion request can be stored; if the pending request is a creation request, the authentication information and / or configuration information corresponding to the creation request can be stored. This is only an example and is not specifically limited.

[0039] For example, if a client sends two pending requests, the mounted process can perform a query operation on the authentication information and / or configuration information of the two pending requests to obtain the relevant data corresponding to the authentication information and / or configuration information of the two pending requests. This is only an example and is not a specific limitation.

[0040] Step S104: Based on the query results and the monitoring process, determine the feedback result of the request to be processed.

[0041] In the technical solution provided in step S104 of the present invention, after obtaining the query result, based on the query result and the listening process, different processing methods are adopted for different types of pending requests, and the feedback results of different types of pending requests are determined. The feedback results can be used to characterize whether the pending request is completed in the distributed architecture.

[0042] Optionally, if the request to be processed is a creation request, then the creation processing method is adopted in response to the creation request; if the request to be processed is a write request, then the write processing method is adopted in response to the write request; if the request to be processed is a read request, then the read processing method is adopted in response to the read request; if the request to be processed is an insert request, then the insert processing method is adopted in response to the insert request; if the request to be processed is a delete request, then the delete processing method is adopted in response to the delete request. This is only for illustrative purposes and is not specifically limited.

[0043] For example, two clients may send a create request and a read request, respectively. These requests arrive at the server simultaneously. After querying the attribute information of the create and read requests and obtaining the corresponding query results, a listening process responds to the created request by performing a create operation for one client and determines whether the creation request has been completed under the designed distributed architecture. At the same time, another listening process responds to the read request by performing a read operation for the other client and determines whether the read request has been completed under the designed distributed architecture. This is just an example and is not a specific limitation.

[0044] In steps S101 to S104 of this application, at least one request to be processed is obtained; in response to the request to be processed, a listening process and a mounting process associated with the listening process are invoked, wherein the listening process is used to perform a query operation through the mounting process; a query operation is performed on the attribute information of the request to be processed through the mounting process to obtain a query result, wherein the attribute information includes authentication information and / or configuration information; based on the query result and the listening process, a feedback result of the request to be processed is determined, wherein the feedback result is used to characterize whether the request to be processed has been completed in the distributed architecture. In other words, in this embodiment of the invention, the pending requests sent by the user through the client are first obtained. In response to the pending requests sent by the user through the client and the number of clients in the online state, a listening process corresponding to the number of clients and a mounting process shared by all clients are created. Then, the created listening process and mounting process are called. After the listening process and mounting process are called, the listening process performs a query operation on the authentication information and / or configuration information of the pending requests through the mounting process to obtain the query results. Finally, based on the obtained query results and the called listening process, different processing methods are adopted for different types of pending requests, and the feedback results of different types of pending requests are determined. That is, it is determined whether different types of pending requests are completed according to the specific type of pending request under the designed distributed architecture, thereby achieving the purpose of concurrently processing multiple concurrent requests from a single client, thus solving the technical problem of not being able to control the upper limit of memory usage, and achieving the technical effect of being able to control the upper limit of memory usage.

[0045] The method described in this embodiment will be further described below.

[0046] As an optional embodiment, step S101, obtaining at least one request to be processed, includes: obtaining a request message to be processed; and determining at least one request to be processed based on the request message to be processed.

[0047] In this embodiment, the main process obtains the pending request message sent by the client, and then determines the corresponding pending request based on the different content of the pending request message. The pending request message can be the data to be transmitted corresponding to the pending request, such as the data to be transmitted corresponding to the creation request, the data to be transmitted corresponding to the write request, the data to be transmitted corresponding to the read request, the data to be transmitted corresponding to the insert request, the data to be transmitted corresponding to the delete request, etc. This is only an example and is not specifically limited.

[0048] Optionally, the pending request message can be the data to be transmitted for one or more concurrent requests sent by the same client at the same time, or it can be the data to be transmitted for one or more concurrent requests sent by different clients at the same time.

[0049] Optionally, if data to be transmitted corresponding to a creation request is obtained, the request to be processed is determined to be a creation request based on the data to be transmitted corresponding to a creation request; if data to be transmitted corresponding to a write request is obtained, the request to be processed is determined to be a write request based on the data to be transmitted corresponding to a write request; if data to be transmitted corresponding to a read request is obtained, the request to be processed is determined to be a read request based on the data to be transmitted corresponding to a read request; if data to be transmitted corresponding to an insert request is obtained, the request to be processed is determined to be an insert request based on the data to be transmitted corresponding to an insert request; if data to be transmitted corresponding to a delete request is obtained, the request to be processed is determined to be a delete request based on the data to be transmitted corresponding to a delete request. This is only an example and is not a specific limitation.

[0050] As an optional embodiment, step S102, in response to a pending request, invoking a listening process and a mounting process associated with the listening process, includes: in response to a pending request, determining the number of concurrent users and the number of pending requests; and invoking the listening process and the mounting process associated with the listening process based on the number of users and the number of pending requests.

[0051] In this embodiment, after receiving at least one pending request sent by the client, in response to the pending request, the number of concurrent users and the number of pending requests are determined. Based on the number of users and the number of pending requests, at least one listening process and a mount process associated with the at least one listening process are created. Then, the at least one listening process is invoked to handle the corresponding client protocol request, and the mount process associated with the at least one listening process is accessed by invoking the at least one listening process, thereby invoking the mount process to perform a query operation.

[0052] For example, suppose three users send three pending requests through three clients, and all three clients are online. In response to the three pending requests, the number of concurrent users and the number of pending requests are determined to be three. Based on the determined number of users and the determined number of pending requests, three listening processes and one mounted process associated with the three listening processes are created. The three listening processes are then used to handle the client protocol requests corresponding to the three clients. By calling the three listening processes, the system accesses the mounted process associated with the three listening processes, thereby calling the mounted process to perform a query operation. This is only an example and is not a specific limitation.

[0053] As an optional implementation method, based on the number of users and the number of pending requests, the listening process and the mounting process associated with the listening process are invoked, including: creating the listening process and the mounting process associated with the listening process based on the number of users and the number of pending requests; and invoking the listening process and the mounting process.

[0054] In this embodiment, the number of current clients used by a user is determined by determining the current number of users and the number of pending requests sent by the user through the client. Then, a listening process corresponding to the current number of clients and a mounting process shared by all clients are created. By calling the listening process and the mounting process, corresponding operations can be performed according to different types of pending requests.

[0055] Optionally, there can be one or more users, and a user can use at least one client and issue at least one pending request through the client.

[0056] Optionally, before determining the current number of clients used by the user, it is necessary to determine whether all clients used by the user are online. If all clients are online, the total number of clients used by the user is determined as the current number of clients. If any clients are offline, the number of online clients is determined as the current number of clients, and the offline clients are disconnected.

[0057] As an optional embodiment, step S103 involves performing a query operation on the attribute information of the request to be processed through the mounting process to obtain query results, including: recording the authentication information and configuration information of the request to be processed through the mounting process; and performing a query operation on the authentication information and configuration information to obtain query results.

[0058] In this embodiment, after invoking the listening process and the mounting process associated with the listening process, the mounting process records the authentication information and configuration information of the request to be processed. Then, a query operation is performed on the authentication information and configuration information of the request to be processed to obtain the query results. The authentication information can be used to identify the identity information of the user who issued the current request to be processed. The configuration information may include: heartbeat interval, maximum number of heartbeats, data storage directory, log storage directory, connection port information, cluster information, etc. The query results can be used to enable the server to process the current request to be processed.

[0059] For example, if a client sends a create request and a read request, the server can record the authentication and configuration information for both requests by mounting the process. Then, it can perform a query operation on the authentication and configuration information of the two pending requests to obtain the query results corresponding to the authentication and configuration information of the create request and the read request, respectively. This allows the server to process the currently sent create and read requests in parallel. This is just an example and is not a specific limitation.

[0060] As an optional embodiment, step S104, based on the query results and the monitoring process, determines the feedback result of the request to be processed, including: determining the target request to be processed based on the query results and the monitoring process; processing the target request to be processed as a request to be processed, and determining the feedback result of the request to be processed.

[0061] In this embodiment, after obtaining the query results, the target request to be processed is determined based on the query results corresponding to the attribute information of the request to be processed and the called listening process. Then, the determined target request to be processed is fed back to the listening process, and the target request to be processed is processed as a request to be processed. It is determined whether the request to be processed is completed according to the specific type of the request to be processed under the designed distributed architecture, thereby achieving the purpose of concurrently processing multiple concurrent requests from a client. The target request to be processed can be the request to be processed by the server in the next cycle. The cycle can be from 10ms to 30ms, for example, 11ms, 12ms, 25ms, etc. This is only an example and is not specifically limited.

[0062] For example, if a client sends a create request and an insert request, based on the query results of the authentication and configuration information corresponding to the two pending requests and the two listening processes invoked, the target pending requests are determined to be two: a create request and an insert request. The target pending request corresponding to the create request is then treated as a single pending request and a create operation is performed. It is then determined whether the corresponding pending request has been completed under the designed distributed architecture. The target pending request corresponding to the insert request is then treated as another pending request and an insert operation is performed. It is then determined whether the corresponding pending request has been completed under the designed distributed architecture.

[0063] As an optional implementation, after determining the feedback result of the request to be processed based on the query results and the listening process, the design method further includes: performing a feedback operation on the feedback result to obtain the feedback result.

[0064] In this embodiment, after determining the feedback result of the request to be processed, the feedback result is returned to the client through a worker thread pool. Then, the feedback result is parsed to obtain the return result, which can be used to characterize the processing status of the request to be processed.

[0065] In this embodiment of the invention, the pending requests sent by the user through the client are first obtained. In response to the pending requests sent by the user through the client and the number of online clients, a listening process corresponding to the number of clients and a mounting process shared by all clients are created. Then, the created listening process and mounting process are called. After the listening process and mounting process are called, the listening process performs a query operation on the authentication information and / or configuration information of the pending requests through the mounting process to obtain the query results. Finally, based on the obtained query results and the called listening process, different processing methods are adopted for different types of pending requests, and the feedback results of different types of pending requests are determined. That is, it is determined whether different types of pending requests are completed according to the specific type of pending request under the designed distributed architecture, thereby solving the technical problem of not being able to control the upper limit of memory usage and achieving the technical effect of being able to control the upper limit of memory usage.

[0066] Example 2

[0067] The technical solutions of the embodiments of the present invention will be illustrated below with reference to preferred embodiments.

[0068] With economic development and the continuous increase in the amount of storage resources, distributed storage systems are not only used as everyday storage tools, but also to meet the changing needs of users, leading to increasingly diversified development. However, current distributed architectures primarily use a single-process service for a single client. Furthermore, because each client connection requires a separate child process, the mounting service is not isolated, making it impossible to control the upper limit of memory usage.

[0069] Therefore, to overcome the above problems, a related technology discloses a method, apparatus, and server for processing Server Message Block (SMB) protocol requests. The method includes: when receiving an SMB protocol request from a client, creating a child thread using the Samba main process; initializing the resource information of the child thread; and mounting the storage service through the mount point corresponding to the Samba main process. However, this method is still based on the original Samba service mechanism, only using a child thread and then the main process's mounting service, thus it cannot control the upper limit of memory usage.

[0070] However, this invention proposes a distributed architecture design method. This method solves the technical problem of uncontrollable memory usage limits by isolating the mounting service, allowing all clients to share it, and having a listening process handle client protocol requests. This achieves the technical effect of controllable memory usage limits.

[0071] Figure 2(a) is a schematic diagram of a distributed storage system according to an embodiment of the present invention. As shown in Figure 2(a), the distributed storage system may include: client 201, listening process 202, main process 203 and mounting process 204.

[0072] Optionally, the main process 203 listens on a port, and the client 201 sends a connection request. After the main process 203 receives the connection request, it creates new processes xsmbd_port and mountd, that is, it creates a listening process 302 and a mounting process 204. The listening process 202 can be used to handle client protocol requests, return client connections, and perform authentication and configuration through the mounting process 204.

[0073] Alternatively, the listening process 202 does not need to load the full shared configuration content; the listening process 202 can perform query operations during the connection process by mounting process 204.

[0074] Optionally, if there is a large amount of sharing, the add, delete, and share operations are performed only through the mounted process 204, thereby achieving the technical effect that the main process can control the upper limit of memory usage without limiting the number of client connections.

[0075] Figure 2(b) is a schematic diagram of a message processing system based on a thread pool according to an embodiment of the present invention. As shown in Figure 2(b), the message processing system may include: a client 201, a listening process 202, a worker thread pool 205, a protocol data unit 206, and a virtual file system 207.

[0076] Optionally, the client 201 sends a request message. After the listening process 202 receives the request message, it forwards the request message to the worker thread pool 205. The worker thread pool 205 performs protocol parsing processing on the request message, and calls the file interface to distribute the protocol-parsed request message to the virtual file system 207 for processing through the protocol data unit 206. Then, the virtual file system 207 feeds back the processing result to the protocol data unit 206, and the worker thread pool 205 sends the corresponding message back to the client 201.

[0077] Figure 3 This is a schematic diagram of a concurrent request according to an embodiment of the present invention, such as... Figure 3 As shown, when two concurrent requests from a client arrive at the server at the same time, the main process (xsamba, or xsmb for short) processes the two concurrent requests concurrently, and there is no queuing due to being blocked.

[0078] Figure 4(a) is a schematic diagram of server performance data comparison according to an embodiment of the present invention. As shown in Figure 4(a), under the 4k file vdbench model, the architecture designed in the present invention outperforms the traditional Samba architecture in terms of the number of operations per second of the server.

[0079] Figure 4(b) is a schematic diagram of bandwidth performance data comparison according to an embodiment of the present invention. As shown in Figure 4(b), under the 1M file vdbench model, the architecture designed in the present invention is superior to the traditional Samba architecture in terms of bandwidth performance.

[0080] In this embodiment, from a management perspective, the mounting service is separated by adding a new `mountd` process, providing configuration and user management functions for XSMB. The server uses a single mount point, and a newly added listening process connects to each client via the network. The child process does not need to load all the shared configuration content; it only needs to query it through the `mountd` process during the connection process. From a data perspective, a thread pool is used to execute different metadata operations for a single client. For multiple metadata operations on a single client, different threads serve them, thereby solving the technical problem of not being able to control the upper limit of memory usage and achieving the technical effect of being able to control the upper limit of memory usage.

[0081] Example 3

[0082] According to embodiments of the present invention, a design apparatus for a distributed architecture is also provided. It should be noted that this design apparatus for a distributed architecture can be used to execute a design method for a distributed architecture as described in Embodiment 1.

[0083] Figure 5 This is a schematic diagram of a design apparatus for a distributed architecture according to an embodiment of the present invention. Figure 5 As shown, a design device 500 for a distributed architecture may include: an acquisition unit 501, a calling unit 502, a query unit 503, and a determination unit 504.

[0084] The acquisition unit 501 is used to acquire at least one request to be processed.

[0085] Calling unit 502 is used to call the listening process and the mount process associated with the listening process in response to a pending request. The listening process is used to perform query operations through the mount process.

[0086] The query unit 503 is used to perform a query operation on the attribute information of the request to be processed through the mounting process to obtain the query result, wherein the attribute information includes authentication information and / or configuration information.

[0087] The determination unit 504 is used to determine the feedback result of the pending request based on the query result and the listening process, wherein the feedback result is used to characterize whether the pending request has been completed in the distributed architecture.

[0088] Optionally, the acquisition unit 501 may include: an acquisition module, configured to acquire a request message to be processed, wherein the request message to be processed is data to be transmitted corresponding to the request to be processed; and a first determination module, configured to determine at least one request to be processed based on the request message to be processed.

[0089] Optionally, the calling unit 502 may include: a response module, used to determine the number of concurrent users and the number of pending requests in response to pending requests; and a calling module, used to call the listening process and the mounted process associated with the listening process based on the number of users and the number of pending requests.

[0090] Optionally, the calling module may include: a creation submodule for creating a listening process and a mounting process associated with the listening process based on the number of users and the number of pending requests; and a calling submodule for calling the listening process and the mounting process.

[0091] Optionally, the query unit 503 may include: a recording module, used to record the authentication information and configuration information of the request to be processed by mounting the process; and a query module, used to perform a query operation on the authentication information and configuration information to obtain query results, wherein the query results are used to enable the server to process the request to be processed.

[0092] Optionally, the determining unit 504 may include: a second determining module, used to determine the target request to be processed based on the query results and the monitoring process; and a processing module, used to process the target request to be processed as a request to be processed, and determine the feedback result of the request to be processed.

[0093] Optionally, the design apparatus 500 of the distributed architecture may further include: a feedback unit, used to perform a feedback operation on the feedback result to obtain a feedback result, wherein the feedback result is used to characterize the processing status of the request to be processed.

[0094] In this embodiment, a first acquisition unit is used to acquire at least one request to be processed; a calling unit is used to call a listening process and a mounting process associated with the listening process in response to the request to be processed, wherein the listening process is used to perform a query operation through the mounting process; a query unit is used to perform a query operation on the attribute information of the request to be processed through the mounting process to obtain a query result, wherein the attribute information includes authentication information and / or configuration information; and a first determination unit is used to determine the feedback result of the request to be processed based on the query result and the listening process, wherein the feedback result is used to characterize whether the request to be processed has been completed in the distributed architecture, thus solving the technical problem of not being able to control the upper limit of memory usage and achieving the technical effect of being able to control the upper limit of memory usage.

[0095] Example 4

[0096] According to embodiments of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the distributed architecture design method of Embodiment 1.

[0097] Example 5

[0098] According to an embodiment of the present invention, a processor is also provided. The processor is used to run a program, wherein the program, when run by the processor, executes the distributed architecture design method of Embodiment 1.

[0099] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0100] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0101] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0103] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0104] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0105] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A design method for a distributed architecture, characterized in that, Applied at the management level, including: Obtain at least one pending request, wherein the at least one pending request includes: a creation request, a write request, a read request, an insert request, and a delete request; In response to the pending request, a listening process and a mounting process associated with the listening process are invoked. The listening process is used to perform query operations through the mounting process. The number of listening processes corresponds to the number of clients. The mounting process is used to provide authentication and / or configuration functions to the listening process. The mounting process is shared by all clients. The mounting process performs a query operation on the attribute information of the request to be processed to obtain the query result. The attribute information includes authentication information and / or configuration information. The authentication information is used to identify the identity information of the user who issued the current request to be processed. The configuration information includes: heartbeat interval time, maximum number of heartbeats, data storage directory, log storage directory, connection port information, and cluster information. Based on the query results and the listening process, the feedback result of the pending request is determined, wherein the feedback result is used to characterize whether the pending request has been completed under the distributed architecture.

2. The method according to claim 1, characterized in that, Obtain at least one pending request, including: Obtain a request message to be processed, wherein the request message to be processed is the data to be transmitted corresponding to the request to be processed; Based on the pending request message, at least one pending request is determined.

3. The method according to claim 1, characterized in that, In response to the pending request, the listening process and the mounting process associated with the listening process are invoked, including: In response to the pending requests, determine the number of concurrent users and the number of pending requests; Based on the number of users and the number of requests to be processed, the listening process and the mounting process associated with the listening process are invoked.

4. The method according to claim 3, characterized in that, Based on the number of users and the number of pending requests, the listening process and the mounting process associated with the listening process are invoked, including: Based on the number of users and the number of requests to be processed, create the listening process and the mounting process associated with the listening process; Invoke the listening process and the mounting process.

5. The method according to claim 1, characterized in that, The mounting process performs a query operation on the attribute information of the request to be processed to obtain the query results, including: The mounting process records the authentication and configuration information of the requests to be processed. The authentication information and the configuration information are queried to obtain the query results, wherein the query results are used to enable the server to process the pending request.

6. The method according to claim 1, characterized in that, Based on the query results and the monitoring process, the feedback result of the pending request is determined, including: Based on the query results and the monitoring process, the target request to be processed is determined; The target request to be processed is processed as the request to be processed, and the feedback result of the request to be processed is determined.

7. The method according to claim 1, characterized in that, After determining the feedback result of the request to be processed based on the query results and the listening process, the method further includes: A feedback operation is performed on the feedback result to obtain a feedback result, wherein the feedback result is used to characterize the processing status of the request to be processed.

8. A design apparatus for a distributed architecture, characterized in that, Applied at the management level, including: The acquisition unit is used to acquire at least one request to be processed, wherein the at least one request to be processed includes: a creation request, a write request, a read request, an insert request, and a delete request; The invocation unit is used to invoke the listening process and the mounting process associated with the listening process in response to the pending request. The listening process is used to perform query operations through the mounting process. The number of listening processes corresponds to the number of clients. The mounting process is used to provide authentication and / or configuration functions to the listening process. The mounting process is shared by all clients. The query unit is used to perform a query operation on the attribute information of the request to be processed through the mounting process to obtain the query result. The attribute information includes authentication information and / or configuration information. The authentication information is used to characterize the identity information of the user who issued the current request to be processed. The configuration information includes: heartbeat interval time, maximum number of heartbeats, data storage directory, log storage directory, connection port information, and cluster information. The determining unit is used to determine the feedback result of the pending request based on the query result and the listening process, wherein the feedback result is used to characterize whether the pending request has been completed under the distributed architecture.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the design method of the distributed architecture according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data query method and device

    CN110674369A