Information processing apparatus and system including the same

The information processing device extracts events from database updates to facilitate microservice construction on legacy systems, addressing the challenge of modifying running applications and reducing development efforts.

JP2026023732APending Publication Date: 2026-02-13HITACHI LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024125878
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing systems using CQRS and event sourcing pattern face challenges in extracting events without stopping the running business applications, necessitating a method to extract event-equivalent content without modifying the legacy system.

Method used

An information processing device that acquires database update messages, generates events based on these messages, and outputs them to downstream systems, facilitating the construction of microservices without altering the legacy system.

Benefits of technology

Enables the construction of microservices similar to those using the event sourcing pattern on legacy systems without direct application modification, reducing development time and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026023732000001_ABST
    Figure 2026023732000001_ABST
Patent Text Reader

Abstract

To provide a technology for extracting contents equivalent to an event from an updated DB (database).SOLUTION: The information processing apparatus includes a processor. The processor acquires a message in which an update content of a database updated by an external operation is recorded. Then, the processor generates an event that is data related to content of an operation performed on the database on the basis of content of the message.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an information processing device and a system including the information processing device. [Background technology]

[0002] With the advancement of information technology and networking, there are many systems with databases in the world. Some of these systems cannot be easily shut down due to the importance of their contents, which means that the renewal and expansion of these systems is hindered.

[0003] One method for solving these issues is CQRS (Command and Query Responsibility Segregation).With CQRS, for example, by deploying multiple microservices in a way that shares and deploys database information that provides existing services across multiple different databases, it is possible to improve the performance of existing services and expand into new services without stopping the existing services.

[0004] Additionally, combining it with the event sourcing pattern has been proposed as one way of operating a system that uses CQRS. With the event sourcing pattern, a method of building CQRS involves capturing the confirmed processing content as an event when a query to write to an existing database is issued, and instead of updating the database, the update content is created by replaying the original business operations, thereby building a database for each microservice. This method has the advantage that developers, who can easily imagine actual business operations, find it easier to intuitively grasp the update content than database operations, and makes it easier to build databases for microservices with different purposes. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Japanese Patent Application Publication No. 2022-58578 [Patent Document 2] Japanese Patent Publication No. 2020-48102 Summary of the Invention [Problem to be solved by the invention]

[0006] Using CQRS and the event sourcing pattern together is an excellent method, but it is not easy to make improvements to extract events without stopping the system that is currently running the business. Therefore, there is a need for a method to extract event-equivalent content from an updated DB (database) without making changes to existing business applications. [Means for solving the problem]

[0007] According to the present invention, as one example, the following information processing device is provided. The information processing device includes a processor. The processor acquires a message recording update details of a database updated by an external operation. The processor generates an event, which is data related to the operation details performed on the database, based on the content of the message. Also provided may be a system including this information processing device and a computer device including a database updated by an external operation, and a system including this information processing device and a computer device including a database to which the events generated by this information processing device are output. Also provided may be a system including this information processing device and a computer device including a database updated by an external operation and a database to which the events generated by this information processing device are output. [Effects of the Invention]

[0008] By using the information processing device of the present invention, it is possible to obtain the effect of extracting events that facilitate the construction of microservices similar to those when applying the event sourcing pattern to a legacy system, without directly modifying the application of the legacy system. Note that problems, configurations, and effects other than those described above will become clear from the description of the following embodiments of the invention. [Brief explanation of the drawings]

