Partitioning Data in a Clustered Database Environment
By dividing data based on the identifier of the data source in a clustered database environment, the problem of cluster waiting and server contention is solved, the scalability and device performance of the environment are improved, and high availability and scale-out are supported.
Patent Information
- Application Number
- CN201980033441.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-03-19
- Filing Date
- 2019-03-12
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-03-12
AI Technical Summary
In a clustered database environment, cluster wait or server contention events may occur when servers or devices attempt to access the same data set simultaneously, resulting in wasted resources and non-scalability of the environment.
Mitigate or eliminate cluster wait or contention issues by partitioning data in a clustered database environment based on identifiers of data sources so that data is consistently transferred from the data source to a specific device or group of devices for processing, avoiding devices sharing access to the same data set .
Improves the scalability and device performance of clustered database environments, prevents resource waste, avoids operation blocking or delays caused by device shared access, and supports high availability and scale-out.
Smart Images

Figure CN112106039B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to data sharding. More particularly, but not by way of limitation, the present disclosure relates to partitioning data in a clustered database environment, which can improve the scalability of the environment and the performance of devices in the clustered database environment. Background Art
[0002] In a cluster database environment, various servers or other devices may access one or more data sets. In some existing cluster database environments, servers or devices may share access to data sets, which may lead to various technical problems in the environment, such as cluster wait or server contention events that may occur when one or more servers or other devices in the environment attempt to access the same data set at the same time.
[0003] In some existing cluster database environments, cluster wait or server contention events may block, delay or otherwise affect the ability of one or more servers or devices in the environment to perform various operations, such as by blocking a server from accessing or processing the data set when another server is accessing or processing the same data set. When a server or device is blocked or delayed from performing an operation, blocking or delaying one or more of the servers or devices from performing an operation may waste network resources or computing resources of the server or device. In addition, such technical problems in existing cluster database environments may be amplified on interconnection services in high-availability cluster database environments, where various servers or devices are connected in communication, receive data in a random manner (e.g., from a load balancer device), and may attempt to access the same data at the same time. In addition, such technical problems in existing cluster database environments may prevent the environment from expanding outward (e.g., preventing the addition of additional database servers), or if the database environment expands outward, such technical problems may be further amplified.
[0004] Therefore, existing cluster database systems and methods have disadvantages, such as but not limited to those discussed above, and may not be able to manage or analyze large complex data sets. For these and other reasons, it is therefore desirable to have improved techniques for managing data in a cluster database environment and an improved cluster database system. Summary of the invention
[0005] The aspects covered by the present invention are defined by the claims rather than by this Summary. This Summary is a high-level overview of various aspects of the invention and introduces some concepts that are further described in the Detailed Description section below. This Summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used alone to determine the scope of the claimed subject matter. The subject matter should be understood by reference to appropriate portions of the entire specification, any or all of the drawings, and each claim.
[0006] Various examples of the present disclosure provide systems and methods for partitioning data in a clustered database environment, which can improve the scalability of the environment and the performance of devices in the environment.
[0007] In one example, a system includes a server, a plurality of application server groups communicatively coupled to a server including an application server, a plurality of database servers communicatively coupled to the plurality of application server groups, and a system database divided into a plurality of partitions. The server includes a processor and a non-transitory computer-readable medium communicatively coupled to the processor. The server is configured to receive data from a data source, the data including a source identifier and a key identifier associated with the data source. The processor is also configured to determine an application server group in a plurality of application server groups associated with the data source based on the source identifier associated with the data source. The processor is also configured to transfer data from the data source to an application server of the application server group, wherein the application server is configured to determine a database server in a plurality of database servers associated with the application server group, and transfer data from the data source to the database server, and wherein the database server is configured to determine a specific partition in a plurality of partitions of the system database associated with the data source based on the key identifier of the data source, the specific partition being usable for storing data from the data source.
[0008] In another example, a method includes obtaining, by a server, data from a data source, the data including a source identifier and a key identifier associated with the data source. The method also includes determining, by the server, an application server group from a plurality of application server groups associated with the data source based on the source identifier of the data source. The method also includes transmitting, by the server, data from the data source to an application server of the application server group. The method also includes determining, by the application server, a database server from a plurality of database servers associated with the application server group. The method also includes transmitting, by the application server, data from the data source to the database server. The method also includes determining, by the database server and based on the key identifier of the data source, a specific partition from a plurality of partitions of a system database associated with the data source, wherein the specific partition can be used to store data from the data source.
[0009] In another example, a method includes obtaining data from a data source by a server, the data including a source identifier and a key identifier associated with the data source. The method also includes determining, by the server, an application server group in a plurality of application server groups associated with the data source based on the source identifier associated with the data source. The method also includes transmitting, by the server, data from the data source to an application server of the application server group. The method also includes determining, by the application server, a first database server in a plurality of database servers associated with the application server group. The method also includes detecting, by the application server, an error in the first database server associated with the application server group. The method also includes identifying, by the application server, a second database server in a plurality of database servers to receive data from the data source. The method also includes transmitting, by the application server, data from the data source to a second database server in a plurality of database servers. The method also includes determining, by the second database server and based on the key identifier of the data source, a specific partition in a plurality of partitions of a system database associated with the data source, wherein the specific partition can be used to store data from the data source.
[0010] The details of one or more aspects and examples are set forth in the accompanying drawings and the description below. Other features and aspects will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is an example of a data partitioning system according to one example of the present disclosure.
[0012] Figure 2 is an example of a data partitioning system according to another example of the present disclosure.
[0013] Figure 3 is a flow chart depicting an example of a process for partitioning data in a clustered database environment according to one example of the present disclosure.
[0014] Figure 4 is an example of a data partitioning system according to one example of the present disclosure. DETAILED DESCRIPTION
[0015] Certain aspects and features of the present disclosure relate to partitioning data in a cluster database environment, which can improve the scalability of the environment and the performance of devices in the environment. As described above, existing cluster database environments and systems may include various devices (e.g., servers, databases, etc.) that share access to one or more data sets, which may result in cluster wait or contention events that may occur when one or more devices attempt to access the same data set. Certain examples described herein address these issues by partitioning data in a cluster database environment based on an identifier of a data source, so that data is consistently transmitted from a data source to and processed by a specific device (e.g., a server or database) or group of devices, which can improve the scalability of the environment and the performance of devices in the environment.
[0016] In one example, the cluster database environment or system includes a server, various application servers, various database servers and a system database. In this example, various application servers can be divided into groups (e.g., lots), and each group of application servers can be associated with a specific database server (e.g., communicatively connected to a specific database server). In some instances, multiple application server groups in the environment can be based on multiple database servers in the environment, and multiple application servers in each group can be based on the number of application server groups. For example, if the environment includes three database servers and twenty-four application servers, the application server can be divided into three application server groups, each of which includes eight application servers. In another example, each application server group can include any number of application servers. For example, each application server group can include different numbers of application servers.
[0017] Continuing with the example, the server can be communicatively coupled to one or more data sources and can receive data from the data sources. Examples of data sources can include metering devices for measuring consumption of resources such as electricity, gas, water, etc. The data source can measure or receive (e.g., obtain) data, optionally store the data, and transmit the data to the server. The data can include information measured or received (e.g., obtained) by the data source, together with a source identifier or key identifier associated with the data source. The source identifier associated with the data source can be an identifier that can be used to identify the data source and route data from the data source to a specific group of application servers, application servers, or database servers. As an example, the source identifier associated with the metering data source or device can be a metering identifier. The key identifier associated with the data source can be an identifier that can be used to route data from the data source to a specific portion or partition of a system database. As an example, if the data source is a metering device, the key identifier associated with the metering device can be a portion of the metering identifier of the metering device corresponding to a specific partition of the system database.
[0018] The server may include a processor and a memory including a database (e.g., a lookup table), and the server may determine a specific route for data received from various data sources. For example, the processor may determine a route identifier associated with the data source based on a source identifier of the data source using one or more formulas, algorithms, methods, etc. In another example, the processor may access the database to determine a route identifier associated with the data source based on a source identifier associated with the data source. The route identifier may be used to determine a specific route for data received from the data source. For example, the database may include data indicating source identifiers associated with various data sources and a route identifier associated with each source identifier. The route identifier may indicate a specific group of application servers, application servers, or database servers associated with the data source. For example, the route identifier may be used to determine a specific group of application servers or a specific database server of an environment that can receive or process data from the data source. In this example, the server receives data from the data source, together with a source identifier associated with the data source, and a processor of the server may determine a route identifier associated with the source identifier of the data source. In this example, in response to determining the route identifier associated with the data source, the server may transmit data from the data source to a specific group of application servers associated with the data source.
[0019] In this example, an application server of an application server group associated with a data source may receive data from a server and process or analyze the data. The application server may then transmit the processed data to a specific database server associated with the application server group. The database server may include a processor and a memory including a database. The processor of the database server may access the database to route the data received from the application server to a specific portion or partition of a system database. For example, the system database may be divided (e.g., partitioned) based on key identifiers associated with various data sources. As an example, each portion or partition of the system database may be associated with a key identifier of a specific data source. In this example, the database of the database server may include data indicating a portion of the system database associated with each key identifier and the key identifier associated with the various data sources. The database server may use the database to route the data obtained from the data source to a specific portion of the system database corresponding to the key identifier of the data source.
[0020] As an illustrative example, a gas meter measures or receives data and transmits the data to a server along with a source identifier of the gas meter (e.g., the meter identifier) and a key identifier (e.g., the last two digits of the meter identifier). The server can determine a routing identifier associated with the meter based on the source identifier of the meter, and use the routing identifier to determine a specific set of application servers that can process the data from the gas meter and a specific database server associated with the set of application servers. An application server in the set of application servers can process the data from the gas meter device and transmit the processed data to a database server. The database server can use the key identifier of the gas meter device to determine a portion or partition of a system database in which the data is stored. For example, the system database is divided into various portions, and each portion of the system database corresponds to a key identifier of a specific gas meter device. In this example, the database server transmits data from the gas meter device to the system database to be stored in a portion of the system database associated with the key identifier of the gas meter device.
[0021] In this way, data obtained from a data source can be routed to a specific set of application servers and database servers, which can prevent other application servers or database servers in the cluster database environment that are not associated with or assigned to the data source from accessing or processing data from the data source. In addition, data from the data source can be stored in a specific portion of the system database. In some instances, routing data from one or more data sources as described herein can prevent various devices in the cluster database environment from sharing access to the same data set, which can alleviate or eliminate cluster wait or contention problems in the cluster database environment, and improve the scalability of the environment and the performance of the devices in the environment.
[0022] These illustrative examples are given to introduce the reader to the general subject matter discussed herein and are not intended to limit the scope of the disclosed concepts. The following section describes various additional features and examples with reference to the accompanying drawings, wherein like numerals indicate like elements and directional descriptions are used to describe the illustrative examples, but like the illustrative examples, should not be used to limit the present disclosure.
[0023] Figure 1 1 is an example of a data partitioning system 100 according to one example of the present disclosure. System 100 may be any type of system in which data may be partitioned or sharded (e.g., a system for partitioning or sharding data among or within a server, database, or device). In some instances, system 100 may be a clustered database system, such as a system including various servers (e.g., nodes) that may perform various operations on data received by system 100.
[0024] exist Figure 1In the example depicted in , the system 100 includes one or more servers 102a-d, application server groups (e.g., segments) 104a-c, database servers 106a-c, and a system database 108. In this example, the application server groups 104a-c include various application servers 110a-1. Each server 102a-d, database server 106a-c, or application server 110a-1 can be any computing system (e.g., device) or storage device, and can include one or more components. For example, each server 102a-d, database server 106a-c, or application server 110a-1 can include a processor, a bus, a database, a memory, an input / output interface component, a display device, a communication device, etc.
[0025] In some examples, multiple application server groups 104a-c in the system 100 can be based on multiple database servers 106a-c in the system 100, and each application server group 104a-c can be associated with (e.g., communicatively coupled to) a specific database server 106a-c. Figure 1 In the example depicted in , system 100 includes three database servers 106a-c and three corresponding application server groups 104a-c associated with the particular database servers 106a-c. In this example, application server group 104a is communicatively coupled to database server 106a, application server group 104b is communicatively coupled to database server 106b, and application server group 104c is communicatively coupled to database server 106c. In some examples, the number of application servers 110a-1 in each application server group 104a-c can be based on the number of application server groups 104a-c in system 100. For example, in Figure 1 In the example depicted in , the system 100 includes twelve application servers 110a-1 and three application server groups 104a-c, each of which includes four application servers. In another example, each application server group 104a-c can include any number of application servers 110a-1. For example, each application server group 104a-c can include a different number of application servers 110a-1.
[0026] In some examples, one or more data sources 10a-c may be communicatively coupled to one or more devices or components of the system 100 (e.g., servers 102a-d). In another example, the data sources 10a-c may be communicatively coupled to one or more remote devices or servers. For example, the data sources 10a-c may be communicatively coupled to one or more other data sources, metering devices, network devices, etc. In some instances, the data sources 10a-c may communicate (e.g., transmit and receive data) with one or more data sources, metering devices, or network devices via a wireless mesh network. Additionally, in some examples, a network device such as a collector device may facilitate communication between the data sources 10a-c and one or more servers (e.g., servers 102a-d).
[0027] In some examples, each server 102a-d may be communicatively coupled to one or more data sources 10a-c and may receive data from the data sources. Examples of data sources 10a-c may include metering devices for measuring the consumption of resources such as electricity, gas, water, etc. The data source 10a-c may measure or receive (e.g., obtain) data, store the data, and transmit the data to the server 102a-d. The data may include information measured or received (e.g., obtained) by the data source 10a-c, together with a source identifier or key identifier associated with the data source 10a-c. The source identifier may be any data or information that may be used to identify the data source 10a-c and route the data from the data source 10a-c to a specific group of application servers 104a-c, application servers 110a-1, or database servers 106a-c. As an example, the source identifier of the metering data source or device may be a metering identifier. The key identifier of the data source 10a-c may be any data or information that may be used to route the data from the data source 10a-c to a specific portion or partition of the system database 108. As an example, the key identifier of a meter device may be a portion of a meter identifier of the meter device that corresponds to a particular portion or partition of the system database 108 .
[0028] Each server 102a-d may include a processor and a memory including a database (e.g., a lookup table). The processor may be communicatively coupled to the memory (e.g., via a bus). The memory of the server 102a-d may be any type of memory device that retains information when power is off. In some examples, the server 102a-d may receive data from a data source, and the processor of the server 102a-d may determine a specific route for the data received from the data source. As an example, the processor of the server 102a may access a database to determine a specific route for the data received from the data source 10a-c. For example, the database of the server 102a may include data indicating source identifiers associated with various data sources 10a-c and routing identifiers associated with each source identifier (e.g., in the lookup table 112). In some examples, the server 102a may obtain or receive data indicating various source identifiers and routing identifiers (e.g., from another device or via user input). The routing identifier may indicate a particular application server group 104a-c, application server 110a-1, or database server 106a-c associated with a data source 10a-c (eg, assigned to a data source to receive or process data from the data source). Figure 1In the example depicted in , each server 102a-d may include a lookup table 112 that includes data indicating various source identifiers 114a-e (e.g., various meter identifiers) and routing identifiers 116a-e (e.g., values or any other identifiers) associated with each source identifier 114a-e. In this example, each routing identifier 116a-e indicates a specific application server group 104a-c or database server 106a-c assigned to each source identifier 114a-e to receive or process data from the data source 10a-c associated with each source identifier 104a-e. For example, routing identifiers 116a and 116d may indicate that source identifiers 114a and 114d are associated with (e.g., assigned to) application server group 104a and / or database server 106a, routing identifiers 116b and 116e may indicate that source identifiers 114b and 114e are associated with application server group 104b and / or database server 106b, and routing identifier 116c may indicate that source identifier 114c is associated with application server group 104c and / or database server 106c. Continuing with this example, server 102a may receive data from data sources 10a-c, along with source identifiers 114a-e associated with data sources 10a-c, and a processor of server 102a may access lookup table 112 to determine routing identifiers 116a-e associated with the source identifiers. In this example, in response to determining a routing identifier 116a-e associated with a data source, the server 102a may transmit data from the data source to a particular set of application servers 104a-c associated with the data source.
[0029] Although in the examples described above, the lookup table 112 includes data indicating routing identifiers associated with various source identifiers, and the processors of the servers 102a-d can access the lookup table 112 to determine the routing identifiers associated with the source identifiers of the data sources 10a-c, the present disclosure is not limited to such a configuration. Instead, in other examples, the processors of the servers 102a-d can determine the routing identifiers associated with the data sources 10a-c based on the source identifiers of the data sources 10a-c without accessing the lookup table 112. For example, the server 102a can receive data from the data source 10a-c, together with the source identifiers 114a-e associated with the data source 10a-c, and the processor of the server 102a can use one or more formulas, algorithms, methods, etc. to calculate or determine the routing identifiers 116a-e associated with the source identifiers 114a-e and / or the data sources 10a-c. In addition, although in the examples described above, the servers 102a-d include the lookup table 112, the present disclosure is not limited to such a configuration. Rather, in other examples, the lookup table 112 may be part of the servers 102 a - d , or may be separate or remote from the servers 102 a - d , and the servers 102 a - d may be communicatively coupled to the lookup table 112 to access the lookup table 112 .
[0030] In some examples, the system 100 may include load balancer devices 118a-c. Each load balancer device 118a-c may be associated with a particular application server group 104a-c and communicatively coupled to the particular application server group 104a-c and servers 102a-d. The load balancer device 118a-c may be any device configured to determine a particular application server 110a-1 within an application server group 104a-c to process or analyze data from a data source 10a-c associated with the application server group 104a-c.
[0031] For example, the processor of the server 102a-d can receive data from the data source 10a-c and determine the application server group 104a-c associated with the data source 10a-c based on the routing identifier as described above. In this example, the memory of the server 102a-d may include data indicating the load balancer device 118a-c associated with each application server group 104a-c, and the processor of the server 102a-d can access the memory to determine the specific load balancer 118a-c associated with the application server group 104a-c, and transmit the data obtained from the data source 10a-c to the specific load balancer device 118a-d. As an example, the server 102a obtains data from the data source 10a and determines that the routing identifier 116a is associated with the source identifier 114a of the data source 10a. In this example, the server 102a can determine that the routing identifier 116a is associated with the application server group 104a. Continuing with this example, server 102a may determine that a particular load balancer device 118a is associated with application server group 104a and transmit data to load balancer device 118a. Load balancer device 118a may determine application servers 110a-d within application server group 104a to process or analyze data from data source 10a associated with application server group 104a. In some instances, load balancer devices 118a-c may use various methods or techniques (e.g., in a random manner, based on the availability of application server 110a-1 to process data, or any other suitable method or technique) to determine a particular application server 110a-1 within application server group 104a-c to process or analyze data from data source 10a-c. For example, in response to determining that application server 110a has available computing or network resources to process data (e.g., if application server 110a is not performing operations), load balancer device 118 may determine that application server 110a can process data from data source 10a-c. As another example, in response to determining that application server 110a has more available computing or network resources than other application servers 110b-d of application server group 104a (e.g., if other application servers 110b-d perform more operations than application server 110a), load balancer device 118 may determine that application server 110a can process data from data sources 10a-c.
[0032] In some examples, the servers 102a-d may not communicate directly with the load balancer devices 118a-c. For example, the processor of the server 102a-d may receive data from the data source 10a-c and determine the application server group 104a-c associated with the data source 10a-c based on the routing identifier as described above. In this example, the processor of the server 102a-d can transmit data from the data source 10a-c to the application server group 104a-c associated with the data source 10a-c. The load balancer device 118a-c associated with the application server group 104a-c can receive (e.g., intercept) data from the server 102a-d and determine the specific application server 110a-l within the application server group 104a-c associated with the load balancer device 118a-c to process or analyze the data from the data source 10a-c. As an example, the server 102a obtains data from the data source 10a and determines that the routing identifier 116a is associated with the source identifier 114a of the data source 10a. In this example, server 102a can determine that routing identifier 116a is associated with application server group 104a and transmit data from data source 10a to application server group 104a. Continuing with this example, load balancer device 118a associated with application server group 104a can receive (e.g., intercept) data from server 102a and determine application servers 110a-d within application server group 104a to process or analyze data from data source 10a associated with application server group 104a.
[0033] In some examples, the system 100 may not include the load balancer devices 118a-c. In this example, the servers 102a-d may be configured to determine a particular application server 110a-1 within the application server group 104a-c to process or analyze data from the data sources 10a-c associated with the application server group 104a-c in substantially the same manner as described above.
[0034] In some examples, application server 110a-1 may be communicatively coupled to servers 102a-d or load balancer devices 118a-c to receive data from servers 102a-d or load balancer devices 118a-c and process or analyze the data. Each application server 110a-1 may also be communicatively coupled to a particular database server 106a-c associated with application server group 104a-c of application server 110a-1. For example, application servers 110a-d of application server group 104a may be associated with database server 106a, application servers 110e-h of application server group 104b may be associated with database server 106b, and application server 1101-1 of application server group 104c may be associated with database server 106c. Application server 110a-1 may process data obtained or received from servers 102a-d or load balancer devices 118a-c and transmit the processed data to a particular database server 106a-c associated with the application server group of application server 110a-1.
[0035] For example, each application server 110a-1 may include a processor and a memory including a database. The database of the application server 110a-1 may include data indicating a specific database server 106a-c associated with the application server group 104a-c of the application server 110a-1. In some examples, the application server 110a-1 may process the data obtained or received (e.g., via the load balancer device 118a-c or the server 102a-d), determine the specific database server 106a-c associated with the application server group 104a-c of the application server 110a-1, and transmit the processed data to the specific application server group 104a-c. For example, the application server 110a may process the data received from the load balancer device 118a or the server 102a. The processor of the application server 110 may access the database of the application server 110a and determine that the database server 106a is associated with the application server group 104a of the application server 110a. Then, the application server 110a may transmit the processed data to the database server 106a.
[0036] Each database server 106a-c can be communicatively coupled to an application server 110a-1 of a particular application server group 104a-c associated with the database server 106a-c. The database server 106a-c can include a processor and a memory including a database (e.g., a lookup table). The processor can be communicatively coupled to the memory (e.g., via a bus). The memory of the database server 106a-c can be any type of memory device that retains information when power is off. In some examples, the database server 106a-c can receive data from the application server 110a-1 associated with the database server 106a-c, and the processor of the database server 106a-c can route the data received from the application server 110a-1 to a specific portion or partition of the system database 108.
[0037] For example, the system database 108 may be partitioned (e.g., segmented) based on key identifiers associated with various data sources 10a-c. As an example, the system database 108 may be partitioned into partitions (e.g., sections) 120, 122, 124, and each partition 120, 122, 124 may be associated with a key identifier of a particular data source 10a-c. Figure 1 In the example depicted in , partition 120 may be associated with a key identifier of a data source 10a-c corresponding to source identifier 114a, such that data from data source 10a-c is stored in partition 120; partition 122 may be associated with a key identifier of a data source 10a-c corresponding to source identifier 114b, such that data from data source 10a-c is stored in partition 122; and partition 124 may be associated with a key identifier of a data source 10a-c corresponding to source identifier 114c, such that data from data source 10a-c is stored in partition 124. Thus, in some examples, system database 108 may be horizontally partitioned based on key identifiers associated with various data sources 10a-c.
[0038] In this example, the database of the database servers 106a-c may include data indicating key identifiers associated with various data sources and a portion of the system database 108 associated with (e.g., assigned to) each key identifier. In some examples, the database servers 106a-c may obtain (e.g., receive) data indicating key identifiers associated with various data sources 10a-c and a portion of the system database 108 associated with each key identifier from another device or via user input (e.g., from another device or via user input). The database servers 106a-c may use the database to route data obtained from the data sources 10a-c (e.g., via the corresponding application servers 110a-1) to a specific portion of the system database 108 corresponding to the key identifier of the data source 10a-c, so that the data may be stored in the specific portion of the system database 108. As an example, the database server 106a obtains data from the application server 110a, the data including data from the data source 10a-c associated with the source identifier 114a, together with the key identifier of the data source 10a-c. The processor of database server 106a accesses the database of database server 106a to determine the particular partition 120 of system database 108 associated with the key identifier and transmits the data to system database 108 for storage in partition 120 of system database 108 .
[0039] In another example, the processor of the database server 106a-c can determine the key identifier associated with the data source 10a-c without accessing the database of the database server 106a-c, and use the determined key identifier to route data from the data source 10a-c to a specific portion or partition of the system database 108. For example, the database server 106a obtains data from the application server 110a, the data including data from the data source 10a-c associated with the source identifier 114a. In this example, the processor of the database server 106a can determine the key identifier associated with the source identifier 114a without accessing the database of the database server 106a-c. As an example, the source identifier 114a can be a meter identifier of the meter device data source 10a-c, and the processor can use various algorithms, methods, or techniques to determine that the key identifier associated with the source identifier 114a is a portion of the meter identifier (e.g., the last two digits of the meter identifier). In this example, the processor of database server 106a may use the determined key identifier to route data from the data source to a particular partition 120 of system database 108 associated with the determined key identifier and transmit the data to system database 108 for storage in partition 120 .
[0040] In some examples, the system database 108 may be partitioned in any suitable manner in addition or in lieu thereof. For example, the system database 108 may be partitioned in addition or in lieu thereof based on date, time, or any suitable interval. As an example, as described above, the data stored in the system database 108 may be additionally partitioned based on the time at which the data is obtained or received from the data source 10a-c, such that the data obtained from the data source 10a-c is stored in a specific partition of the system database 108, and the specific partition is further partitioned based on the time at which the data is received (e.g., the data received from the data source 10a-c at a specific time may be stored in a sub-partition of the partition). Thus, in some examples, the system database 108 may be vertically partitioned based on any suitable criteria (e.g., based on date or time), such that data from a specific data source 10a-c is further stored in a specific sub-partition of the partition. Thus, the system database 108 may be horizontally partitioned (based on key identifiers associated with the various data sources 10a-c) and / or vertically partitioned (e.g., based on any suitable criteria).
[0041] In this manner, data obtained from various data sources 10a-c may be routed to a specific set of application servers 104a-c and database servers 106a-c that may receive or process the data, which may prevent other sets of application servers 104a-c, application servers 110a-1, or database servers 106a-c that are not associated with or assigned to the data sources 10a-c from accessing or processing the data from the data sources 10a-c. Additionally, data from the various data sources 10a-c may be processed by the various servers 102a-d, load balancer devices 118a-c, application servers 110a-1, or database servers 106a-c, and stored in a specific portion of a single system database 108. Thus, in some examples, a single system database 108 may be used to store data from a variety of different sources that may be processed by a variety of servers or devices, which may avoid the use of multiple databases in the system 100. In some instances, routing data from one or more data sources 10a-c as described herein can prevent various devices in the system 100 (e.g., application servers 110a-1 or database servers 106a-c) from sharing access to the same data (e.g., from the same data source) or from simultaneously attempting to access the same data, which can mitigate or eliminate cluster wait or contention issues in the system 100. In some examples, mitigating or eliminating cluster wait or contention issues in the system 100 can prevent resources of the system 100 from being wasted, such as by preventing one or more application servers 110a-1, database servers 106a-c, or any other devices in the system 100 from being prevented or delayed from performing operations on data obtained by the system 100.
[0042] In some examples, an error may occur in the system 100 (e.g., an error, failure, defect, etc. in one or more devices or components of the system 100). In this example, if an error occurs in the system 100, one or more components of the system 100 may be configured to determine additional or alternative routes for data obtained or received by the servers 102a-d. As an example, if a defect or error occurs in the database server 106a, the application servers 110a-d associated with the database server 106a may be configured to determine alternative routes for data obtained or received by the application servers 110a-d.
[0043] For example, Figure 4 is an example of a data partitioning system according to an example of the present disclosure. Figure 4 In the example depicted in , the application server 110a may receive data from the load balancer device 118a or the server 102a, and determine or detect that a defect (e.g., a failure) has occurred in the database server 106a. In this example, the application server 110a may determine or identify another database server 106b-c in the system 100 to receive or process the data. For example, in response to determining that a defect has occurred in the database server 106a, the application server 110a may determine that the database server 106b is available to receive or process the data, and transmit the obtained data to the database server 106b that replaces the database server 106a. The database server 106b may then determine the portion or partition of the system database 108 in which the data is stored, in a manner substantially the same as described above, based on the key identifiers of the data sources 10a-c. In this manner, if an error or defect occurs in one or more components of the system 100, the data obtained or received by the system 100 can be rerouted.
[0044] Back to Figure 1 ,although Figure 1 A specific arrangement of system 100 is illustrated, but various additional arrangements are possible. As an example, although Figure 1A certain number of servers 102a-d, application server groups 104a-c, application servers 110a-1, database servers 106a-c, and system databases 108 are illustrated, but the present disclosure is not limited to such a configuration. Rather, in other examples, the system 100 may include any suitable number or type of servers 102a-d, application server groups 104a-c, application servers 110a-1, database servers 106a-c, and system databases 108. For example, in some examples, the system 100 may be expanded outward (e.g., expanded outward to include additional application server groups, application servers, database servers, or system databases 108). In addition, although in some examples described above, the data source 10a-c may transmit data indicating a source identifier or key identifier associated with the data source 10a-c to one or more devices in the system 100, the present disclosure is not limited to such a configuration. Rather, in other examples, the data source 10a-c may transmit data to one or more components of the system (e.g., servers 102a-d), and the data may include information measured or received (e.g., obtained) by the data source 10a-c, together with a source identifier associated with the data source 10a-c. In this example, one or more components of the system 100 (e.g., servers 102a-d, application servers 110a-1, database servers 106a-c, load balancer devices 118a-c, or system database 108) may determine a key identifier associated with the data source 10a-c based on the source identifier. For example, the server 102a obtains data from the data source 10a-c associated with the source identifier 114a. In this example, the processor of the server 102a may determine the key identifier associated with the source identifier 114a of the data source 10a-c. As an example, the source identifier 114a may be a meter identifier of a meter device data source 10a-c, and the processor may determine that a key identifier associated with the source identifier 114a is a portion of the meter identifier (e.g., the last two digits of the meter identifier). In this example, the determined key identifier may be used to route data from the data source 10a-c to a specific partition of the system database 108 associated with the determined key identifier in a manner substantially the same as described above. In some examples, using the meter identifier as a source identifier for determining a routing identifier or a key identifier may provide one or more advantages. For example, if the meter identifier is a source identifier of a data source 10a-c, and the key identifier is a portion of the meter identifier, the data source 10a-c may transmit the measured data along with data indicating the source identifier to one or more components of the system 100 (e.g., a server 102a-d, an application server 110a-1, a database server 106a-c, a load balancer device 118a-c, or a system database 108).In this example, one or more components can determine or identify a key identifier (eg, a portion of a meter identifier) based on a source identifier (eg, a meter identifier).
[0045] In addition, although in the examples described above, the routing identifier and / or key identifier of the data source 10a-c can be determined based on the source identifier of the data source 10a-c, the present disclosure is not limited to such a configuration. Instead, in other examples, any suitable method or technology can be used to determine the routing identifier and / or key identifier of the data source 10a-c.
[0046] For example, Figure 2 is an example of a data partitioning system 200 according to another example of the present disclosure. In this example, the system 200 includes Figure 1 Servers 102a-d, application server groups 104a-c, application servers 110a-1, database servers 106a-c, load balancer devices 118a-c, and system database 108. Figure 2 In the example depicted in FIG. 2 , system 200 is scaled out to include additional load balancer devices 202, application server groups 204, application servers 206a-d, and database servers 208, each of which can be respectively Figure 1 The load balancer devices 118a-c, the application server groups 104a-c, the application servers 110a-1, and the database servers 106a-c are configured in substantially the same manner.
[0047] In this example, the lookup table 112 of the servers 102a-d includes various source identifiers 210a-e (e.g., various meter identifiers) and routing identifiers 212a-e associated with each source identifier 210a-e, and the lookup table 112 can be used to associate routing information from data sources associated with the source identifiers 210a-e (e.g., various meter identifiers) with the source identifiers 210a-e in substantially the same manner as described above. Figure 1 The data source 10a-c) is routed to the load balancer devices 118a-c and 202, the application server groups 104a-c and 204, the application servers 110a-1 and 206a-d, and the database servers 106a-c and 208. In some examples, the servers 102a-d may be added to the load balancer device 202, the application server group 204, the application servers 206a-d, or the database server 208. Figure 1 The system 100 receives data indicating a source identifier 210a-e and a route identifier 212a-e (eg, from another device or via user input).
[0048] In this example, the system database 108 may be further partitioned based on the key identifier of one or more data sources, such that data from the data sources may be stored in a particular portion of the system database 108 in substantially the same manner as described above. For example, the system database 108 may be further partitioned to include a partition 214, such that data obtained from data sources associated with the application server group 204 and the database server 208 (e.g., data sources associated with the source identifier 210d and the routing identifier 212d) may be processed and stored in the partition 214 of the system database 108 in substantially the same manner as described above. In some examples, in response to scaling out the system 100 to include the load balancer device 202, the application server group 204, the application servers 206a-d, and the database server 208, the system database 108 may be partitioned to include the partition 214 or any other partitions.
[0049] In this manner, system 100 may be scaled out to include additional or alternative components (eg, load balancers, application server groups, application servers, database servers, etc.).
[0050] Figure 3 is a flowchart depicting an example of a process for partitioning data in a cluster database environment according to one example of the present disclosure. In some examples, Figure 3 The steps in can be implemented in program code that can be executed by a processor (e.g., a processor in a general-purpose computer or server). In some examples, these steps can be implemented by a group of processors or servers. In some examples, Figure 3 One or more of the steps shown in may be omitted or performed in a different order. Similarly, in some examples, Figure 3 Additional steps not shown in the reference Figure 1 Describes Figure 3 300 , but other implementations are possible.
[0051] In block 302, data is obtained from a data source 10a-c, along with a source identifier and a key identifier of the data source 10a-c. The data source 10a-c may be any data source. For example, the data source 10a-c may be a meter device for measuring consumption of a resource such as electricity, gas, water, etc. The data source 10a-c may measure or receive (e.g., obtain) data, store the data, and transmit the data to a server 102a-d. The data may include information measured or received (e.g., obtained) by the data source 10a-c, along with a source identifier or a key identifier associated with the data source 10a-c. As an example, the data source 10a is a water meter device, and the server 102a obtains data measured or received by the water meter device, along with data indicating a meter device identifier of the water meter device and a specific portion of the meter identifier (e.g., the last two digits of the meter device identifier).
[0052] In block 304, a particular group of application servers 104a-c associated with the data source 10a-c is determined based on a routing identifier corresponding to a source identifier of the data source 10a-c.
[0053] For example, the various application server groups 104a-c may include various application servers 110a-1. Each application server group 104a-c may be associated with a specific routing identifier (e.g., assigned to a specific routing identifier). In some examples, the server 102a includes a processor and a memory including a database or lookup table 112. The lookup table 112 of the server 102a may include data indicating source identifiers 114a-e associated with various data sources 10a-c and routing identifiers 116a-e associated with each source identifier 114a-e. Each routing identifier 116a-e indicates a specific application server group 104a-c, application server 110a-1, or database server 106a-c assigned to each source identifier 114a-e. The server 102a may receive data from the data source 10a-c, together with the source identifier 114a-e associated with the data source 10a-c, and the processor of the server 102a may access the lookup table 112 to determine the routing identifier 116a-e associated with the source identifier 114a-e. As an example, server 102a receives data from data source 10a corresponding to source identifier 114a and determines that routing identifier 116a is associated with source identifier 114a based on lookup table 112. In this example, server 102a may determine that routing identifier 116a is associated with (e.g., assigned to) application server group 104a.
[0054] In another example, in block 304, the processor of the server 102a-d may determine a routing identifier associated with the data source 10a-c based on the source identifier of the data source 10a-c without accessing the lookup table 112. For example, the server 102a may receive data from the data source 10a-c along with the source identifier 114a-e associated with the data source 10a-c, and the processor of the server 102a may calculate or determine the routing identifier 116a-e associated with the source identifier 114a-e and / or the data source 10a-c using the following formula:
[0055] Routing identifier = (source identifier % 100) % n
[0056] In the above equation, % represents a modular operation or function (eg, determination of the remainder after dividing one number by another), and n represents the number of database servers 106a - c in the system 100 .
[0057] In block 306, a particular application server 110a-1 of the application group 104a-c that can process data from the data source 10a-c is determined. For example, each server 102a-d may transmit data obtained from the data source 10a-c to the load balancer device 118a-c. oEach load balancer device 118a-c can be associated with a particular application server group 104a-c and communicatively coupled to the particular application server group 104a-c and the servers 102a-d. The load balancer devices 118a-c can determine a particular application server 110a-1 within the application server group 104a-c to process or analyze data from a data source 10a-c associated with the application server group 104a-c. For example, the load balancer device 118a can be associated with the application server group 104a and can receive data from the server 102a. The load balancer device 118a can determine the application server 110a-d within the application server group 104a to process or analyze data from the data source 10a-c associated with the application server group 104a. In some examples, the load balancer devices 118a-c may use various methods or techniques (e.g., in a random manner, based on the availability of the application server 110a-1 to process data, or any other suitable method or technique) to determine a particular application server 110a-1 within the application server group 104a-c to process or analyze data from the data source 10a-c. For example, in response to determining that the application server 110a has available computing or network resources to process the data (e.g., if the application server 110a is not performing an operation), the load balancer device 118a may determine that the application server 110a can process the data from the data source 10a. As another example, in response to determining that the application server 110a has more available computing or network resources than other application servers 110b-d of the application server group 104a (e.g., if the other application servers 110b-d are performing more operations than the application server 110a), the load balancer device 118a may determine that the application server 110a can process the data from the data source 10a.
[0058] In some examples, the system 100 may not include a load balancer device 118a-c. In this example, in block 306, the server 102a-d may determine a particular application server 110a-1 within the application server group 104a-c to process or analyze data from the data source 10a-c associated with the application server group 104a-c in substantially the same manner as described above.
[0059] In block 308, the data obtained from the data sources 10a-c is transmitted to the application servers 110a-d of the application server group 104a-c (e.g., the application server group determined in block 304). In some examples, the servers 102a-d may be communicatively coupled to the application server group 104a-c to transmit the data obtained from the data sources 10a-c to the application server group 104a-c or the application server 110a-1 of the application server group 104a-c. For example, the servers 102a-d may transmit the data obtained from the data sources 10a-c to the application server 110a-1 determined by the load balancer devices 118a-c (e.g., in block 306). In another example, servers 102a-d may transmit data obtained from data source 10a-c to any application server 110a-1 of an application server group 104a-c associated with a routing identifier 116a-e that corresponds to a source identifier 114a-e of a data source 10a-c (e.g., the application server group determined in block 304). In some examples, servers 102a-d may be communicatively coupled to a particular load balancer 118a-c associated with an application server group 104a-c, and load balancer 118a-c may transmit the data to the application server group 104a-c or to an application server 110a-1 of the application server group 104a-c.
[0060] As an example, server 102a receives data from data source 10a corresponding to source identifier 114a, and determines based on lookup table 112 that routing identifier 116a is associated with source identifier 114a. In this example, server 102a can determine that routing identifier 116a is associated with application server group 104a (e.g., assigned to application server group 104a). Continuing with this example, server 102a can transmit data from data source 10a to a specific application server group 104a associated with application servers 110a-d of data source 10a or application server group 104a. As another example, server 102a can transmit data to a specific load balancer device 118a associated with application server group 104a, and load balancer device 118a can transmit data to application server group 104a or specific application servers 110a-d of application server group 104a (e.g., the specific application servers determined in block 306).
[0061] In some examples, in block 308, application server 110a-1 of a particular application server group 104a-c may process data obtained or received from servers 102a-d or load balancer devices 118a-c.
[0062] In block 310, data is transmitted to a particular database server 106a-c associated with an application server group 104a-c. For example, each database server 106a-c may be associated with a particular application server group 104a-c. As an example, and with reference to Figure 1 , database server 106a may be associated with application server group 104a, database server 106b may be associated with application server group 104b, and database server 106c may be associated with application server group 104c. Application server 110a-1 of a particular application server group (e.g., the application server group determined in block 304) may process data obtained or received from servers 102a-d or load balancer devices 118a-c (e.g., in block 308) and transmit the processed data to a particular database server 106a-c associated with application server group 104a-c of application server 110a-1. As an example, application server 110a may process data received from load balancer device 118a or server 102a and transmit the processed data to database server 106a associated with application server group 104a of application server 110a.
[0063] In block 312, data from the data sources 10a-c is stored in a particular partition of the system database 108 based on the key identifier of the data source 10a-c.
[0064] For example, each database server 106a-c may include a processor and a memory including a database. The database server 106a-c may receive data from an application server 110a-1 associated with the database server 106a-c (e.g., in block 310), and the processor of the database server 106a-c may access the database to route the data received from the application server 110a-1 to a specific portion or partition of the system database 108.
[0065] As an example, the system database 108 may be partitioned (e.g., split) based on key identifiers associated with various data sources 10a-c. For example, the system database 108 may be partitioned into partitions (e.g., portions) 120, 122, 124, and each partition 120, 122, 124 may be associated with a key identifier of a particular data source 10a-c. For example, partition 120 may be associated with a key identifier of the data source 10a corresponding to source identifier 114a, partition 122 may be associated with a key identifier of the data source 10b corresponding to source identifier 114b, and partition 124 may be associated with a key identifier of the data source 10c corresponding to source identifier 114c. In this example, the databases of the database servers 106a-c may include data indicating the key identifiers associated with the various data sources 10a-c and a portion of the system database 108 associated with each key identifier (e.g., assigned to each key identifier). The database servers 106a-c may use the database to route data obtained from the data source 10a-c (e.g., via the corresponding application server 110a-1) to a specific portion of the system database 108 corresponding to the key identifier of the data source 10a-c. As an example, the database server 106a obtains data from the application server 110a, the data including data from the data source 10a associated with the source identifier 114a, along with the key identifier of the data source 10a. The processor of the database server 106a accesses the database of the database server 106a to determine the specific partition 120 of the system database 108 associated with the key identifier, and transmits the data to the system database 108 for storage in the partition 120 of the system database 108.
[0066] Although in this example, the system database 108 may be partitioned based on key identifiers associated with the various data sources 10a-c, the present disclosure is not limited to such a configuration. Rather, in other examples, the system database 108 may additionally or alternatively be partitioned in any suitable manner, and the database servers 106a-c may be configured to transfer data to the system database 108 for storage in a particular partition of the system database 108. For example, the system database 108 may be partitioned based on a date, time, or any suitable interval, and the database servers 106a-c may be configured to transfer data to the system database 108 for storage in a particular partition of the system database 108 based on a particular date, time, or interval. As an example, data stored in the system database 108 may be additionally partitioned based on the day of the month, and the database servers 106a-c may be configured to transmit data to the system database 108 to be stored based on the partitions, such that data obtained from the data sources 10a-c is stored in a particular partition of the system database 108 associated with the key identifier of the data source 10a-c, as described above, and the particular partition is further partitioned based on the day of the month on which the data was received (e.g., data received from the data source 10a-c on a particular day may be stored within a sub-partition of the partition). As another example, data transmitted or stored in the system database 108 may be additionally or alternatively partitioned based on any suitable criteria, such as the type, content, characteristics of the content from the data source 10a-c, etc.
[0067] Although in the examples described above, data from a data source may be routed and partitioned based on a source identifier, routing identifier, or key identifier associated with the data source, the present disclosure is not limited to such a configuration. Rather, in other examples, data from a data source may be routed to a specific server, a load balancer device, a group of application servers, and / or a database server based on a source identifier, routing identifier, or key identifier associated with the data source. In an alternative example, data from a data source may be stored in a specific partition or sub-partition of a system database based on a source identifier, routing identifier, or key identifier associated with the data source.
[0068] The foregoing description of certain examples, including the illustrated examples, has been presented for purposes of illustration and description only and is not intended to be exhaustive or to limit the disclosure to the precise form disclosed. Many modifications, adaptations, and uses thereof will be apparent to those skilled in the art without departing from the scope of the disclosure.
Claims
1. A system for partitioning data, include: server; a plurality of application server groups communicatively coupled to the server, wherein each application server group comprises an application server; a plurality of database servers communicatively coupled to a plurality of application server groups; wherein the number of the plurality of database servers is equal to the number of the plurality of application server groups, and each of the plurality of application server groups corresponds to and is communicatively connected to one of the plurality of database servers; and a system database divided into a plurality of partitions and communicatively coupled to a plurality of database servers, The server comprises: Processor; and A non-transitory computer readable medium communicatively coupled to a processor, wherein the processor is configured to perform operations including: receiving data from a data source, the data including a source identifier associated with the data source; Determining, based on a routing identifier corresponding to a source identifier associated with the data source, one of a plurality of application server groups that is associated with the data source; wherein the routing identifier indicates the one of the plurality of application server groups that is associated with the data source and is used to receive or process data from the data source; and Transfer data from the data source to the application server of the application server group, wherein the application server is configured to determine a database server among a plurality of database servers corresponding to the application server group, and transmit data from a data source to the database server, and The database server is configured to determine a key identifier associated with a data source, the key identifier being used to store data from the data source in a system database.
2. The system according to claim 1, further comprising: include: a plurality of load balancer devices communicatively coupled to the server and the plurality of application server groups, wherein the processor is further configured to determine a load balancer device of the plurality of load balancer devices associated with the application server group, and wherein the load balancer device is configured to: determining an application server of the application server group for processing data from a data source; and Transfer data from the data source to the application server.
3. The system of claim 1 , wherein the routing identifier is obtained from a database comprising a plurality of routing identifiers corresponding to a plurality of source identifiers, wherein each of the plurality of routing identifiers indicates an application server group among a plurality of application server groups, the application server group being associated with a data source identified by a source identifier among the plurality of source identifiers and being used to retrieve or process data from the data source.
4. The system according to claim 1, wherein the database server is configured to determine a partition of the system database corresponding to the data source and used to store data from the data source among the plurality of partitions by: accessing a database comprising a plurality of key identifiers corresponding to a plurality of partitions of a system database; determining the partition of the system database corresponding to the key identifier of the data source; as well as The data is transferred to the system database for storage in the partition.
5. The system according to claim 1, wherein the application server of the application server group is further configured to: detecting an error in a database server corresponding to the application server group; identifying another database server of the plurality of database servers to receive data from the data source; and Data is transferred from the data source to an identified another database server of the plurality of database servers.
6. The system of claim 1, wherein the data source comprises a metering device for measuring consumption of a resource.
7. The system of claim 6, wherein the resource comprises electricity, gas or water.
8. A method for partitioning data, include: obtaining, by a server, data from a data source, the data including a source identifier associated with the data source; determining, by the server, an application server group associated with the data source from among the plurality of application server groups based on a routing identifier corresponding to a source identifier of the data source; wherein the routing identifier indicates the one application server group among the plurality of application server groups that is associated with the data source and is used to receive or process data from the data source; The server transmits the data from the data source to the application server of the application server group; The application server determines, from among the plurality of database servers, a database server corresponding to the application server group; wherein the number of the plurality of database servers is equal to the number of the plurality of application server groups, and each of the plurality of application server groups corresponds to and is communicatively connected to one of the plurality of database servers; The application server transfers data from the data source to the database server; determining, by the database server, a key identifier associated with the data source based on a source identifier of the data source; as well as A partition of a system database associated with a data source from among a plurality of partitions is determined, by a database server and based on a key identifier of the data source, wherein the partition is to store data from the data source.
9. The method of claim 8, wherein the data is transmitted from the data source to the application server of the application server group include: determining, by the server, a load balancer device from among a plurality of load balancer devices associated with the application server group; The server transmits data from the data source to the load balancer device; determining, by the load balancer device, an application server of the application server group for processing data from the data source; as well as The load balancer device transfers data from the data source to the application server.
10. A method according to claim 8, wherein the routing identifier is obtained from a database including multiple routing identifiers corresponding to multiple source identifiers, wherein each of the multiple routing identifiers indicates an application server group among multiple application server groups; the application server group is associated with a data source identified by one of the source identifiers and is used to retrieve or process data from the data source.
11. The method of claim 8, wherein determining a partition of a system database associated with a data source among a plurality of partitions include: accessing, by a database server, a database comprising a plurality of key identifiers corresponding to a plurality of partitions of a system database; determining, by the database server, the partition of the system database corresponding to the key identifier of the data source; as well as Data is transferred from the data source to the system database by the database server for storage in the partition.
12. The method according to claim 8, further comprising: include: detecting, by an application server of the application server group, an error in a database server corresponding to the application server group; identifying, by the application server, another database server among the plurality of database servers to receive data from the data source; as well as The application server transfers data from the data source to another database server among the plurality of database servers.
13. The method of claim 8, wherein the data source comprises a metering device for measuring consumption of a resource.
14. The method of claim 13, wherein the resource comprises electricity, gas or water.
15. A method for partitioning data, include: obtaining, by a server, data from a data source, the data including a source identifier associated with the data source; The server determines, based on a routing identifier corresponding to a source identifier associated with the data source, an application server group among a plurality of application server groups that is associated with the data source; wherein the routing identifier indicates the one application server group among the plurality of application server groups that is associated with the data source and is used to receive or process data from the data source; The server transmits the data from the data source to the application server of the application server group; The application server determines, from among the plurality of database servers, a first database server corresponding to the application server group; wherein the number of the plurality of database servers is equal to the number of the plurality of application server groups, and each of the plurality of application server groups corresponds to and is communicatively connected to one of the plurality of database servers; detecting, by the application server, an error in a first database server corresponding to the application server group; identifying, by the application server, a second database server among the plurality of database servers to receive data from a data source; The application server transmits the data from the data source to a second database server among the plurality of database servers; as well as A key identifier associated with the data source is determined by the second database server based on the source identifier, and a partition of a system database associated with the data source among a plurality of partitions is determined based on the key identifier, wherein the partition is used to store data from the data source.
16. The method of claim 15, wherein the data is transmitted from the data source to the application server of the application server group include: determining, by the server, a load balancer device from among a plurality of load balancer devices associated with the application server group; The server transmits data from the data source to the load balancer device; determining, by the load balancer device, an application server of the application server group for processing data from the data source; as well as The load balancer device transfers data from the data source to the application server.
17. The method of claim 16, wherein determining the application server of the application server group for processing the data from the data source comprises determining, by a load balancer device, the application server for processing the data from the data source based on availability of the application server to process the data.
18. The method of claim 15, wherein determining a partition of a system database associated with a data source among a plurality of partitions include: accessing, by a second database server, a database comprising a plurality of key identifiers corresponding to a plurality of partitions of a system database; determining, by the second database server, the partition of the system database corresponding to the key identifier of the data source; as well as The data is transferred from the data source to the system database by the second database server for storage in the partition.
19. A method according to claim 15, wherein the routing identifier is obtained from a database including multiple routing identifiers corresponding to multiple source identifiers; wherein each of the multiple routing identifiers indicates an application server group among multiple application server groups, which is associated with a data source identified by a source identifier among the multiple source identifiers and is used to retrieve or process data from the data source.
20. The method of claim 15, wherein the data source comprises a metering device for measuring consumption of a resource.
