WO2016157358A1 - Data processing system - Google Patents
Data processing system Download PDFInfo
- Publication number
- WO2016157358A1 WO2016157358A1 PCT/JP2015/059905 JP2015059905W WO2016157358A1 WO 2016157358 A1 WO2016157358 A1 WO 2016157358A1 JP 2015059905 W JP2015059905 W JP 2015059905W WO 2016157358 A1 WO2016157358 A1 WO 2016157358A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- server
- data
- business
- processing
- servers
- Prior art date
Links
- 238000012545 processing Methods 0.000 title claims abstract description 114
- 238000012217 deletion Methods 0.000 claims abstract description 10
- 230000037430 deletion Effects 0.000 claims abstract description 10
- 238000000034 method Methods 0.000 claims description 59
- 230000008569 process Effects 0.000 claims description 44
- 230000006870 function Effects 0.000 claims description 14
- 230000001174 ascending effect Effects 0.000 claims description 5
- 238000012937 correction Methods 0.000 claims description 5
- 238000013523 data management Methods 0.000 claims 1
- 238000004891 communication Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000012790 confirmation Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003362 replicative effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2315—Optimistic concurrency control
- G06F16/2322—Optimistic concurrency control using timestamps
Definitions
- the present invention relates to a data processing system, and more particularly to a technique for managing business data generated by a plurality of AP servers by a plurality of DB servers.
- Patent Document 1 discloses a technique for registering data in a disk device of a primary control device, and then transmitting the same data to a sub-control device installed at a remote place and requesting the registration.
- the master server that controls the entire process inquires of each target DB server whether the commit can be executed.
- the DB server that is ready for update returns a “ready” response, confirms that all DB servers have completed the preparation, the master server notifies the commit start, and the database is rewritten all at once. If an error occurs in one of the databases during rewriting, the DB server where the error occurred reports the failure, and the master server notifies all servers of the withdrawal and performs a “rollback” process to restore the data.
- Non-Patent Document 2 Non-Patent Document 2
- the present invention has been devised in view of such a current situation, and realizes a technology capable of ensuring the speed of processing while preserving the same data in a plurality of DB servers. It is an object.
- a data processing system is a data processing system including a plurality of AP servers and a plurality of DB servers, and the DB servers are common to each other.
- Each table is provided with a table for storing business data, and each table has a restriction that only records can be referenced and added, and deletion and updating are prohibited.
- the function to execute common business processing for requests sent from client terminals, and the business data generated as a result of processing are sent to each DB server above, It has a function to request additional registration, and each business data mentioned above is assigned a unique ID including an identification code to identify the AP server that generated it.
- each DB server above stores a responsible AP definition table that defines for each business process the AP server responsible for the specific business process for which exclusive control is required. If the business process request sent from the client terminal does not require exclusive control, it executes it by itself, whereas if it requires exclusive control, refer to the AP definition table in charge, and After identifying the AP server that should be in charge of business processing, delegate the relevant processing to the relevant AP server, and the responsible AP server that received this temporarily stores the delegated business processing in the queue, Each business process is executed in order according to the rules of the FIFO.
- the data processing system according to claim 2 is the system according to claim 1, and in addition to the main AP application server, the main AP application server performs a process when the main AP application server does not function.
- a feature is that the sub AP server to be assigned is defined for each business process.
- the data processing system is the system according to claim 1 or 2, and each of the business data is stamped with a time stamp at the time of business processing execution.
- new business data with an ascending ID different from the business data, the corrected data, and the time stamp at the time of correction is generated, and the business data for updating is also generated. It is characterized in that existing business data is substantially updated by additionally registering in a corresponding table provided in each DB server.
- the data processing system is the system according to claims 1 to 3, and further, when the AP server needs to delete the existing business data, the ID of the business data is to be canceled. Generate business data for data cancellation with data items to be stored, and add the business data for data cancellation to the cancellation-dedicated table provided in each DB server to effectively store the existing business data. It is characterized by being deleted.
- business data generated by the AP server is simultaneously transmitted to a plurality of DB servers and is registered in duplicate in each table, so that the integrity of business data can be improved. it can.
- it is prohibited to delete or update data that requires complicated processing in the event of a failure. Data can be recovered simply by copying the missing data from another DB server. Therefore, it is not necessary to adopt a strict arbitration method such as a two-phase commit, and it is possible to determine that registration is complete when a receipt notification is simply returned from each DB server.
- each AP server can freely process a business process that does not require exclusive control. Therefore, the processing efficiency of the entire system can be improved by load balancing.
- the processes are aggregated in the AP server preset in the assigned AP definition table and processed according to the FIFO rules. It is possible to effectively avoid the generation of contradictory data. Because the business data generated in each AP server is assigned a unique ID including the identification code of each AP server, even if business data is transmitted from each AP server to the DB server, Each ID does not overlap, ensuring absolute uniqueness.
- the DB server table is provided with a restriction that prohibits deletion and update of records.
- substantial update of business data and Deletion can be realized.
- FIG. 1 is an overall configuration diagram of a data processing system 10 according to the present invention.
- a first AP server 14 a first DB server 16, and a second DB server 18 are installed.
- a second AP server 22, a third DB server 24, and a fourth DB server 26 are installed in the second data center 20 located in Osaka.
- Each of the first AP server 14 and the second AP server 22 has the same application program, and executes the same business process for the request transmitted from the client terminal 28 via the communication network 27 such as the Internet. It has the function to do.
- first AP server 14 and the second AP server 22 are shown, but in reality, a plurality of AP servers having the same function are installed in each data center, and a load (not shown) is shown. Load distribution is achieved through a balancer. In this way, if multiple AP servers are provided in the same data center, even if any AP server is planned or unplanned, it is the same without switching to an AP server in another data center. The remaining AP server in the data center can be replaced, and downtime can be minimized.
- the number of DB servers is not limited, and three or more DB servers can be installed in each data center.
- the first DB server 16, the second DB server 18, the third DB server 24, and the fourth DB server 26 each have a common table, and the same data is stored in each table.
- each DB server has a point addition table 50, an addition cancellation table 51, a point application table 52, an application cancellation table 53, and a responsible AP definition table 54 in common. .
- point addition table 50 data items such as an addition ID, an account, the number of points, and a time stamp are set. Further, in the addition cancellation table 51, data items such as cancellation targets and time stamps are set.
- point application table 52 data items such as an application ID, an account, the number of points, and a time stamp are set.
- application cancellation table 53 data items such as a cancellation target and a time stamp are set.
- assigned AP definition table 54 data items such as an assigned AP definition ID, an account, a primary assigned AP, and a secondary assigned AP are set.
- a unique identification code using an artificial key is stored (details will be described later).
- the first AP server 14 is connected to the first DB server 16 and the second DB server 18 via the LAN, and is installed in the second data center 20 via the communication line 29.
- the DB server 24 and the fourth DB server 26 are also connected.
- the second AP server 22 is connected to the third DB server 24 and the fourth DB server 26 via the LAN, and is installed in the first data center 12 via the communication line 29.
- the first DB server 16 and the second DB server 18 are also connected.
- the client terminal 28 installed in eastern Japan is connected to the first AP server 14 installed in the first data center 12, and the client terminal 28 installed in western Japan is connected to the second data center 20. It is connected to a second AP server 22 installed inside.
- each data center normally provides services to neighboring client terminals 28, but also provides services to client terminals 28 nationwide in the event of a disaster.
- DB servers usually need to keep data of the same content mutually.
- the AP server can request any DB server to extract data when referring to the data. Dispersion can be achieved.
- the number of data centers is not limited to two. As many data centers as possible are provided in various locations, and multiple AP servers with the same functions are installed in each data center. It is desirable to connect to all DB servers via a communication network.
- FIG. 3 shows the internal configuration of the first AP server 14 and the second AP server 22.
- the business processing unit 30, the artificial key management unit 32, the data control unit 34, and a plurality of DB communications are shown. Part 38.
- the business processing unit 30 executes data generation processing, arithmetic processing, registration processing in the DB server, etc. in response to a request from the client terminal 28, and the AP server CPU operates according to a dedicated application program. Is realized.
- the artificial key management unit 32 has a function of issuing an artificial key (surrogate key) in response to a request from the business processing unit 30 (details will be described later).
- the artificial key management unit 32 is realized by the CPU of the AP server operating according to dedicated middleware.
- the data control unit 34 When the data control unit 34 receives a data registration instruction from the business processing unit 30, the data control unit 34 has a function of replicating data as many as the number of DB servers and passing them to the DB communication unit 38. This is realized by the CPU of the AP server operating according to the above. In addition, the data control unit 34 has a function of receiving an instruction from the artificial key management unit 32 and instructing the DB communication unit 38 in charge of each DB server installed in the same data center to update the artificial key management data. (Details will be described later).
- Each DB liaison unit 38 performs functions such as issuing an SQL statement to a DB server assigned to itself in advance and instructing additional registration and reference of data, and the CPU of the AP server according to dedicated middleware. It is realized by operating.
- the business processing unit 30 that has generated data as a result of the business processing requests the artificial key management unit 32 to designate a table and issue an artificial key (S10).
- the artificial key management unit 32 In the case of generating data to be stored in the above point addition table 50, it is requested to issue an artificial key for “addition ID”.
- the artificial key management unit 32 refers to the artificial key management table 56 stored in the DB server installed in the same data center (S12), and works on the latest artificial key related to the point addition table 50.
- the processing unit 30 is notified (S14).
- the artificial key management table 56 includes data items of “table ID”, “AP server ID”, and “next key value”, in units of “table ID” + “AP server”. The latest artificial key (next key value) is managed.
- the “artificial key” is a numerical value having a predetermined length (for example, 32 bits or 64 bits). In the last digit (end) of the numerical value, an identification code (any numerical value from 0 to 9) for specifying the AP server that generated the data is set.
- the relationship between the ID of each AP server and a numerical value of 0 to 9 is defined in the lower-order digit management table 57 of the artificial key.
- the AP server management table 58 and the data center management table 59 the relationship between each AP server and the data center is defined. Similar to the artificial key management table 56, the lower one digit management table 57, the AP server management table 58, and the data center management table 59 of these artificial keys are also stored in the DB server in the same data center.
- the artificial key management unit 32 that has finished notifying the latest value of the artificial key to the business processing unit 30 updates the value of each record in the artificial key management table 56 (S16). Specifically, for the “next key value” in the point addition table 50 related to the AP server, “the last value (the latest value above) is composed of the part excluding the identification code at the end. Is set to a value obtained by adding 1 to a numerical value.
- the update method of the latest value of the artificial key is not limited to such “ascending order”, but “in the immediately preceding value (the latest value described above) excluding the identification code at the end. It may be “descending order” in which “a value obtained by subtracting 1 from a configured numerical value” is set.
- the identification code of the AP server is not limited to the numerical value of “0 to 9” as described above, and other character types may be used. Further, an identification code may be inserted at the head of the artificial key. Further, only the numerical value excluding the AP server identification code is stored in the “next key value” of the artificial key management table 56, and the artificial key management unit 32 sets the corresponding identification code at the time of issuing the artificial key. It can also be added to the end of the numerical value and issued to the business processing unit 30.
- the business processing unit 30 Upon receiving the latest artificial key from the artificial key management unit 32, the business processing unit 30 generates data in which the artificial key is set as an ID in a primary key or an external key (S18). This data is transmitted to all DB servers via the data control unit 34 and the DB communication unit 38, and is additionally registered in a corresponding table (point addition table 50) provided for each.
- the uniqueness of the artificial key is ensured in units of “AP server x table”, and each AP server is associated with a specific data center in the data center management table 59. Even if an artificial key is issued, the uniqueness of the last digit is ensured, so there is no risk of duplicated artificial keys being issued, and the uniqueness of each data is reliably ensured.
- Data generated by the business processing unit 30 of each AP server is stored in a table in each DB server as described above, but deletion (delete) prohibition and update (update) prohibition in each table These restrictions are imposed in advance. In short, in this system 10, only addition (insert) and reference (select) to each table is allowed.
- application revocation data is added to the application revocation table 53 when the point application data is invalidated. Since the application ID of the point application data to be invalidated is filled in the “cancellation target” of this application cancellation data, the business processing unit 30 applies the application among the point application data registered in the point application table 52. Those whose IDs are registered in the application cancellation table 53 are not counted.
- the registration data needs to be corrected in this system 10
- a new addition ID in ascending order different from the addition ID of the point addition data is paid out, and the point addition data in which the number of points is changed in the same account Add to 50.
- the data before correction and the data after correction are stamped with millisecond precision time stamps, and each is given an addition ID that is different in ascending order. Can definitely be identified.
- each DB server has a function to execute the same business process.
- Service can be provided, and load distribution of the entire system 10 can be performed.
- the business processing unit 30 of the second AP server 22 (S10 in FIG. 7) receives the addition ID from the artificial key management unit 32, and then generates point addition data (S12). .
- the business processing unit 30 requests the first DB server 14 to the fourth DB server 26 to additionally register the point addition data via each DB communication unit 38 (S14).
- the first DB server 14 to the fourth DB server 26 add the point addition data to the respective point addition tables 50 all at once.
- the business processing unit 30 calculates the point balance of the user (S16). Specifically, all point addition data associated with the account is acquired from any DB server (S16-01 in FIG. 8), and an addition ID is extracted from each point addition data (S16-02). Next, this addition ID is transmitted to an arbitrary DB server, and corresponding addition cancellation data is acquired (S16-03). Then, except for the point addition data in which the addition cancellation data is registered, the number of points of the remaining valid point addition data is totaled (S16-04), thereby determining the number of addition points of the user.
- the point card account (card number) from the client terminal 28B and the number of points applied according to the price of the purchased product are sent to the second AP server 22. Sent.
- the business processing unit 30 of the second AP server 22 (S30 in FIG. 9) is in charge of the point application process for the account by referring to the assigned AP definition table in any DB server.
- the AP server to be executed is specified (S32). And if it happens that self is designated as the main AP server, the point application process described later is executed as it is, but another AP server (for example, the first AP server 14) is designated as the responsible AP server. If so, the request (account, number of applied points, etc.) is transferred to the corresponding AP server, and the point application processing is delegated (S34).
- the first AP server 14 that has received this processing delegation temporarily stores this request in the FIFO queue (S36), and then executes the point application processing in order (S38).
- This point application process specifically follows the following procedure. First, the first AP server 14 calculates the point balance of the account by the same procedure as described above (S38-01 in FIG. 10).
- point application data is generated within the range of this point balance (S38-02). For example, if the current point balance exceeds the number of application points this time, the business processing unit 30 receives the application ID issued from the artificial key management unit 32, and then the point application data (application ID, account, number of points) , Timestamp). Then, all the DB servers are requested to register additional point application data (S38-03). On the other hand, if the point balance is less than the number of applied points at this point, the business processing unit 30 generates point application data for the remaining number of points and requests all DB servers to perform additional registration. As a result, the point balance of the account becomes zero.
- the first AP server 14 that has completed the delegated point application processing notifies the second AP server 22 of the processing result (number of applied points and point balance) (S40 in FIG. 9).
- the business processing unit 30 of the second AP server transmits the processing result to the client terminal 28B (S42). That is, when points can be applied for the total purchase amount, the client terminal 28B is notified of this and the point balance. On the other hand, when the points are applied only to a part of the purchase amount, the client terminal 28B is notified of the fact and the shortage amount. At this time, cash payment is made for the shortage at the store.
- the processing authority is transferred from the second AP server 22 to the first AP server 14, and the first AP server 14 determines the FIFO.
- the point application process is executed according to the rule. For this reason, even if a point application request related to the same account is transmitted from the client terminal 28C to the first AP server 14 at substantially the same time, adjustments between competing requests can be made according to FIFO (first-in first-out) rules.
- FIFO first-in first-out
- the assigned AP definition table 54 stores the secondary assigned AP in addition to the primary assigned AP, so if the AP server designated as the primary assigned AP is down, the secondary assigned AP is immediately available. Authority can be delegated to the AP server. If it is uneasy only to prepare the sub AP server, a lower AP server such as the sub AP can be set in advance.
- the assigned AP definition table 54 is stored in all DB servers, so even if any DB server is temporarily down, the AP server identifies the main assigned AP server from other DB servers. It becomes possible.
- the type of business processing that requires exclusive control (point application processing) is defined in the application program, and the correspondence between the processing target (account) and the AP server is defined in the assigned AP definition table 54. It is not limited to the method defined on the side.
- an arrival table 60, an arrival cancellation table 61, a shipping table 62, a shipping cancellation table 63, and a responsible AP definition table 64 are stored in each DB server. Keep it inside.
- the arrival table 60 data items such as an arrival ID, a product code, the number, and a time stamp are set. Further, in the arrival cancellation table 61, data items such as a cancellation target and a time stamp are set.
- the shipping table 62 data items such as a shipping ID, a product code, the number of items, and a time stamp are set.
- the shipping cancellation table 63 data items such as a cancellation target and a time stamp are set.
- the assigned AP definition table 64 data items such as assigned AP definition ID, product code, main assigned AP, and sub-assigned AP are set. In the above-mentioned arrival ID and shipping ID, a unique identification code using an artificial key is stored.
- the main AP server temporarily stores the order request in the FIFO queue, and executes the processing in order from the earliest. That is, the business processing unit 30 of the main AP server calculates the stock of the product related to the product code included in the order request, and if the number included in the order request is within the stock range, Generate and request all DB servers to add to the shipping table 62. Thereafter, the processing result is notified from the consignee AP server to the consignee AP server. When the inventory of the product is less than the number of orders, the consignee AP server notifies the consignment AP server of the result of the shortage of inventory without generating shipping data.
- the application program for the business processing unit 30 defines in advance processing that requires exclusive control (order reception processing) and unnecessary processing (arrival reception processing, inventory confirmation processing). It is necessary to keep it.
- exclusive control order reception processing
- unnecessary processing arrival reception processing, inventory confirmation processing
- there are some products such as software and electronic books sold in download format that do not need to worry about the number of stocks depending on the sales target. In such a case, it is required to define the necessity of exclusive control for each target product (for each product code) even in the same order receiving process.
- Each DB server in this system 10 receives the data to be added from the DB contact unit 38 and stores it in its own memory, and then sends a receipt completion notice to the DB contact unit 38. Thereafter, the hard disk, SSD, etc. The corresponding record is stored in a table provided in the external storage device.
- the reception completion notification transmitted from the DB server is collected in the data control unit 34 via each DB communication unit 38.
- the data control unit 34 outputs a registration completion notification to the business processing unit 30 when reception completion notifications are returned from all the DB communication units 38.
- the business processing unit 30 recognizes the data as a target to be read when the registration notification completion notification is received from the data control unit 34. In other words, until the registration completion notification is returned, the business processing unit 30 excludes the data from being read, and the registration timing in each DB server is shifted and incorrect data is read. It avoids the danger of end up.
- the data control unit 34 recognizes that a communication failure or machine trouble has occurred and places the DB server in offline mode. Transition. Specifically, the DB server is temporarily disconnected from the system 10, and the operation mode is based on only the remaining DB servers. That is, when a reception completion notification has been received from all DB servers other than the separated DB server, a registration completion notification is output from the data control unit 34 to the business processing unit 30, and the registered data is to be read.
- the disconnected DB server is inspected and necessary recovery measures are taken. For example, if it is determined that the receipt completion notification has not arrived due to a failure of the communication device, after replacing the communication device with a new communication device, the DB server is set to the write mode (only data writing is permitted and data reference is not allowed). (Prohibited state) and copy the difference data from another DB server installed in the same data center.
- the DB server When the stored data catches up to the latest state, the DB server is set to the read / write mode (a state in which data writing and reference is permitted) and reconnected to the system 10. Thereafter, the data control unit 34 resumes data transmission / reception via the DB communication unit 38 in charge of the DB server.
- each business data is allowed to be added only, and a rule that does not allow deletion or update is applied. Therefore, data recovery is extremely easy.
- deletion or update of data is allowed, in order to recover data, addition, deletion, or update of data is started from a certain point based on the update history information held by the DB server. It must be reproduced in order, and this takes a long time and a large load.
- the task processing unit 30 can read the data.
- memory is a volatile storage means, and data is lost when power supply is stopped, so when data is stored in a nonvolatile storage means (hard disk, etc.) A notification should be returned.
- a nonvolatile storage means hard disk, etc.
- the above-mentioned various business data are stamped with a millisecond precision time stamp by the business processing unit 30 as described above. Even when the value of MAX reaches MAX and IDs that are already issued are reissued (recycled), the business processing unit 30 can determine old and new data by comparing time stamps.
- each AP server handles business processes that do not require exclusive control.
- business processing that requires exclusive control can also be effectively applied to consolidating processing authority to a preset AP server.
- FIG. 1 is an overall configuration diagram of a data processing system according to the present invention. It is a figure which shows an example of the table stored in each DB server. It is a block diagram which shows the internal structure of a 1st AP server and a 2nd AP server. It is a flowchart which shows the issuing procedure of an artificial key. It is a figure which shows structures, such as an artificial key management table. It is a schematic diagram which shows the process sequence at the time of applying this system to point management business. It is a flowchart which shows the procedure of a point addition process. It is a flowchart which shows the procedure of a balance calculation process. It is a flowchart which shows the process sequence which concerns on the exclusive control between AP servers. It is a flowchart which shows the procedure of a point application process. The It is a figure which shows the other example of the table stored in each DB server.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Computer And Data Communications (AREA)
- Multi Processors (AREA)
- Hardware Redundancy (AREA)
Abstract
Description
例えば、特許文献1においては、正制御装置のディスク装置にデータを登録した後、遠隔地に設置された副制御装置に同一データを送信し、その登録を求める技術が開示されている。
For example, Patent Document 1 discloses a technique for registering data in a disk device of a primary control device, and then transmitting the same data to a sub-control device installed at a remote place and requesting the registration.
また、サーバコンピュータ自体の故障やトラブルも想定されるため、遠隔地に限らず、同一拠点内においても普段からデータベースサーバを二重化しておき、万一の事態に備えることが望ましいといえる。 In this way, by holding data twice by the primary and secondary control devices, even if an earthquake or the like occurs in one area and the disk device is physically damaged, the other disk device that survived By utilizing the data inside, it becomes possible to ensure the continuity of business processing.
In addition, since a failure or trouble of the server computer itself is assumed, it can be said that it is desirable to prepare for an emergency by duplicating the database server not only in a remote place but also in the same site.
しかしながら、マスターサーバと遠隔地に設置されたDBサーバ間で何度もデータのやり取りを繰り返す必要があることから、処理の迅速性が犠牲とならざるを得なかった。このため、ATM取引のように数秒程度の待ち時間が生じても問題にならない業務処理に対しては有効であっても、例えばオンライントレードのように、コンマ何秒かの遅延も許されないような業務処理には適用できないという問題があった。 By adopting such a two-phase commit, data consistency between DB servers is ensured, and it is possible to surely avoid the generation of illegal data.
However, since it is necessary to repeatedly exchange data between the master server and the remote DB server, the speed of processing must be sacrificed. For this reason, even if it is effective for business processing that does not cause a problem even if waiting time of several seconds occurs as in ATM trading, for example, as in online trading, a delay of several seconds is not allowed There was a problem that it could not be applied to business processing.
しかも、業務データの登録については障害発生時にデータの復旧に複雑な処理を要する削除や更新が禁止されており、単純に他のDBサーバから不足データをコピーするだけでデータの復旧が可能な追加のみが許容されているため、2相コミットのような厳格な調停方式を採用する必要がなく、各DBサーバから単純に受取通知が返ってきた時点で登録完了と認定することができる。 According to the data processing system described in claim 1, business data generated by the AP server is simultaneously transmitted to a plurality of DB servers and is registered in duplicate in each table, so that the integrity of business data can be improved. it can.
In addition, when registering business data, it is prohibited to delete or update data that requires complicated processing in the event of a failure. Data can be recovered simply by copying the missing data from another DB server. Therefore, it is not necessary to adopt a strict arbitration method such as a two-phase commit, and it is possible to determine that registration is complete when a receipt notification is simply returned from each DB server.
これに対し、排他制御を要する一部の業務処理については、担当AP定義テーブルにおいて予め設定されたAPサーバに処理が集約され、FIFOのルールに則って処理されるため、異なるAPサーバによって相互に矛盾するデータが生成されることを有効に回避することができる。
各APサーバにおいて生成される業務データには、それぞれのAPサーバの識別符号を含むユニークなIDが割り振られているため、DBサーバに対して各APサーバからバラバラに業務データが送信されても、それぞれのIDが重複することがなく、絶対的なユニーク性が担保される。 Also, a plurality of AP servers are prepared, and each AP server can freely process a business process that does not require exclusive control. Therefore, the processing efficiency of the entire system can be improved by load balancing.
On the other hand, for some business processes that require exclusive control, the processes are aggregated in the AP server preset in the assigned AP definition table and processed according to the FIFO rules. It is possible to effectively avoid the generation of contradictory data.
Because the business data generated in each AP server is assigned a unique ID including the identification code of each AP server, even if business data is transmitted from each AP server to the DB server, Each ID does not overlap, ensuring absolute uniqueness.
まず、東京に配置された第1のデータセンター12内には、第1のAPサーバ14と、第1のDBサーバ16と、第2のDBサーバ18が設置されている。
また、大阪に配置された第2のデータセンター20内には、第2のAPサーバ22と、第3のDBサーバ24と、第4のDBサーバ26が設置されている。 FIG. 1 is an overall configuration diagram of a
First, in the
A
このように、同一データセンター内に複数のAPサーバを設けておけば、何れかのAPサーバの計画停止時あるいは計画外停止時おいても、他のデータセンター内のAPサーバに切り替えることなく同一データセンター内の残りのAPサーバで代替可能となり、ダウンタイムを最小化することができる。
DBサーバの数にも限定はなく、3台以上のDBサーバを各データセンター内に設置することができる。 For convenience of illustration, only the
In this way, if multiple AP servers are provided in the same data center, even if any AP server is planned or unplanned, it is the same without switching to an AP server in another data center. The remaining AP server in the data center can be replaced, and downtime can be minimized.
The number of DB servers is not limited, and three or more DB servers can be installed in each data center.
ここでは、図2は示すように、ポイント加算テーブル50と、加算取消テーブル51と、ポイント適用テーブル52と、適用取消テーブル53と、担当AP定義テーブル54を各DBサーバは共通して備えている。 The
Here, as shown in FIG. 2, each DB server has a point addition table 50, an addition cancellation table 51, a point application table 52, an application cancellation table 53, and a responsible AP definition table 54 in common. .
また、加算取消テーブル51には、取消対象、タイムスタンプ等のデータ項目が設定されている。
ポイント適用テーブル52には、適用ID、アカウント、ポイント数、タイムスタンプ等のデータ項目が設定されている。
また、適用取消テーブル53には、取消対象、タイムスタンプ等のデータ項目が設定されている。
担当AP定義テーブル54には、担当AP定義IDと、アカウントと、主担当APと、副担当AP等のデータ項目が設定されている。
上記の加算ID、適用IDには、人工キーによるユニークな識別コードが格納される(詳細は後述)。 In the point addition table 50, data items such as an addition ID, an account, the number of points, and a time stamp are set.
Further, in the addition cancellation table 51, data items such as cancellation targets and time stamps are set.
In the point application table 52, data items such as an application ID, an account, the number of points, and a time stamp are set.
In the application cancellation table 53, data items such as a cancellation target and a time stamp are set.
In the assigned AP definition table 54, data items such as an assigned AP definition ID, an account, a primary assigned AP, and a secondary assigned AP are set.
In the addition ID and application ID, a unique identification code using an artificial key is stored (details will be described later).
また、第2のAPサーバ22は、LANを介して第3のDBサーバ24及び第4のDBサーバ26と接続されると共に、通信回線29を介して第1のデータセンター12内に設置された第1のDBサーバ16及び第2のDBサーバ18とも接続されている。 The first AP
The
同様に、第2のデータセンター20が被害を受けた場合には、西日本に設置されたクライアント端末28の接続先が第1のデータセンター12内に設定された第1のAPサーバ14に切り替えられる。 On the other hand, for example, when a large earthquake occurred in the Tokyo metropolitan area and the
Similarly, when the
また、同一データセンター内にも同一のデータを備えた複数のDBサーバが設置されているため、データを参照する際にAPサーバは任意のDBサーバにデータの抽出を依頼することができ、負荷分散を図ることができる。 As described above, each data center normally provides services to neighboring
In addition, since multiple DB servers with the same data are installed in the same data center, the AP server can request any DB server to extract data when referring to the data. Dispersion can be achieved.
この人工キー管理部32は、専用のミドルウェアに従ってAPサーバのCPUが動作することにより、実現される。 The artificial
The artificial
またデータ制御部34は、人工キー管理部32の指令を受け、同一データセンター内に設置された各DBサーバを担当するDB連絡部38に対して、人工キー管理データの更新を指令する機能をも備えている(詳細は後述)。 When the
In addition, the
まず、業務処理の結果としてデータを生成する必要が生じた業務処理部30は、人工キー管理部32に対して、テーブルを指定して人工キーの発行を要求する(S10)。上記のポイント加算テーブル50に格納するデータを生成するケースであれば、「加算ID」用の人工キーの発行を要求することとなる。 Here, based on the flowchart of FIG. 4, the mechanism of artificial key assignment in the
First, the
また、数値の下一桁(末尾)には、データを生成したAPサーバを特定するための識別符号(0~9の何れかの数値)がセットされている。 Here, the “artificial key” is a numerical value having a predetermined length (for example, 32 bits or 64 bits).
In the last digit (end) of the numerical value, an identification code (any numerical value from 0 to 9) for specifying the AP server that generated the data is set.
また、APサーバ管理テーブル58及びデータセンター管理テーブル59において、各APサーバとデータセンターとの関連性が定義されている。
これら人工キーの下一桁管理テーブル57、APサーバ管理テーブル58、データセンター管理テーブル59も、人工キー管理テーブル56と同じく、同一データセンター内のDBサーバに格納されている。 Specifically, the relationship between the ID of each AP server and a numerical value of 0 to 9 is defined in the lower-order digit management table 57 of the artificial key.
In the AP server management table 58 and the data center management table 59, the relationship between each AP server and the data center is defined.
Similar to the artificial key management table 56, the lower one digit management table 57, the AP server management table 58, and the data center management table 59 of these artificial keys are also stored in the DB server in the same data center.
具体的には、当該APサーバに係るポイント加算テーブル50の「次のキー値」に対して、「直前の値(上記の最新値)の中で、末尾の識別符号を除いた部分で構成される数値に、1を加算した値」をセットする。 The artificial
Specifically, for the “next key value” in the point addition table 50 related to the AP server, “the last value (the latest value above) is composed of the part excluding the identification code at the end. Is set to a value obtained by adding 1 to a numerical value.
さらには、人工キー管理テーブル56の「次のキー値」にAPサーバの識別符号を除いた数値のみを格納しておき、人工キーの発行時点で人工キー管理部32が対応の識別符号を上記数値の末尾等に付加して業務処理部30に発行することもできる。 However, the update method of the latest value of the artificial key is not limited to such “ascending order”, but “in the immediately preceding value (the latest value described above) excluding the identification code at the end. It may be “descending order” in which “a value obtained by subtracting 1 from a configured numerical value” is set. The identification code of the AP server is not limited to the numerical value of “0 to 9” as described above, and other character types may be used. Further, an identification code may be inserted at the head of the artificial key.
Further, only the numerical value excluding the AP server identification code is stored in the “next key value” of the artificial key management table 56, and the artificial
このデータは、データ制御部34及びDB連絡部38を介して全DBサーバに送信され、それぞれに設けられた対応のテーブル(ポイント加算テーブル50)に追加登録される。 Upon receiving the latest artificial key from the artificial
This data is transmitted to all DB servers via the
要するに、このシステム10においては、各テーブルに対する追加(インサート)と参照(セレクト)のみが許容されることになる。 Data generated by the
In short, in this
例えば、図2に示したポイント加算データを無効化する場合には、加算取消テーブル51に加算取消データを追加する。
この加算取消データの「取消対象」には、無効化すべきポイント加算データの加算IDが充填されているため、業務処理部30はポイント加算テーブル50に登録されたポイント加算データの中で、その加算IDが加算取消テーブル51に登録されているものについては、カウント対象外とする。 For this reason, when it becomes necessary to invalidate existing data, an equivalent state is realized by adding a new record to another table instead of deleting the record.
For example, when the point addition data shown in FIG. 2 is invalidated, the addition cancellation data is added to the addition cancellation table 51.
Since the “cancellation target” of the addition cancellation data is filled with the addition ID of the point addition data to be invalidated, the
この適用取消データの「取消対象」には、無効化すべきポイント適用データの適用IDが充填されているため、業務処理部30はポイント適用テーブル52に登録されたポイント適用データの中で、その適用IDが適用取消テーブル53に登録されているものについては、カウント対象外とする。 Similarly, application revocation data is added to the application revocation table 53 when the point application data is invalidated.
Since the application ID of the point application data to be invalidated is filled in the “cancellation target” of this application cancellation data, the
例えば、ポイント加算データのポイント数を修正する場合、当該ポイント加算データの加算IDとは異なる昇順の加算IDを新たに払い出すと共に、同じアカウントでポイント数を変更したポイント加算データを、ポイント加算テーブル50に追加する。
修正前のデータと修正後のデータには、ミリ秒精度のタイムスタンプが刻印されており、またそれぞれに昇順の異なる加算IDが付与されているため、業務処理部30は集計時に最新のデータを間違いなく特定することができる。 In addition, when the registration data needs to be corrected in this
For example, when correcting the number of points in the point addition data, a new addition ID in ascending order different from the addition ID of the point addition data is paid out, and the point addition data in which the number of points is changed in the same account Add to 50.
The data before correction and the data after correction are stamped with millisecond precision time stamps, and each is given an addition ID that is different in ascending order. Can definitely be identified.
まず、商品やサービスを購入したユーザに対してポイントを加算する処理については排他制御の必要はなく、例えば企業内の複数の社員によって当該企業のアカウントに対するポイント加算要求が同時に発生した場合に、複数のAPサーバにおいて同時並行的に処理がなされても、特に問題は生じない。
同じく、同一のアカウントに対するポイント残高照会処理に関しても、排他制御は不要といえる。
これに対し、当該アカウントに蓄積されたポイントを用いて商品を購入する場面では、蓄積ポイント数に限りがあるため、同時並行的にポイント適用の要求があった場合には、排他制御を実行する必要性がある。 However, depending on the contents of the business process, there are things that require exclusive control between AP servers.
First, there is no need for exclusive control for the process of adding points to users who have purchased goods or services. For example, if multiple employees within a company simultaneously generate points for a company account, There is no particular problem even if processing is performed in parallel on the AP server.
Similarly, it can be said that exclusive control is unnecessary for the point balance inquiry processing for the same account.
On the other hand, when a product is purchased using points accumulated in the account, the number of accumulated points is limited, so if there is a request for applying points concurrently, exclusive control is executed. There is a need.
まず、あるユーザが店頭で商品を購入し、ポイントカードを提示すると、店舗内のクライアント端末28Aからポイントカードのアカウント(カード番号)と、当該商品購入によって発生したポイント数(加算ポイント数)が、第2のAPサーバ22に送信される。 Hereinafter, according to the schematic diagram of FIG. 6 and the flowcharts of FIGS. 7 to 10, a general processing procedure when the
First, when a user purchases a product at a store and presents a point card, the point card account (card number) from the
つぎに業務処理部30は、各DB連絡部38を介して第1のDBサーバ14~第4のDBサーバ26に対してポイント加算データの追加登録を依頼する(S14)。
これを受けた第1のDBサーバ14~第4のDBサーバ26は、一斉にそれぞれのポイント加算テーブル50にポイント加算データを追加する。 Upon receiving this point addition request, the
Next, the
Upon receiving this, the
具体的には、当該アカウントに関連付けられた全ポイント加算データを何れかのDBサーバから取得し(図8のS16-01)、各ポイント加算データから加算IDを抽出する(S16-02)。
つぎに、この加算IDを任意のDBサーバに送信し、対応の加算取消データを取得する(S16-03)。
そして、加算取消データが登録されているポイント加算データを除き、残りの有効なポイント加算データのポイント数を総計することにより(S16-04)、当該ユーザの加算ポイント数を確定する。 Next, the
Specifically, all point addition data associated with the account is acquired from any DB server (S16-01 in FIG. 8), and an addition ID is extracted from each point addition data (S16-02).
Next, this addition ID is transmitted to an arbitrary DB server, and corresponding addition cancellation data is acquired (S16-03).
Then, except for the point addition data in which the addition cancellation data is registered, the number of points of the remaining valid point addition data is totaled (S16-04), thereby determining the number of addition points of the user.
つぎに、この適用IDを任意のDBサーバに送信し、対応の適用取消データを取得する(S16-07)。
そして、適用取消データが登録されているポイント適用データを除き、残りの有効なポイント適用データのポイント数を総計することにより(S16-08)、当該ユーザの適用ポイント数を確定する。 Next, all point application data associated with the account is acquired from any DB server (S16-05), and an application ID is extracted from each point application data (S16-06).
Next, this application ID is transmitted to an arbitrary DB server, and corresponding application cancellation data is acquired (S16-07).
Then, by excluding the point application data in which the application cancellation data is registered, the number of points of the remaining valid point application data is totaled (S16-08), thereby determining the application point number of the user.
このポイント残高は、クライアント端末に送信され(図7のS18)、レシートに印字される。 Next, by subtracting all valid application points from all valid addition points (S16-09), the current point balance is determined.
This point balance is transmitted to the client terminal (S18 in FIG. 7) and printed on the receipt.
このポイント適用処理は、具体的には以下の手順に従う。
まず、第1のAPサーバ14は、上記と同様の手順により、当該アカウントのポイント残高を算出する(図10のS38-01)。 The
This point application process specifically follows the following procedure.
First, the
例えば、現時点でのポイント残高が今回の適用ポイント数を上回っている場合、業務処理部30は人工キー管理部32から適用IDの発行を受けた後、ポイント適用データ(適用ID、アカウント、ポイント数、タイムスタンプ)を生成する。
そして、全DBサーバに対してポイント適用データの追加登録を依頼する(S38-03)。
これに対し、この時点でポイント残高が適用ポイント数を下回っていた場合、業務処理部30は残存ポイント数分のポイント適用データを生成し、全DBサーバに対してその追加登録を依頼する。この結果、当該アカウントのポイント残高はゼロとなる。 Next, point application data is generated within the range of this point balance (S38-02).
For example, if the current point balance exceeds the number of application points this time, the
Then, all the DB servers are requested to register additional point application data (S38-03).
On the other hand, if the point balance is less than the number of applied points at this point, the
すなわち、全購入金額についてポイントが適用できた場合には、その旨とポイント残高がクライアント端末28Bに通知される。
これに対し、購入金額の一部にのみポイントが適用された場合には、その旨と不足金額がクライアント端末28Bに通知される。この際、店頭では不足分について現金決済がなされる。 Receiving this, the
That is, when points can be applied for the total purchase amount, the
On the other hand, when the points are applied only to a part of the purchase amount, the
副担当APサーバの用意だけでは不安な場合には、副々担当AP等、より下位のAPサーバを予め設定しておけばよい。
担当AP定義テーブル54は、全てのDBサーバ内に保持されているため、何れかのDBサーバが一時的にダウンしていても、APサーバは他のDBサーバから主担当APサーバ等を特定することが可能となる。 In addition, the assigned AP definition table 54 stores the secondary assigned AP in addition to the primary assigned AP, so if the AP server designated as the primary assigned AP is down, the secondary assigned AP is immediately available. Authority can be delegated to the AP server.
If it is uneasy only to prepare the sub AP server, a lower AP server such as the sub AP can be set in advance.
The assigned AP definition table 54 is stored in all DB servers, so even if any DB server is temporarily down, the AP server identifies the main assigned AP server from other DB servers. It becomes possible.
また、担当AP定義テーブル54に、アカウント毎(またはアカウントのグループ毎)に主担当APと副担当APの特定情報(URL等)を定義しておく。 In order to effectively execute this exclusive control, in the application program for the business processing section, processing that requires exclusive control (point application processing) and unnecessary processing (point addition processing, point balance confirmation processing, etc.) are defined in advance. It is necessary to keep it.
In addition, in the assigned AP definition table 54, specific information (URL or the like) of the primary responsible AP and the secondary responsible AP is defined for each account (or for each account group).
[アプリケーションプログラム側の設定]
要排他制御処理->A処理、B処理、C処理
[担当AP定義テーブル側の設定]
A処理->主担当AP:サーバa1、副担当AP:サーバa2
B処理->主担当AP:サーバb1、副担当AP:サーバb2
C処理->主担当AP:サーバc1、副担当AP:サーバc2 For example, you must define exclusive control for multiple types of business processes in the application program as shown below, and set the primary AP server and secondary AP server for each type of business process in the assigned AP definition table. You can also.
[Application program settings]
Exclusive control required-> Process A, Process B, Process C [Settings in charge AP definition table]
Process A-> Main AP: Server a1, Sub AP: Server a2
B processing-> Main AP: Server b1, Sub AP: Server b2
C processing-> Main AP: Server c1, Sub AP: Server c2
例えば、在庫管理システムに適用する場合には、図11に示すように、入荷テーブル60と、入荷取消テーブル61と、出荷テーブル62と、出荷取消テーブル63と、担当AP定義テーブル64を各DBサーバ内に設けておく。 In the above, the point management work is illustrated, but the same exclusive control can be applied to other work processes.
For example, when applied to an inventory management system, as shown in FIG. 11, an arrival table 60, an arrival cancellation table 61, a shipping table 62, a shipping cancellation table 63, and a responsible AP definition table 64 are stored in each DB server. Keep it inside.
また、入荷取消テーブル61には、取消対象、タイムスタンプ等のデータ項目が設定されている。
出荷テーブル62には、出荷ID、商品コード、個数、タイムスタンプ等のデータ項目が設定されている。
また、出荷取消テーブル63には、取消対象、タイムスタンプ等のデータ項目が設定されている。
担当AP定義テーブル64には、担当AP定義ID、商品コード、主担当AP、副担当AP等のデータ項目が設定されている。
上記の入荷ID、出荷IDには、人工キーによるユニークな識別コードが格納される。 In the arrival table 60, data items such as an arrival ID, a product code, the number, and a time stamp are set.
Further, in the arrival cancellation table 61, data items such as a cancellation target and a time stamp are set.
In the shipping table 62, data items such as a shipping ID, a product code, the number of items, and a time stamp are set.
In the shipping cancellation table 63, data items such as a cancellation target and a time stamp are set.
In the assigned AP definition table 64, data items such as assigned AP definition ID, product code, main assigned AP, and sub-assigned AP are set.
In the above-mentioned arrival ID and shipping ID, a unique identification code using an artificial key is stored.
また、クライアント端末28から在庫数の照会リクエストを受けた場合にも、「未取消入荷数-未取消出荷数」によって算出できるため、APサーバ間の排他制御は不要である。 Here, when a product arrival request is received from the
In addition, when an inquiry request for the number of stocks is received from the
具体的には、商品の注文リクエストが発生した段階で、当該商品(商品コード)の出荷処理を担当するAPサーバに対して処理権限が委譲される。 On the other hand, when a product order (shipment) request is transmitted from the
Specifically, when a product order request is generated, the processing authority is delegated to the AP server in charge of shipping processing of the product (product code).
すなわち、主担当APサーバの業務処理部30は、注文リクエストに含まれる商品コードに係る商品の在庫を算出した上で、注文リクエストに含まれる個数が在庫の範囲内であれば対応の出荷データを生成し、全DBサーバに対して出荷テーブル62への追加登録を依頼する。その後、委託先のAPサーバから委託元のAPサーバに処理結果が通知される。
また、当該商品の在庫が注文数を下回っている場合、委託先のAPサーバは出荷データを生成することなく、在庫不足の結果を委託元のAPサーバに通知する。 Receiving this, the main AP server temporarily stores the order request in the FIFO queue, and executes the processing in order from the earliest.
That is, the
When the inventory of the product is less than the number of orders, the consignee AP server notifies the consignment AP server of the result of the shortage of inventory without generating shipping data.
また、ダウンロード形式で販売されるソフトウェアや電子書籍のように、販売対象によっては在庫数を気にする必要がないものもある。
このような場合には、同じ注文受付処理であっても対象商品毎(商品コード毎)に排他制御の要否を定義しておくことが求められる。 Even in this case, in order to effectively implement exclusive control, the application program for the
In addition, there are some products such as software and electronic books sold in download format that do not need to worry about the number of stocks depending on the sales target.
In such a case, it is required to define the necessity of exclusive control for each target product (for each product code) even in the same order receiving process.
データ制御部34は、全てのDB連絡部38から受取完了通知が返ってきた時点で、業務処理部30に対して登録完了通知を出力する。 The reception completion notification transmitted from the DB server is collected in the
The data control
逆に言えば、登録完了通知が返ってくるまでの間、業務処理部30は当該データを読み込みの対象外とすることで、各DBサーバにおける登録のタイミングがずれて不正なデータが読み込まれてしまう危険性を回避している。 The
In other words, until the registration completion notification is returned, the
具体的には、当該DBサーバを一時的にシステム10から切り離し、残りのDBサーバのみに基づく運用形態に移行する。
すなわち、切り離されたDBサーバ以外の全DBサーバから受取完了通知が届いていた場合、データ制御部34から業務処理部30に対して登録完了通知が出力され、登録データが読み取りの対象となる。 However, if a receipt completion notification is not returned after a certain period of time from any DB server, the
Specifically, the DB server is temporarily disconnected from the
That is, when a reception completion notification has been received from all DB servers other than the separated DB server, a registration completion notification is output from the
以後、データ制御部34は、当該DBサーバを担当しているDB連絡部38を介して、データの送受信を再開する。 When the stored data catches up to the latest state, the DB server is set to the read / write mode (a state in which data writing and reference is permitted) and reconnected to the
Thereafter, the
すなわち、データの削除や更新が許容されることを前提とした場合、データを復旧させるためにはDBサーバが保持している更新履歴情報に基づき、一定の時点からデータの追加や削除、更新を順番に再現する必要があり、これに長い時間と大きな負荷を要することになる。また、更新ログを確実に保存する仕組みをDBサーバ側に設ける必要がある。 In the case of this
In other words, if it is assumed that deletion or update of data is allowed, in order to recover data, addition, deletion, or update of data is started from a certain point based on the update history information held by the DB server. It must be reproduced in order, and this takes a long time and a large load. In addition, it is necessary to provide a mechanism on the DB server side to securely save the update log.
これに対し、このシステム10の場合には、あるDBサーバでデータの欠損が発生しても、単純に隣接するDBサーバから不足データをコピーするだけで追い着くことができるため、データがハードディスク等に格納されるまで待機する必要がない。 Conventionally, memory is a volatile storage means, and data is lost when power supply is stopped, so when data is stored in a nonvolatile storage means (hard disk, etc.) A notification should be returned.
On the other hand, in the case of this
この結果、APサーバとDBサーバ間の電文のやり取りが激減し、全体的な処理速度を向上させることができる。 In addition, since data recovery is easy in this way, when storing the same data in multiple DB servers, it is not required to go through the troublesome procedure of two-phase commit as in the past, and for each DB server Thus, it is possible to simply request registration and enable reading when each of the reception completion notifications is returned (so-called autocommitment).
As a result, the exchange of messages between the AP server and the DB server is drastically reduced, and the overall processing speed can be improved.
すなわち、一つのデータセンター内に複数のAPサーバと複数のDBサーバを設置し、各APサーバと全DBサーバ間をネットワークで接続した環境において、排他制御を要しない業務処理については各APサーバが独自に並列処理すると共に、排他制御を要する業務処理については予め設定されたAPサーバに処理権限を集約させる場合にも有効に適用できる。 In the above, an example in which a plurality of AP servers and DB servers are arranged in a plurality of data centers has been described, but the present invention is not limited to this.
In other words, in an environment where multiple AP servers and multiple DB servers are installed in a single data center, and each AP server and all DB servers are connected via a network, each AP server handles business processes that do not require exclusive control. In addition to independent parallel processing, business processing that requires exclusive control can also be effectively applied to consolidating processing authority to a preset AP server.
12 第1のデータセンター
14 第1のAPサーバ
16 第1のDBサーバ
18 第2のDBサーバ
20 第2のデータセンター
22 第2のAPサーバ
24 第3のDBサーバ
26 第4のDBサーバ
27 通信ネットワーク
28 クライアント端末
29 通信回線
30 業務処理部
32 人工キー管理部
34 データ制御部
38 DB連絡部
50 ポイント加算テーブル
51 加算取消テーブル
52 ポイント適用テーブル
53 適用取消テーブル
54 担当AP定義テーブル
56 人工キー管理テーブル
57 人工キーの下一桁管理テーブル
58 APサーバ管理テーブル
59 データセンター管理テーブル
60 入荷テーブル
61 入荷取消テーブル
62 出荷テーブル
63 出荷取消テーブル
64 担当AP定義テーブル 10 Data processing system
12 First data center
14 First AP server
16 First DB server
18 Second DB server
20 Second data center
22 Second AP server
24 Third DB server
26 Fourth DB server
27 Communication network
28 Client terminal
29 Communication line
30 Business processing department
32 Artificial Key Management Department
34 Data control unit
38 DB Liaison Department
50 point addition table
51 Addition cancellation table
52 point application table
53 Undo table
54 Assigned AP definition table
56 Artificial key management table
57 Lower digit management table for artificial key
58 AP server management table
59 Data center management table
60 Arrival table
61 Receipt cancellation table
62 Shipping table
63 Shipping cancellation table
64 Assigned AP definition table
Claims (4)
- 複数のAPサーバと、複数のDBサーバを備えたデータ処理システムであって、
上記の各DBサーバは、相互に共通する業務データを格納するテーブルをそれぞれ備える共に、各テーブルにはレコードの参照及び追加のみが許容され、削除及び更新が禁止される制約が設けられており、
上記の各APサーバは、それぞれ上記の各DBサーバと接続されており、クライアント端末から送信されたリクエストに対して共通の業務処理を実行する機能と、処理の結果生じた業務データを上記の各DBサーバに送信し、対応のテーブルへの追加登録を依頼する機能を備え、
上記の各業務データには、これを生成したAPサーバを特定するための識別符号を含むユニークなIDが割り振られており、
さらに、上記の各DBサーバには、排他制御が求められる特定の業務処理を担当するAPサーバを業務処理毎に定義しておく担当AP定義テーブルが格納されており、
上記の各APサーバは、上記クライアント端末から送信された業務処理のリクエストが、排他制御を要するものでない場合には自ら実行するのに対し、排他制御を要するものである場合には上記担当AP定義テーブルを参照し、当該業務処理を担当すべきAPサーバを特定した後、当該担当APサーバに該当の処理を委譲し、
これを受けた担当APサーバは、委譲された業務処理を一旦キューに格納した後、キュー内の各業務処理をFIFOのルールに従って順に実行することを特徴とするデータ処理システム。 A data processing system comprising a plurality of AP servers and a plurality of DB servers,
Each of the above DB servers has a table storing business data common to each other, and each table is provided with a restriction that only allows reference and addition of records, and prohibits deletion and update.
Each of the above AP servers is connected to each of the above DB servers, and functions for executing common business processing for requests sent from client terminals, and business data generated as a result of the processing. It has the function to send to the DB server and request additional registration to the corresponding table,
Each business data above is assigned a unique ID including an identification code to identify the AP server that generated it.
In addition, each DB server above stores a responsible AP definition table that defines for each business process the AP server that is responsible for specific business processes that require exclusive control.
Each AP server above executes itself when a business process request sent from the client terminal does not require exclusive control. After referring to the table and identifying the AP server that should be in charge of the business process, delegate the corresponding process to the AP server in charge,
Upon receiving this, the AP server in charge stores the delegated business process once in the queue, and then executes each business process in the queue in order according to the FIFO rules. - 上記担当AP定義テーブルには、主担当APサーバの他に、当該主担当APサーバが機能しない場合に処理を担当すべき副担当APサーバが業務処理毎に定義されていることを特徴とする請求項1に記載のデータ処理システム。 In the above-mentioned responsible AP definition table, in addition to the primary responsible AP server, a secondary responsible AP server that should be in charge of processing when the primary responsible AP server does not function is defined for each business process. Item 4. The data processing system according to Item 1.
- 上記の業務データには、それぞれ業務処理実行時のタイムスタンプが刻印されており、
上記APサーバは、既存の業務データを更新する必要がある場合に、当該業務データと異なる昇順のID、修正後のデータ及び修正時のタイムスタンプを備えた業務データを新たに生成すると共に、
この更新用の業務データを各DBサーバに設けられた該当のテーブルに追加登録させることにより、既存の業務データを実質的に更新することを特徴とする請求項1または2に記載のデータ管理システム。 Each of the above business data is stamped with a time stamp at the time of business processing execution.
When it is necessary to update the existing business data, the AP server newly generates business data having an ascending ID different from the business data, data after correction, and time stamp at the time of correction,
3. The data management system according to claim 1, wherein the existing business data is substantially updated by additionally registering the business data for update in a corresponding table provided in each DB server. . - 上記APサーバは、既存の業務データを削除する必要がある場合に、取消対象として当該業務データのIDを格納するデータ項目を備えたデータ取消用の業務データを生成すると共に、
このデータ取消用の業務データを各DBサーバに設けられた取消専用のテーブルに追加登録させることにより、既存の業務データを実質的に削除することを特徴とする請求項1~3の何れかに記載のデータ処理システム。 The AP server generates business data for data cancellation with a data item that stores the ID of the business data as a cancellation target when it is necessary to delete existing business data,
4. The existing business data is substantially deleted by additionally registering the business data for data cancellation in a table dedicated to cancellation provided in each DB server. The data processing system described.
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2015/059905 WO2016157358A1 (en) | 2015-03-30 | 2015-03-30 | Data processing system |
JP2017508882A JP6475820B2 (en) | 2015-03-30 | 2015-03-30 | Data processing system |
SG11201707971YA SG11201707971YA (en) | 2015-03-30 | 2015-03-30 | Data processing system |
RU2017134687A RU2686028C2 (en) | 2015-03-30 | 2015-03-30 | Data processing system |
PH12017501685A PH12017501685A1 (en) | 2015-03-30 | 2017-09-14 | Data processing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2015/059905 WO2016157358A1 (en) | 2015-03-30 | 2015-03-30 | Data processing system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016157358A1 true WO2016157358A1 (en) | 2016-10-06 |
Family
ID=57005853
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2015/059905 WO2016157358A1 (en) | 2015-03-30 | 2015-03-30 | Data processing system |
Country Status (5)
Country | Link |
---|---|
JP (1) | JP6475820B2 (en) |
PH (1) | PH12017501685A1 (en) |
RU (1) | RU2686028C2 (en) |
SG (1) | SG11201707971YA (en) |
WO (1) | WO2016157358A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019212109A (en) * | 2018-06-06 | 2019-12-12 | 株式会社インテック | Data processing equipment, data processing method and program |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11219309A (en) * | 1997-09-29 | 1999-08-10 | Ricoh Co Ltd | Consistency management method in distributed data base system and computer readable medium for recording program for computer to execute each process of the method |
JP2002202904A (en) * | 2000-10-31 | 2002-07-19 | Toshiba Corp | Data management method and recording medium readable by computer |
JP2002297428A (en) * | 2001-03-29 | 2002-10-11 | Toshiba Corp | Distributed data management system, distributed data management method and distributed data management program |
JP2013235328A (en) * | 2012-05-07 | 2013-11-21 | Nomura Research Institute Ltd | Data management system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6583716B2 (en) * | 2001-08-15 | 2003-06-24 | Motorola, Inc. | System and method for providing location-relevant services using stored location information |
US7370064B2 (en) * | 2002-08-06 | 2008-05-06 | Yousefi Zadeh Homayoun | Database remote replication for back-end tier of multi-tier computer systems |
US7668870B1 (en) * | 2004-04-15 | 2010-02-23 | Citicorp Development Center, Inc. | Methods and systems for updating web pages via a web data instant update utility |
JP5878232B2 (en) * | 2012-03-13 | 2016-03-08 | 株式会社野村総合研究所 | Data processing system |
JP5604478B2 (en) * | 2012-07-10 | 2014-10-08 | 株式会社野村総合研究所 | Data utilization system |
-
2015
- 2015-03-30 JP JP2017508882A patent/JP6475820B2/en active Active
- 2015-03-30 WO PCT/JP2015/059905 patent/WO2016157358A1/en active Application Filing
- 2015-03-30 RU RU2017134687A patent/RU2686028C2/en active
- 2015-03-30 SG SG11201707971YA patent/SG11201707971YA/en unknown
-
2017
- 2017-09-14 PH PH12017501685A patent/PH12017501685A1/en unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11219309A (en) * | 1997-09-29 | 1999-08-10 | Ricoh Co Ltd | Consistency management method in distributed data base system and computer readable medium for recording program for computer to execute each process of the method |
JP2002202904A (en) * | 2000-10-31 | 2002-07-19 | Toshiba Corp | Data management method and recording medium readable by computer |
JP2002297428A (en) * | 2001-03-29 | 2002-10-11 | Toshiba Corp | Distributed data management system, distributed data management method and distributed data management program |
JP2013235328A (en) * | 2012-05-07 | 2013-11-21 | Nomura Research Institute Ltd | Data management system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019212109A (en) * | 2018-06-06 | 2019-12-12 | 株式会社インテック | Data processing equipment, data processing method and program |
Also Published As
Publication number | Publication date |
---|---|
RU2017134687A (en) | 2019-04-05 |
RU2686028C2 (en) | 2019-04-23 |
SG11201707971YA (en) | 2017-10-30 |
PH12017501685A1 (en) | 2018-03-19 |
JP6475820B2 (en) | 2019-02-27 |
RU2017134687A3 (en) | 2019-04-05 |
JPWO2016157358A1 (en) | 2018-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100536417C (en) | Grid licensing server and fault tolerant grid system and method of use | |
US11768885B2 (en) | Systems and methods for managing transactional operation | |
US7603354B2 (en) | Method for enhancing the operation of a database | |
US11669573B2 (en) | Data management system | |
US8830831B1 (en) | Architecture for balancing workload | |
US11169984B2 (en) | Data management system | |
JP6475820B2 (en) | Data processing system | |
JP2015165357A (en) | data management system | |
JP4406310B2 (en) | MQ data synchronization system and MQ data synchronization program | |
JP6530337B2 (en) | Transaction control system and transaction control method | |
CN109976944B (en) | Data processing method and system, storage medium and electronic device | |
WO2017077643A1 (en) | Data management system | |
JP6172294B2 (en) | Transaction distributed processing apparatus, method, system, and storage medium | |
WO2015133271A1 (en) | Data management system, service provision system, and method for expanding functionality thereof | |
JP6359762B2 (en) | Account data management system | |
JP7368531B2 (en) | Room inventory management system based on blockchain | |
US11762643B2 (en) | System using blockchain | |
JP6325494B2 (en) | Data distribution management system and its operation method | |
US20130282667A1 (en) | Method and system for implementing a conditional redo repeater | |
Song | Redesign Tactilon Agnet database in distributed environment | |
JPWO2016157359A6 (en) | Account data management system | |
KR20080017156A (en) | System and method for management of the it infra | |
WO2017081737A1 (en) | Data management system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15887511 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 12017501685 Country of ref document: PH |
|
ENP | Entry into the national phase |
Ref document number: 2017508882 Country of ref document: JP Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 11201707971Y Country of ref document: SG |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2017134687 Country of ref document: RU |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15887511 Country of ref document: EP Kind code of ref document: A1 |