[0009] [Figure 1] FIG. 1 is a diagram illustrating an example of the overall configuration of a CQRS system using a message-event conversion device. [Figure 2] FIG. 1 illustrates an example of the configuration of a message-event conversion device. [Figure 3] FIG. 10 is a diagram illustrating an example of a table configuration included in a message conversion unit. [Figure 4] FIG. 10 is a diagram illustrating an example of the configuration of a message storage table. [Figure 5] FIG. 10 is a diagram illustrating an example of the configuration of an event determination table. [Figure 6] FIG. 10 is a diagram illustrating an example of an event determination flow in the message-event conversion device. [Figure 7] FIG. 10 is a diagram illustrating an example of an event table included in the event generating unit. [Figure 8] FIG. 2 illustrates an example of a hardware configuration of a message-event conversion device. [Figure 9A] FIG. 1 illustrates an example of a configuration including a message-event conversion device. [Figure 9B] FIG. 1 illustrates an example of a configuration including a message-event conversion device. [Figure 9C] FIG. 1 illustrates an example of a configuration including a message-event conversion device. [Figure 9D] FIG. 1 illustrates an example of a configuration including a message-event conversion device. [Figure 9E] FIG. 1 illustrates an example of a configuration including a message-event conversion device. [Figure 9F]FIG. 1 illustrates an example of a configuration including a message-event conversion device. [Figure 9G] FIG. 1 illustrates an example of a configuration including a message-event conversion device. DETAILED DESCRIPTION OF THE INVENTION

[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The embodiment is an example for explaining the present invention, and for clarity of explanation, appropriate omissions and simplifications have been made. The present invention can be implemented in various other forms. Unless otherwise specified, each component may be singular or plural. In order to facilitate understanding of the invention, the position, size, shape, range, etc. of each component shown in the drawings may not represent the actual position, size, shape, range, etc. Therefore, the present invention is not necessarily limited to the position, size, shape, range, etc. disclosed in the drawings. Examples of various types of information may be described using expressions such as "table," "list," and "queue," but the various types of information may also be expressed using data structures other than these. For example, various types of information such as "XX table," "XX list," and "XX queue" may also be expressed as "XX information." When describing identification information, expressions such as "identification information," "identifier," "name," "ID," and "number" are used, but these are interchangeable. When there are multiple components with the same or similar functions, they may be described using the same reference numeral with different subscripts. When there is no need to distinguish between these multiple components, the subscripts may be omitted. In the embodiments, processing performed by executing a program may be described. Here, a computer executes the program using a processor (e.g., a CPU or a GPU) and performs processing defined by the program using storage resources (e.g., a memory) and interface devices (e.g., a communication port). Therefore, the entity performing the processing by executing the program may be the processor. Similarly, the entity performing the processing by executing the program may be a controller, device, system, computer, or node having a processor. The entity performing the processing by executing the program may be any computing unit, and may include a dedicated circuit that performs specific processing. Here, the dedicated circuit may be, for example, an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or a CPLD (Complex Programmable Logic Device). A program may be installed on a computer from a program source. The program source may be, for example, a program distribution server or a computer-readable storage medium. When the program source is a program distribution server, the program distribution server may include a processor and storage resources for storing the program to be distributed, and the processor of the program distribution server may distribute the program to be distributed to other computers. In addition, in an embodiment, two or more programs may be realized as one program, or one program may be realized as two or more programs.

[0011] An embodiment of the present invention is described below. The message-event conversion device in this embodiment is targeted at the fields of modernizing legacy systems and implementing microservices. In this configuration, event conversion is performed on messages that collect update information from a database that operates based on CRUD / CQRS using CDC (Change Data Capture), thereby achieving the effect of facilitating the construction of materialized views in a downstream application (Projection Handler) that receives the messages. Note that CRUD stands for Create, Read, Update, and Delete.

[0012] An example of the overall configuration of this embodiment is shown in Fig. 1. As an example, the message-event conversion device 1 (information processing device) is used in a configuration (system) made up of a write DB 3 that accesses Application 2, a CDC 4 that has the function of monitoring the update contents of the write DB 3 and sending the update contents as messages, a Projection Handler 5 that receives events sent by the message-event conversion device 1, a read DB 6 in which Projection Handler 5 interprets the events and performs updates, and an Application 7 that cooperates with Application 2 or provides a different service based on the contents of the read DB 6.

[0013] Here, Application 2, CDC 4, Projection Handler 5, and Application 7 can be implemented by, for example, a program executed by a processor. Furthermore, a database may be referred to as DB.

[0014] In this configuration, messages are messages in formats such as JSON or Apache Avro that contain before-and-after information based on the updates made to DB3, which were updated based on operations in Application2. These messages contain information for each DB table individually, and are data extracted by CDC4 for each updated entry or column. In this way, CRUD / CQRS only obtains the updates made based on Create, Update, and Delete operations on the DB and sends them in the form of messages.

[0015] On the other hand, an event in this configuration is data that extracts or infers the contents of some operation performed on the write DB 3 by Application 2. A single update operation of an application may result in multiple updates to the write DB 3, and in the case of a relational DB, this may span multiple tables. The message-event conversion device 1 has the function of aggregating these multiple update contents, extracting or inferring the operation of the original event, and sending it as an event.

[0016] On the other hand, in some cases, the results of multiple operations related to application updates are sent together in a single update. In such cases, the message-event conversion device 1 has the function of breaking down multiple events listed in a single column and understanding them individually.

[0017] An example of the configuration of the message-event conversion device 1 in this embodiment is shown in Fig. 2. This message-event conversion device 1 includes a message receiving unit 11, a message conversion unit 12, a message storage table 13, an event determination table 14, an event generation unit 15, and a retention time monitoring unit 16.

[0018] The message receiving unit 11 has a function of connecting to one or more CDCs 4 and receiving messages by polling each topic. Upon receiving a message, the message receiving unit 11 passes the acquired message to the message conversion unit 12.

[0019] 3 shows the table configuration of the message converter 12. The message converter 12 receives a message from the message receiver 11 via input (port 1200), and uses a distribution function 1201 to distribute the message to a determination queue 1202 based on the sender's write DB3. If the message contains content that matches predetermined conditions, information, etc., one or more determination queues (in this example, determination queues 1202-1, 1202-2, and 1202-3) send a notification of the content to a storage table write function 1203. The storage table write function 1203 passes the content of the message to the message storage table 13 via port 1204, and also passes a notification of the arrival of the message to the event generator 15 via port 1205.

[0020] An example of the structure of the message storage table 13 is shown in Figure 4. There may be one or more message storage tables 13, and based on a notification that a message matching the conditions and information sent from the message conversion unit 12 has been found, the corresponding table area is searched, and a determination is made based on the judgment ID as to whether a matching entry already exists. If a matching entry exists, new conditions, information, etc. are added by appending them to the row of that entry. If no existing entry with a judgment ID matching the conditions exists, a new entry is added based on the message content.

[0021] For example, when a message is received that matches judgment id1 and condition 2, if the result of searching the judgment id row shows that id1 already exists in entry number 1, the contents of the received message will be written in the condition 2 row of entry number 1, and at the same time the entry time indicating the time the message was received will be set.

[0022] When a message matching judgment ID2 and condition 1 and information 1 is received, if the row for judgment ID is searched and an entry for ID2 does not exist, a new entry number is added to the table, and the content of the message and the entry time are written in the row for judgment ID2, condition 1, and information 1.

[0023] As another configuration example, there is a case where multiple message storage tables 13 are used. This means that the conditions and information items to be input are individually separated in the multiple message storage tables 13, and searches, event determinations, etc. are performed individually in the multiple message storage tables 13.

[0024] When a new entry is written to the message storage table 13, the corresponding entry unit, that is, one column of information held in the table, is transferred to the event determination table 14.

[0025] An example of the configuration of the event determination table 14 is shown in Figure 5. The event determination table 14 has rows for individual event names and conditions required to determine the events. That is, in the event determination table 14, events are defined by conditional expressions consisting of conditions. When information on a column-by-column basis is received from the message storage table 13, a determination is made on an event-by-event basis to see if a matching event exists.

[0026] An example of the event determination flow is shown in Figure 6. When the event determination flow starts (S1501), the message-event converter 1 waits for the reception of a message (S1502). When the message-event converter 1 receives a message, it enters the message into the message storage table 13 via the message converter 12 (S1503). The event determination table 14 is notified that an entry has been added, and the message-event converter 1 performs event determination using a conditional expression using the event determination table 14 (S1504).

[0027] The message-event conversion device 1 uses the event determination table 14 to determine whether an event can be uniquely determined by the conditional expression (S1505), and if the result is Yes and the event has been uniquely determined, notifies the event generation unit 15. The event generation unit 15 then generates an event (S1506), and the message-event conversion device 1 ends the process by transmitting the event to an external Projection Handler or the like (S1507).

[0028] On the other hand, if the determination result in S1505 is No, the retention time is determined (S1508). Once the retention time is determined, the message-event conversion device 1 compares the entry time and retention time in the corresponding entry in the message storage table 13 with the current time, and determines whether the elapsed time from the entry time to the current time is within the retention time (S1509).

[0029] If the determination result is Yes and the message is within the retention time, the message-event converter 1 then determines whether a new message has been received (S1510). If the determination result is No, the message-event converter 1 returns to the determination of whether the message is within the retention time (S1509) and continues polling until a message arrives. If a message related to the entry has arrived, the message-event converter 1 returns to S1502 and makes another determination based on the message reception.

[0030] If the retention time has elapsed, the message-event conversion device 1 determines whether there is an event that completely matches the conditions that exist at that stage (S1511), and if the result is Yes, it sends a notification of the matching event to the event generation unit 15, and the event is created (S1506). On the other hand, if there is no data that completely matches the event, it determines that the process has ended abnormally (S1512). In this case, it is expected that measures will be taken, such as leaving a log or raising an alert.

[0031] The details of the procedure for event determination using a conditional expression (S1504) are described below. If there are multiple results that meet at least some of the conditions required for event determination, the event determination is suspended. That is, if the received entry matches only condition 1, three possibilities remain: events A, C, and D in the example of FIG. 5, and it is not possible to determine which one it is. In this case, the message-event converter 1 compares the retention times of the three and returns the retention time of event D, which has the largest value (8 in this example), to the message storage table 13. The message-event converter 1 then records this value (8, the retention time of event D in this example) in the retention time field in the message storage table 13.

[0032] 5, for example, when an entry that satisfies conditions 1, 2, and 5 arrives, the event is uniquely determined to be event C. At this time, message-event conversion device 1 passes the determination result that the event is event C in event determination table 14 and the entry number to event generation unit 15.

[0033] The event generation unit 15, which has received the determined event content, searches for the information necessary to create the event based on the event table 151 it holds, as shown in Figure 7, and obtains the relevant information from the same entry in the message storage table 13 where the event was determined. At this time, the information for configuring the event may be obtained from both the conditions and information in the message storage table 13. Furthermore, the elements that make up an event and the number of elements may differ for each event. The event generation unit 15 sends the generated event to the Projection Handler 5, and at the same time notifies the retention time monitoring unit 16 that the event has been generated.

[0034] The message-event converter 1 uses the retention time monitor 16 to determine whether the current time is within the retention time indicated in S1509 of the flowchart in Figure 6. The message-event converter 1 also periodically determines whether a timeout has occurred for each entry. Upon receiving a notification of event generation from the event generator 15, the message-event converter 1 deletes the entry while recording the entry time of the entry in the message storage table 13 and the current time when the event was generated using the retention time monitor 16. The retention time monitor 16 also has the function of recording log information on the time taken from the entry time to event generation, and providing feedback to set an appropriate retention time based on a comparison with the retention time.

[0035] Here, by using the event determination table 14 that stores the conditional expressions that define the event, it is possible to easily identify the event corresponding to the message. Furthermore, by using the retention time, unnecessary increase in data volume (for example, unnecessary increase in table size) is suppressed. Note that the retention time may be set in association with each event, and data processing may be performed. Here, the retention time may be set by the user, thereby allowing the retention time to be set based on the user's intention. Furthermore, the retention time may be updated based on information regarding the generation time of the event (for example, the above-mentioned log information), thereby allowing, for example, an appropriate retention time to be set.

[0036] Next, an example of the hardware configuration of the message-event conversion device 1 will be described with reference to Fig. 8. As shown in Fig. 8, the message-event conversion device 1 includes, for example, a processor 201, a memory 202, a storage 203, and an interface device 204.

[0037] The processor 201 is a main body that executes predetermined processing, and is, for example, a CPU (Central Processing Unit). However, other semiconductor devices may be used as long as they are capable of executing the predetermined processing.

[0038] The memory 202 is a main storage device that temporarily stores data, and the processor 201 stores data such as programs used in processing in the memory 202 and executes predetermined processing. The storage 203 is an auxiliary storage device that stores data such as programs in a non-volatile manner, and is capable of storing data such as programs. Here, in the message-event conversion device 1, the message receiving unit 11, the message conversion unit 12, the event generation unit 15, and the retention time monitoring unit 16 are realized by the processor 201 reading predetermined programs into the memory 202 and performing data processing. The message storage table 13 and the event determination table 14 may be stored in the storage 203, for example. The interface device 204 is a device that inputs and outputs data.

[0039] For example, as shown in FIG. 9A, the write DB 3, CDC 4, Projection Handler 5, and read DB 6 may be implemented by a message-event conversion device, and a configuration including a message-event conversion device 1A may be provided.

[0040] Also, for example, CDC 4 may be implemented by a message-event conversion device. Then, write DB 3, Projection Handler 5, and read DB 6 may be implemented by one or more computer devices. Thus, a system 301B may be provided (FIG. 9B) that includes a message-event conversion device 1B in which CDC 4 is implemented, and one or more computer devices 251B in which write DB 3, Projection Handler 5, and read DB 6 are implemented.

[0041] Also, for example, the write DB 3 and the CDC 4 may be implemented by a message-event conversion device, and the Projection Handler 5 and the read DB 6 may be implemented by one or more computers. Thus, a system 301C may be provided (FIG. 9C) that includes a message-event conversion device 1C in which the write DB 3 and the CDC 4 are implemented, and one or more computers 251C in which the Projection Handler 5 and the read DB 6 are implemented.

[0042] Also, for example, Projection Handler 5 may be implemented by a message-event conversion device. Then, write DB 3, CDC 4, and read DB 6 may be implemented by one or more computer devices. Thus, a system 301D may be provided (FIG. 9D) that includes a message-event conversion device 1D in which Projection Handler 5 is implemented, and one or more computer devices 251D in which write DB 3, CDC 4, and read DB 6 are implemented.

[0043] Also, for example, Projection Handler 5 and Read DB 6 may be implemented by a message-event conversion device, and Write DB 3 and CDC 4 may be implemented by one or more computer devices. Thus, a system 301E may be provided (FIG. 9E) that includes a message-event conversion device 1E in which Projection Handler 5 and Read DB 6 are implemented, and one or more computer devices 251E in which Write DB 3 and CDC 4 are implemented.

[0044] Also, for example, CDC 4 and Projection Handler 5 may be implemented by a message-event conversion device. And, write DB 3 and read DB 6 may be implemented by one or more computer devices. Thus, a system 301F may be provided (FIG. 9F) that includes a message-event conversion device 1F in which CDC 4 and Projection Handler 5 are implemented, and one or more computer devices 251F in which write DB 3 and read DB 6 are implemented.

[0045] Also, for example, the write DB 3, the CDC 4, the Projection Handler 5, and the read DB 6 may be implemented by one or more computer devices 251G. Thus, a system 301G may be provided that includes the message-event conversion device 1 and one or more computer devices 251G in which the write DB 3, the CDC 4, the Projection Handler 5, and the read DB 6 are implemented (FIG. 9G).

[0046] Here, the computer devices (251B to 251G) are appropriately configured using hardware such as a processor, memory, storage, and interface device, and the message-event conversion device and the computer device may be configured to enable input and output of data via communication. Furthermore, the message-event conversion devices (1A to 1G), which are examples of information processing devices, are appropriately configured using hardware such as a processor, memory, storage, and interface device, similar to the message-event conversion device 1.

[0047] Application 2 may be implemented by a user terminal of Application 2, and Application 7 may be implemented by a user terminal of Application 7. A system including the user terminals may also be provided.

[0048] According to this embodiment, by implementing event conversion, it is possible to obtain the effect of facilitating the construction of a materialized view in the downstream application (Projection Handler) that receives the message. Event conversion leads to, for example, a reduction in development man-hours and time, and is advantageous from an economic perspective.

[0049] For example, when implementing CQRS using a legacy system database, there is a problem that the development man-hours required for analyzing the database to develop microservices are large. However, by applying the technology described in this embodiment, it is possible to reduce the development man-hours.

[0050] Although the embodiments have been described above, the present invention is not limited to the above-described embodiments and includes various modifications and equivalent configurations within the spirit of the appended claims. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and the present invention is not necessarily limited to those including all of the described configurations. Furthermore, for example, other configurations may be added, deleted, or replaced with part of the configuration of the embodiment.

[0051] The message-event conversion device according to the present invention can be applied to, for example, expansion and update techniques for commercial and business systems that use DBs (databases). [Explanation of symbols]

[0052] 1 Message-event converter 2. 7 Application 3 Writing DB 4. CDC 5. Projection Handler 6 Read DB 11 Message receiving section 12 Message conversion section 13 Message storage table 14 Event Judgment Table 15 Event Generation Unit 16 Retention time monitoring section 151 Event Table 1200 port 1201 Distribution function 1202 Judgment Queue 1203 Storage table write function Port 1204 Port 1205

Claims

1. a processor; The processor: Retrieves messages recording the database updates made by external operations, generating an event, which is data relating to the operation performed on the database, based on the content of the message; 1. An information processing device comprising:

2. 2. The information processing device according to claim 1, The processor: identifying an event corresponding to the message based on a condition extracted from the message using data storing a conditional expression that defines the event; 1. An information processing device comprising:

3. 3. The information processing device according to claim 2, The processor: if an event corresponding to the message cannot be uniquely identified, determining a retention time for the message; If the event corresponding to the message cannot be determined within the retention time, the process is terminated without generating an event related to the message.

1. An information processing device comprising:

4. 4. The information processing device according to claim 3, The retention time is The event information is set in association with each event in the data, The processor: determining the longest retention time among the events including the condition extracted from the message as the retention time for the message; 1. An information processing device comprising:

5. 5. The information processing device according to claim 4, The retention time associated with each event in the data is user-configurable.

1. An information processing device comprising:

6. 5. The information processing device according to claim 4, The processor: updating the retention time associated with the event based on information about the generation time of the event; 1. An information processing device comprising:

7. 6. The information processing device according to claim 5, The processor: updating the retention time associated with the event based on information about the generation time of the event; 1. An information processing device comprising:

8. The information processing device according to claim 1 ; a computer device including the database that is updated by an external operation; A system comprising:

9. The information processing device according to claim 1 ; a computer device including a database to which events generated by the information processing device are output; A system comprising:

10. The information processing device according to claim 1 ; a computer device including the database that is updated by an external operation and a database to which events generated by the information processing device are output; A system comprising:

Citation Information

Patent Citations

  • Network service system, event log recording device, event log management method, and program

    JP2020048102A

  • Data serialization in distributed event processing systems

    JP2022058578A