JP7196262B1 - Service provision system and service provision method - Google Patents

Service provision system and service provision method Download PDF

Info

Publication number
JP7196262B1
JP7196262B1 JP2021173957A JP2021173957A JP7196262B1 JP 7196262 B1 JP7196262 B1 JP 7196262B1 JP 2021173957 A JP2021173957 A JP 2021173957A JP 2021173957 A JP2021173957 A JP 2021173957A JP 7196262 B1 JP7196262 B1 JP 7196262B1
Authority
JP
Japan
Prior art keywords
processing
server
service
transaction
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021173957A
Other languages
Japanese (ja)
Other versions
JP2023063893A (en
Inventor
昭二 橋本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Communications Corp
Original Assignee
NTT Communications Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT Communications Corp filed Critical NTT Communications Corp
Priority to JP2021173957A priority Critical patent/JP7196262B1/en
Priority to JP2022198839A priority patent/JP7296515B2/en
Application granted granted Critical
Publication of JP7196262B1 publication Critical patent/JP7196262B1/en
Publication of JP2023063893A publication Critical patent/JP2023063893A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

【課題】複数のマイクロサービスを実行するシステムを容易に開発すること。【解決手段】サービス提供システム1では、サービスサーバ10は、処理の開始時に処理開始をトランザクションサーバ20に通知し、開始した一連の処理のうち、所定の単位ごとの処理が完了するたびに、トランザクションサーバ20に処理データを通知する。そして、サービスサーバ10が、処理の途中でエラーが発生した場合には、トランザクションサーバ20に対して直前に通知した処理データを要求し、当該処理データをトランザクションサーバ20から取得する。続いて、サービスサーバ10が、取得した処理データを用いて、エラーが発生した際に実行するエラー処理を実行する。【選択図】図1Kind Code: A1 To easily develop a system that executes a plurality of microservices. Kind Code: A1 In a service providing system 1, a service server 10 notifies a transaction server 20 of the start of processing at the start of processing. Notifies the server 20 of the processing data. When an error occurs during processing, the service server 10 requests the transaction server 20 for the processing data notified immediately before, and acquires the processing data from the transaction server 20 . Subsequently, the service server 10 uses the acquired processing data to execute error processing to be executed when an error occurs. [Selection drawing] Fig. 1

Description

特許法第30条第2項適用 https://axis-edge.github.io/qmonus-sdk-programming-guide/transaction/transaction/ https://axis-edge.github.io/qmonus-sdk-programming-guide/scenario/scenario/ https://axis-edge.github.io/qmonus-sdk-programming-guide/overview/ https://axis-edge.github.io/qmonus-docs/tutorial/tutorial4.html https://axis-edge.github.io/qmonus-developer-portal/QmonusIntro.pdf ウェブサイトの掲載日 令和2年10月27日Article 30, Paragraph 2 of the Patent Act applies https://axis-edge. github. io/qmonus-sdk-programming-guide/transaction/transaction/https://axis-edge. github. io/qmonus-sdk-programming-guide/scenario/scenario/https://axis-edge. github. io/qmonus-sdk-programming-guide/overview/https://axis-edge. github. io/qmonus-docs/tutorial/tutorial4. html https://axis-edge. github. io/qmonus-developer-portal/QmonusIntro. pdf Posted on website October 27, 2020

本発明は、サービス提供システムおよびサービス提供方法に関する。 The present invention relates to a service providing system and a service providing method.

近年、デジタルビジネスのシステムをマイクロサービスと呼ばれる小さな機能の組み合わせで実現するマイクロサービスアーキテクチャが知られている。マイクロサービスアーキテクチャでは、サービス区々に独立したシステム、ライフサイクルで構築、運用され、トランザクションマネジメントもサービスに閉じた一貫性スコープで構築される。また、様々なマイクロサービスを横断して複数のリソースの集約概念となる新たな付加価値サービスを生み出すシーンが増加傾向にある。 In recent years, a microservice architecture is known, which realizes a digital business system by combining small functions called microservices. In a microservices architecture, each service is built and operated with an independent system and life cycle, and transaction management is also built with a consistency scope that is closed to the service. In addition, there is an increasing trend to create new value-added services that are a concept of consolidating multiple resources across various microservices.

特開2020-64586号公報JP 2020-64586 A

しかしながら、従来の技術では、サービスごとにトランザクションマネジメントを構築しなければならず、複数のマイクロサービスを実行するシステムを容易に構築することができないという課題があった。例えば、様々なマイクロサービスを横断して複数のリソースの集約概念となる新たな付加価値サービスを生み出すシーンが増加傾向にある。このような場合、新たにトランザクションマネジメントを備えた新たなオーケストレーションシステムが必要になる。また複合要件は複雑化しており、サービス毎にステートマシンも異なるため、オーケストレーションシステムの開発コストが高騰する。 However, the conventional technology has the problem that a transaction management must be built for each service, and a system that executes multiple microservices cannot be built easily. For example, there is an increasing tendency to create new value-added services that are a concept of consolidating multiple resources across various microservices. In such cases, a new orchestration system with new transaction management is required. In addition, complex requirements are becoming more complicated, and the state machine differs for each service, so the development cost of the orchestration system rises.

本発明は、上記に鑑みてなされたものであって、複数のマイクロサービスを実行するシステムを容易に構築することができるサービス提供システムおよびサービス提供方法を提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a service providing system and a service providing method that can easily construct a system that executes a plurality of microservices.

上述した課題を解決し、目的を達成するために、本発明のサービス提供システムは、複数のサービスサーバと、各サービスサーバのトランザクションを管理するトランザクションサーバとを有するサービス提供システムであって、各サービスサーバは、処理の開始時に処理開始を前記トランザクションサーバに通知し、開始した一連の処理のうち、所定の単位ごとの処理が完了するたびに、前記トランザクションサーバに処理データを通知する通知部と、前記処理の途中でエラーが発生した場合には、前記トランザクションサーバに対して直前に通知した処理データを要求し、当該処理データを前記トランザクションサーバから取得する取得部と、前記取得部によって取得された処理データを用いて、エラーが発生した際に実行するエラー処理を実行するエラー処理実行部とを有し、前記トランザクションサーバは、前記サービスサーバから処理開始の通知を受信すると、当該処理の状態の遷移を管理する管理部と、前記サービスサーバから処理データを受信すると、当該処理データを記憶部に格納する格納部と、前記サービスサーバから処理データの要求を受け付けた場合には、前記記憶部に記憶された処理データを当該サービスサーバに送信する送信部とを有することを特徴とする。 In order to solve the above-described problems and achieve the object, the service providing system of the present invention is a service providing system having a plurality of service servers and a transaction server for managing transactions of each service server. a notification unit for notifying the transaction server of the start of processing when the server starts processing, and notifying the transaction server of processing data each time a predetermined unit of processing in a series of started processing is completed; an acquisition unit for requesting the transaction server for the processing data notified immediately before and acquiring the processing data from the transaction server when an error occurs during the processing; an error processing execution unit that uses the processing data to execute error processing to be executed when an error occurs, and the transaction server, upon receiving a processing start notification from the service server, updates the state of the processing. a management unit that manages transitions; a storage unit that stores the processed data in a storage unit when processing data is received from the service server; and a storage unit that receives a request for processing data from the service server. and a transmission unit that transmits the stored processing data to the service server.

本発明によれば、複数のマイクロサービスを実行するシステムを容易に開発することを可能とする。 According to the present invention, it is possible to easily develop a system that executes multiple microservices.

図1は、実施の形態に係るサービス提供システムの構成の一例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of a service providing system according to an embodiment. 図2は、実施の形態に係るサービスサーバの構成の一例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of a configuration of a service server according to the embodiment; 図3は、実施の形態に係るトランザクションサーバの構成の一例を示すブロック図である。FIG. 3 is a block diagram showing an example of the configuration of a transaction server according to the embodiment; 図4は、トランザクションサーバの記憶部に記憶されるデータの一例を示す図である。FIG. 4 is a diagram illustrating an example of data stored in a storage unit of a transaction server; 図5は、トランザクションサーバによる状態遷移の管理を説明する図である。FIG. 5 is a diagram for explaining state transition management by the transaction server. 図6は、APIゲートウェイからリクエストを受け付けた際のシナリオサーバと、トランザクションサーバによる処理を説明する図である。FIG. 6 is a diagram illustrating processing by the scenario server and the transaction server when a request is received from the API gateway. 図7は、実施の形態に係るシナリオサーバにおける処理を示すフローチャートの一例である。FIG. 7 is an example of a flowchart showing processing in the scenario server according to the embodiment. 図8は、実施の形態に係るトランザクションサーバにおける処理を示すフローチャートの一例である。FIG. 8 is an example of a flowchart showing processing in the transaction server according to the embodiment. 図9は、プログラムを実行するコンピュータを示す図である。FIG. 9 is a diagram showing a computer that executes a program.

以下に、本願に係るサービス提供システムおよびサービス提供方法の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態により本願に係るサービス提供システムおよびサービス提供方法が限定されるものではない。 Embodiments of a service providing system and a service providing method according to the present application will be described below in detail with reference to the drawings. Note that the service providing system and service providing method according to the present application are not limited by this embodiment.

[実施の形態]
以下の実施形態では、第1の実施形態に係るサービス提供システムの構成、サービスサーバの構成、トランザクションサーバの構成、サービスサーバおよびトランザクションサーバにおける処理の流れを順に説明し、最後に実施形態による効果を説明する。
[Embodiment]
In the following embodiments, the configuration of the service providing system, the configuration of the service server, the configuration of the transaction server, and the flow of processing in the service server and transaction server according to the first embodiment will be described in order. explain.

[サービス提供システムの構成]
実施の形態に係るサービス提供システム1の構成を説明する。図1は、実施の形態に係るサービス提供システムの構成の一例を示すブロック図である。図1に示すように、サービス提供システム1は、複数のサービスサーバ10A~10C、トランザクションサーバ20、API(Application Programming Interface)ゲートウェイ30およびユーザ端末40を有する。なお、サービスサーバ10A~10Cについて、特に区別なく説明する場合には、サービスサーバ10と記載する。また、図1に示す構成は一例にすぎず、具体的な構成や各装置の数は特に限定されない。また、図1に示すネットワークの形態について、各装置は、有線または無線を問わず、インターネット、LANやVPN(Virtual Private Network)などの任意の通信網を介して通信してよい。
[Configuration of service providing system]
A configuration of a service providing system 1 according to an embodiment will be described. FIG. 1 is a block diagram showing an example of the configuration of a service providing system according to an embodiment. As shown in FIG. 1, the service providing system 1 has a plurality of service servers 10A to 10C, a transaction server 20, an API (Application Programming Interface) gateway 30 and user terminals 40. FIG. Note that the service servers 10A to 10C will be referred to as the service server 10 when they are described without distinction. Moreover, the configuration shown in FIG. 1 is merely an example, and the specific configuration and the number of each device are not particularly limited. Regarding the form of the network shown in FIG. 1, each device may communicate via any communication network such as the Internet, LAN, or VPN (Virtual Private Network), whether wired or wireless.

サービス提供システム1では、複数のサービスサーバ10A~10Cがそれぞれ提供する各マイクロサービスについて、共通のトランザクションサーバ20によってトランザクションマネジメントを行う。このため、サービス提供システム1では、マイクロサービスごとにトランザクションマネジメントを構築することなく、複数のマイクロサービスを実行するシステムを容易に構築することが可能である。 In the service providing system 1, a common transaction server 20 performs transaction management for each microservice provided by a plurality of service servers 10A to 10C. Therefore, in the service providing system 1, it is possible to easily construct a system that executes a plurality of microservices without constructing transaction management for each microservice.

複数のサービスサーバ10A~10Cは、マイクロサービスを提供するサーバ装置である。各サービスサーバ10A~10Cは、APIゲートウェイ30を介してユーザ端末40からリクエストを受信すると、マイクロサービスに関する処理を実行し、リクエストに対するレスポンスをユーザ端末40に送信する。 A plurality of service servers 10A to 10C are server devices that provide microservices. When each of the service servers 10A to 10C receives a request from the user terminal 40 via the API gateway 30, it executes processing related to microservices and transmits a response to the request to the user terminal 40. FIG.

トランザクションサーバ20は、複数のサービスサーバ10A~10Cがそれぞれ提供する各マイクロサービスについて、トランザクションマネジメントを行う。例えば、トランザクションサーバ20は、サービスサーバ10がサービスに関する一連の処理を開始する際に、サービスサーバ10からbegin通知を受信すると、当該一連の処理に対してトランザクションIDを付与し、当該処理の状態を管理する。 The transaction server 20 performs transaction management for each microservice provided by each of the plurality of service servers 10A-10C. For example, when the service server 10 receives a begin notification from the service server 10 when the service server 10 starts a series of processes related to a service, the transaction server 20 assigns a transaction ID to the series of processes, and indicates the status of the processes. to manage.

APIゲートウェイ30は、API利用者によるAPI活用のために種々の機能を有する。例えば、APIゲートウェイ30は、ユーザ端末40から受け取ったリクエストを、それぞれのマイクロサービスにルーティングする。 The API gateway 30 has various functions for API utilization by API users. For example, API gateway 30 routes requests received from user terminal 40 to respective microservices.

ユーザ端末40は、APIの提供及びAPIの利用に用いられる装置である。例えば、ユーザ端末40は、APIゲートウェイ30を介してサービスサーバ10に対してマイクロサービスに関するリクエストを送信し、APIゲートウェイ30を介してサービスサーバ10からレスポンスを受信する。なお、ユーザ端末40は、どのような装置であってもよく、例えば、タブレット型端末や、ノート型PCや、スマートフォン、PDA(Personal Digital Assistant)等の情報処理装置であってもよい。 The user terminal 40 is a device used for providing and using APIs. For example, the user terminal 40 transmits a microservice-related request to the service server 10 via the API gateway 30 and receives a response from the service server 10 via the API gateway 30 . The user terminal 40 may be any device, for example, an information processing device such as a tablet terminal, a notebook PC, a smart phone, or a PDA (Personal Digital Assistant).

このように、実施の形態に係るサービス提供システム1では、複数のサービスサーバ10A~10Cがそれぞれ提供する各マイクロサービスについて、共通のトランザクションサーバ20によってトランザクションマネジメントを行う。このため、サービス提供システム1では、マイクロサービスごとにトランザクションマネジメントを構築することなく、複数のマイクロサービスを実行するシステムを容易に構築することが可能である。 As described above, in the service providing system 1 according to the embodiment, the common transaction server 20 performs transaction management for each microservice provided by each of the plurality of service servers 10A to 10C. Therefore, in the service providing system 1, it is possible to easily construct a system that executes a plurality of microservices without constructing transaction management for each microservice.

つまり、実施の形態に係るサービス提供システム1では、様々な異なるサービスを横断して全体の一貫性を保証するトランザクションマネジメント機能そのものをメタマイクロサービスとして捉え、フレームワークとして様々なオーケストレーション案件に適用できる。また、これにより、サービス提供システム1では、サービス複合のオーケストレーションワークフローを定義する開発者が、トランザクションマネジメントを意識せず、通常処理とキャンセル処理といった業務処理のみに着目して実装でき、生産性が向上し、複数のサービス複合オーケストレーション型マイクロサービスの増産が可能になる。 In other words, in the service providing system 1 according to the embodiment, the transaction management function itself that guarantees overall consistency across various different services is treated as a meta-micro service, and can be applied as a framework to various orchestration projects. . In addition, in the service providing system 1, the developer who defines the orchestration workflow of the service composite can focus only on business processing such as normal processing and cancellation processing without being conscious of transaction management, thereby improving productivity. It will be possible to increase the production of multiple service composite orchestration type microservices.

[サービスサーバ]
次に、サービスサーバ10について説明する。図2は、実施の形態に係るサービスサーバの構成の一例を示すブロック図である。図2に示すように、サービスサーバ10は、通信処理部11、制御部12及び記憶部13を有する。
[Service server]
Next, the service server 10 will be explained. FIG. 2 is a block diagram illustrating an example of a configuration of a service server according to the embodiment; As shown in FIG. 2 , the service server 10 has a communication processing section 11 , a control section 12 and a storage section 13 .

通信処理部11は、無線または有線にて他の装置との間で通信を行う。通信処理部11は、ネットワーク等を介して接続された他の装置との間で、各種情報を送受信する通信インタフェースである。通信処理部11は、NIC(Network Interface Card)等で実現され、LAN(Local Area Network)やインターネットなどの電気通信回線を介した他の装置と制御部12(後述)との間の通信を行う。例えば、通信処理部11は、APIゲートウェイ30からリクエストを受信し、APIゲートウェイ30にリクエストに対するレスポンスを送信する。 The communication processing unit 11 communicates with other devices wirelessly or by wire. The communication processing unit 11 is a communication interface that transmits and receives various information to and from other devices connected via a network or the like. The communication processing unit 11 is realized by a NIC (Network Interface Card) or the like, and performs communication between another device and the control unit 12 (described later) via an electric communication line such as a LAN (Local Area Network) or the Internet. . For example, the communication processing unit 11 receives a request from the API gateway 30 and transmits a response to the request to the API gateway 30 .

記憶部13は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、光ディスク等の記憶装置である。なお、記憶部13は、RAM(Random Access Memory)、フラッシュメモリ、NVSRAM(Non Volatile Static Random Access Memory)等のデータを書き換え可能な半導体メモリであってもよい。記憶部13は、サービスサーバ10で実行されるOS(Operating System)や各種プログラムを記憶する。さらに、記憶部13は、プログラムの実行で用いられる各種情報を記憶する。 The storage unit 13 is a storage device such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), an optical disc, or the like. Note that the storage unit 13 may be a rewritable semiconductor memory such as a RAM (Random Access Memory), a flash memory, or an NVSRAM (Non Volatile Static Random Access Memory). The storage unit 13 stores an OS (Operating System) and various programs executed by the service server 10 . Further, the storage unit 13 stores various information used in executing the program.

制御部12は、サービスサーバ10全体を制御する。制御部12は、例えば、CPU(Central Processing Unit)、MPU(Micro Processing Unit)等の電子回路や、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)等の集積回路である。また、制御部12は、各種の処理手順を規定したプログラムや制御データを格納するための内部メモリを有し、内部メモリを用いて各処理を実行する。また、制御部12は、各種のプログラムが動作することにより各種の処理部として機能する。制御部12は、作成部12a、通知部12b、取得部12cおよびエラー処理部12dを有する。 The control unit 12 controls the service server 10 as a whole. The control unit 12 is, for example, an electronic circuit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit), or an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). The control unit 12 also has an internal memory for storing programs defining various processing procedures and control data, and executes each processing using the internal memory. Further, the control unit 12 functions as various processing units by running various programs. The control unit 12 has a creation unit 12a, a notification unit 12b, an acquisition unit 12c, and an error processing unit 12d.

作成部12aは、サービスを実行するためのシナリオを作成する。具体的には、作成部12aは、シナリオを作成するためのシナリオエディタ上で開発者の操作を受け付けることで、シナリオエディタ上でエンドポイントが定義され、ワークフローを作成する。ここでワークフローを定義する開発者は、トランザクションマネジメントを意識せず、通常処理とキャンセル処理といった業務処理のみに着目して実装でき、生産性が向上する。また、開発者は、フローエディタで正常な処理とエラー発生時のキャンセル処理等を記述する必要があるが、トランザクションマネジメントを意識せずに、正常処理とエラー処理を分離して記述できるため処理を簡素化することができる。 The creator 12a creates a scenario for executing a service. Specifically, the creating unit 12a accepts a developer's operation on a scenario editor for creating a scenario, so that endpoints are defined on the scenario editor and a workflow is created. The developer who defines the workflow here can focus only on business processing such as normal processing and cancellation processing without being conscious of transaction management, which improves productivity. Also, the developer needs to describe the normal process and the cancel process when an error occurs in the flow editor. can be simplified.

通知部12bは、処理の開始時に処理開始をトランザクションサーバ20に通知し、開始した一連の処理のうち、所定の単位ごとの処理が完了するたびに、トランザクションサーバ20に処理データを通知する。例えば、通知部12bは、マイクロサービスの一連の処理が予め設定されたブロックごとに分けられており、ブロックの処理が完了するたびに、スナップショットを作成し、ブロックの処理が完了したタイミングをチェックポイントとして、スナップショットをトランザクションサーバ20に通知し、トランザクションサーバ20に保存させる。 The notification unit 12b notifies the transaction server 20 of the start of processing at the start of processing, and notifies the transaction server 20 of processing data each time a predetermined unit of processing in the series of started processing is completed. For example, the notification unit 12b divides a series of microservice processes into preset blocks, creates a snapshot each time a block process is completed, and checks the timing at which the block process is completed. As a point, the snapshot is notified to the transaction server 20 and stored in the transaction server 20 .

取得部12cは、処理の途中でエラーが発生した場合には、トランザクションサーバ20に対して直前に通知した処理データを要求し、当該処理データをトランザクションサーバ20から取得する。例えば、取得部12cは、処理の途中でエラーが発生した場合には、エラー発生時の処理を実行し、abortをトランザクションサーバ20に通知する。そして、取得部12cは、直前のチェックポイントの処理データのスナップショットをトランザクションサーバ20から取得する。 If an error occurs during processing, the acquisition unit 12c requests the transaction server 20 for the processing data notified immediately before, and acquires the processing data from the transaction server 20 . For example, when an error occurs during processing, the acquisition unit 12c executes the processing at the time of error occurrence and notifies the transaction server 20 of abort. Then, the acquisition unit 12c acquires a snapshot of the processing data of the immediately preceding checkpoint from the transaction server 20. FIG.

エラー処理部12dは、取得部12cによって取得された処理データを用いて、エラーが発生した際に実行するエラー処理を実行する。例えば、エラー処理部12dは、トランザクションサーバ20から取得したスナップショットを用いて、エラー発生時のキャンセル処理を実行したり、直前のチェックポイントまで処理をロールバックしたりする。 The error processing unit 12d uses the processing data acquired by the acquisition unit 12c to execute error processing to be executed when an error occurs. For example, the error processing unit 12d uses a snapshot acquired from the transaction server 20 to execute cancellation processing when an error occurs, or roll back processing to the immediately preceding checkpoint.

[トランザクションサーバ]
次に、トランザクションサーバ20について説明する。図3は、実施の形態に係るトランザクションサーバの構成の一例を示すブロック図である。図3に示すように、トランザクションサーバ20は、通信処理部21、制御部22及び記憶部23を有する。
[Transaction Server]
Next, the transaction server 20 will be explained. FIG. 3 is a block diagram showing an example of the configuration of a transaction server according to the embodiment; As shown in FIG. 3, the transaction server 20 has a communication processing unit 21, a control unit 22 and a storage unit 23.

通信処理部21は、無線または有線にて他の装置との間で通信を行う。通信処理部21は、ネットワーク等を介して接続された他の装置との間で、各種情報を送受信する通信インタフェースである。通信処理部21は、NIC(Network Interface Card)等で実現され、LAN(Local Area Network)やインターネットなどの電気通信回線を介した他の装置と制御部22(後述)との間の通信を行う。 The communication processing unit 21 communicates with other devices wirelessly or by wire. The communication processing unit 21 is a communication interface that transmits and receives various information to and from other devices connected via a network or the like. The communication processing unit 21 is realized by a NIC (Network Interface Card) or the like, and performs communication between another device and the control unit 22 (described later) via an electric communication line such as a LAN (Local Area Network) or the Internet. .

記憶部23は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、光ディスク等の記憶装置である。なお、記憶部23は、RAM(Random Access Memory)、フラッシュメモリ、NVSRAM(Non Volatile Static Random Access Memory)等のデータを書き換え可能な半導体メモリであってもよい。記憶部23は、トランザクションサーバ20で実行されるOS(Operating System)や各種プログラムを記憶する。さらに、記憶部23は、プログラムの実行で用いられる各種情報を記憶する。 The storage unit 23 is a storage device such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), an optical disc, or the like. Note that the storage unit 23 may be a rewritable semiconductor memory such as a RAM (Random Access Memory), a flash memory, or an NVSRAM (Non Volatile Static Random Access Memory). The storage unit 23 stores an OS (Operating System) and various programs executed by the transaction server 20 . Further, the storage unit 23 stores various information used in executing the program.

例えば、記憶部23は、トランザクションを一意に識別するトランザクションIDに対応付けて、チェックポイントにおいて保存されたスナップショット、エンドポイント情報およびインデックスを記憶する。また、記憶部23は、トランザクションの排他制御を行うためのロック情報を記憶する。ロックは、トランザクションがコミットされると自動的に解放される。また、例えば、記憶部23は、図4に例示するように、トランザクションIDに対応付けて、トランザクションの状態を示すステータスを記憶する。記憶部23は、トランザクションIDに対応するトランザクションの状態が遷移するたびにステータスのデータを更新する。 For example, the storage unit 23 stores snapshots, endpoint information, and indexes saved at checkpoints in association with transaction IDs that uniquely identify transactions. The storage unit 23 also stores lock information for exclusive control of transactions. Locks are automatically released when a transaction is committed. Also, for example, as illustrated in FIG. 4, the storage unit 23 stores a status indicating the state of the transaction in association with the transaction ID. The storage unit 23 updates the status data each time the state of the transaction corresponding to the transaction ID changes.

ここで、図5を用いて、トランザクションサーバ20による状態遷移の管理を説明する。図5は、トランザクションサーバによる状態遷移の管理を説明する図である。トランザクションサーバ20は、図5に例示するような状態マシンによってトランザクションを管理する。図5に例示するように、トランザクションサーバ20は、ステータスとして、「Processing」、「Complete」、「Suspending」、「Aborted」、「Cancelling」、「Cancelled」、「Recovery Processing」、「Recovery Complete」、「Force Recovery Complete」のいずれかに遷移させる。 Here, management of state transition by the transaction server 20 will be described with reference to FIG. FIG. 5 is a diagram for explaining state transition management by the transaction server. The transaction server 20 manages transactions through a state machine as illustrated in FIG. As exemplified in FIG. 5, the transaction server 20 has the following statuses: "Processing", "Complete", "Suspending", "Aborted", "Cancelling", "Cancelled", "Recovery Processing", "Recovery Complete", Transition to any of "Force Recovery Complete".

例えば、トランザクションサーバ20は、サービスサーバ10からbeginの通知を受信した場合には、トランザクションIDを払い出し、ステータス「Processing」に遷移させる。そして、トランザクションサーバ20は、サービスサーバ10からトランザクション処理の確定を依頼するcommitの通知を受信した場合には、ステータス「Complete」の状態に遷移させ、その後、当該トランザクションを終了する。 For example, when the transaction server 20 receives a begin notification from the service server 10, the transaction ID is issued and the status is changed to "Processing". When the transaction server 20 receives from the service server 10 a commit notification requesting confirmation of the transaction processing, the transaction server 20 transitions to the status "Complete" and then terminates the transaction.

また、例えば、トランザクションサーバ20は、サービスサーバ10からabortの通知を受信した場合またはタイムアウトが起きた場合には、ステータス「Aborted」に遷移させる。そして、例えば、トランザクションサーバ20は、キャンセル処理または強制キャンセル処理を行う場合には、ステータス「cancelled」に遷移させる。そして、トランザクションサーバ20は、サービスサーバ10からcommitの通知を受信した場合には、キャンセル処理を確定させる「Cancelled」に遷移させ、その後、当該トランザクションを終了する。 Also, for example, when the transaction server 20 receives an abort notification from the service server 10 or when a timeout occurs, the transaction server 20 transitions to the status "Aborted". Then, for example, when the transaction server 20 performs cancellation processing or forced cancellation processing, the transaction server 20 changes the status to “canceled”. When the transaction server 20 receives a commit notification from the service server 10, the transaction server 20 transitions to "Cancelled" to confirm the cancellation process, and then ends the transaction.

制御部22は、トランザクションサーバ20全体を制御する。制御部22は、例えば、CPU(Central Processing Unit)、MPU(Micro Processing Unit)等の電子回路や、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)等の集積回路である。また、制御部22は、各種の処理手順を規定したプログラムや制御データを格納するための内部メモリを有し、内部メモリを用いて各処理を実行する。また、制御部22は、各種のプログラムが動作することにより各種の処理部として機能する。制御部22は、管理部22a、格納部22bおよび送信部22cを有する。 The control unit 22 controls the transaction server 20 as a whole. The control unit 22 is, for example, an electronic circuit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit), or an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). The control unit 22 also has an internal memory for storing programs defining various processing procedures and control data, and executes each processing using the internal memory. Further, the control unit 22 functions as various processing units by running various programs. The control unit 22 has a management unit 22a, a storage unit 22b, and a transmission unit 22c.

管理部22aは、サービスサーバ10から処理開始の通知を受信すると、当該処理の状態の遷移を管理する。例えば、管理部22aは、サービスサーバ10からbeginの通知を受信した場合には、新規のトランザクションIDを払い出し、当該トランザクションIDのステータス「Processing」として記憶部23に記憶させる。そして、管理部22aは、サービスサーバ10からトランザクション処理の確定を依頼するcommitの通知を受信した場合には、ステータスを「Complete」の状態に遷移させ、その後、当該トランザクションの管理を終了する。 When the management unit 22a receives a notification of the start of processing from the service server 10, the management unit 22a manages the state transition of the processing. For example, when receiving a begin notification from the service server 10, the management unit 22a assigns a new transaction ID and stores it in the storage unit 23 as the status "Processing" of the transaction ID. Then, when the management unit 22a receives a commit notification requesting confirmation of transaction processing from the service server 10, the management unit 22a changes the status to "Complete", and then ends the management of the transaction.

また、例えば、管理部22aは、ステータスが「Processing」であるトランザクションについてサービスサーバ10からabortの通知を受信した場合には、記憶部23に記憶されたステータスについて、当該トランザクションのトランザクションIDに対応するステータスを「Aborted」に更新する。 Further, for example, when the management unit 22a receives an abort notification from the service server 10 for a transaction whose status is "Processing", the management unit 22a assigns the status stored in the storage unit 23 to the transaction ID of the transaction. Update the status to "Aborted".

また、管理部22aは、タイムアウトが発生した場合には、記憶部23に記憶された処理データを用いてロールバック処理を行う。例えば、管理部22aは、ステータスが「Processing」であるトランザクションについてタイムアウト(トランザクションタイムアウト)が発生した場合には、記憶部23に記憶されたステータスについて、当該トランザクションのトランザクションIDに対応するステータスを「Aborted」に更新する。そして、管理部22aは、当該トランザクションのトランザクションIDに対応するスナップショットを記憶部23から読み出し、読みだしたスナップショットを用いて、直前のチェックポイントまで処理をロールバックする。 Further, the management unit 22a performs rollback processing using the processing data stored in the storage unit 23 when a timeout occurs. For example, when a timeout (transaction timeout) occurs for a transaction whose status is "Processing", the management unit 22a changes the status corresponding to the transaction ID of the transaction stored in the storage unit 23 to "Aborted". ”. Then, the management unit 22a reads the snapshot corresponding to the transaction ID of the transaction from the storage unit 23, and rolls back the processing to the previous checkpoint using the read snapshot.

格納部22bは、サービスサーバ10から処理データを受信すると、当該処理データを記憶部23に格納する。例えば、格納部22bは、サービスサーバ10からスナップショットを受信した場合には、トランザクションIDに対応付けて、スナップショットとエンドポイント情報とインデックスとを対応付けて記憶部23に格納する。また、例えば、格納部22bは、スナップショットを受信するとともに、任意の残り必要時間をサービスサーバ10から受信してもよい。格納部22bがこの任意の残り必要時間を受信した場合には、前述した管理部22aは、トランザクションタイムアウトまでの時間で残り必要時間を満たせない場合は、満たすようにトランザクションタイムアウトを延長する。つまり、管理部22aは、現在からトランザクションタイムアウトまでの時間が、任意の残り必要時間より短い場合には、任意の残り必要時間を満たすようにトランザクションタイムアウトを延長する。これにより、サービスサーバ10側で処理に応じて、タイムアウト時間を延長することができるので、異常発生の検出精度を向上させることが可能である。 Upon receiving the processing data from the service server 10 , the storage unit 22 b stores the processing data in the storage unit 23 . For example, when receiving a snapshot from the service server 10, the storage unit 22b stores the snapshot, the endpoint information, and the index in the storage unit 23 in association with the transaction ID. Further, for example, the storage unit 22b may receive any remaining required time from the service server 10 while receiving the snapshot. When the storage unit 22b receives this arbitrary remaining required time, the aforementioned management unit 22a extends the transaction timeout so as to meet the remaining required time if the remaining required time cannot be satisfied by the transaction timeout. In other words, if the time from the present to the transaction timeout is shorter than the desired remaining time, the management unit 22a extends the transaction timeout so as to satisfy the desired remaining time. As a result, the service server 10 side can extend the time-out period according to the processing, so that it is possible to improve the detection accuracy of the occurrence of an abnormality.

送信部22cは、サービスサーバ10から処理データの要求を受け付けた場合には、記憶部23に記憶された処理データを当該サービスサーバ10に送信する。例えば、送信部22cは、サービスサーバ10からabortの通知を受信するとともに、スナップショットの要求を受信した場合には、直前のチェックポイントの処理データのスナップショットをサービスサーバ10に送信する。つまり、サービスサーバ10が、処理の途中でエラーが発生した場合には、エラー発生時の処理を実行するため、直前のチェックポイントの処理データのスナップショットをトランザクションサーバ20に要求する。 When receiving a request for processing data from the service server 10 , the transmission unit 22 c transmits the processing data stored in the storage unit 23 to the service server 10 . For example, when the transmission unit 22c receives an abort notification from the service server 10 and also receives a snapshot request, the transmission unit 22c transmits a snapshot of the processing data of the last checkpoint to the service server 10 . That is, when an error occurs during processing, the service server 10 requests the transaction server 20 for a snapshot of the processing data of the immediately preceding checkpoint in order to execute the processing at the time of error occurrence.

ここで、図6を用いて、APIゲートウェイ30からリクエストを受け付けた際のシナリオサーバ10と、トランザクションサーバ20による処理を説明する。図6は、ユーザ端末からリクエストを受け付けた際のシナリオサーバと、トランザクションサーバによる処理を説明する図である。図6に例示するように、シナリオサーバ10は、APIゲートウェイ30からのエンドポイントへのアクセスによりリクエストを受信すると、リクエストの検証を行い、サービスに関する一連の処理を開始する。ここで、シナリオサーバ10は、サービスに関する一連の処理を開始する際に、トランザクションサーバ20に対してbeginを通知する。 Processing by the scenario server 10 and the transaction server 20 when a request is received from the API gateway 30 will now be described with reference to FIG. FIG. 6 is a diagram for explaining processing by the scenario server and the transaction server when a request is received from a user terminal. As illustrated in FIG. 6, when the scenario server 10 receives a request by accessing the endpoint from the API gateway 30, it verifies the request and starts a series of processing related to the service. Here, the scenario server 10 notifies the transaction server 20 of begin when starting a series of processing related to the service.

そして、シナリオサーバ10は、ブロック0からブロックnまでの処理を順次実行し、ブロックの処理が完了するたびに、スナップショットを作成し、ブロックの処理が完了したタイミングをチェックポイントとして、スナップショットをトランザクションサーバ20に通知し、トランザクションサーバ20に保存させる。そして、トランザクションサーバ20は、サービスサーバ10からトランザクション処理の確定を依頼するcommitの通知を受信した場合には、ステータス「Complete」の状態に遷移させ、その後、当該トランザクションを終了する。 Then, the scenario server 10 sequentially executes processing from block 0 to block n, creates a snapshot each time the processing of a block is completed, and creates a snapshot using the timing at which processing of the block is completed as a checkpoint. Notifies the transaction server 20 and causes the transaction server 20 to store it. When the transaction server 20 receives from the service server 10 a commit notification requesting confirmation of the transaction processing, the transaction server 20 transitions to the status "Complete" and then terminates the transaction.

また、シナリオサーバ10は、処理の途中でエラーが発生した場合には、リカバリ処理を行って処理を進めてもよいし、キャンセル処理を行って直前のチェックポイントまで処理をロールバックしてもよい。なお、シナリオサーバ10が、エラー発生時においてリカバリ処理を行うかキャンセル処理を行うかは、予め設定していてもよいし、条件に応じて、どちらを行うかを決定してもよい。 If an error occurs during processing, the scenario server 10 may perform recovery processing to proceed with the processing, or may perform cancellation processing to roll back the processing to the previous checkpoint. . Whether the scenario server 10 performs recovery processing or cancellation processing when an error occurs may be set in advance, or may be determined according to conditions.

例えば、図6の例では、シナリオサーバ10は、ブロック0の処理において、エラーが発生した場合に、エラー発生時のリカバリ処理を実行し、abortをトランザクションサーバ20に通知する。そして、シナリオサーバ10は、直前のチェックポイントの処理データのスナップショットをトランザクションサーバ20から取得する。そして、シナリオサーバ10は、トランザクションサーバ20から取得したスナップショットを用いて、リカバリ処理を行い、ブロック0の処理を完了させる。 For example, in the example of FIG. 6, if an error occurs in the processing of block 0, the scenario server 10 executes error recovery processing and notifies the transaction server 20 of abort. Then, the scenario server 10 acquires a snapshot of the processed data of the immediately preceding checkpoint from the transaction server 20 . Then, the scenario server 10 uses the snapshot acquired from the transaction server 20 to perform recovery processing and complete the processing of block 0 .

また、シナリオサーバ10は、ブロックnの処理において、エラーが発生したため、エラー発生時のキャンセル処理を実行し、abortをトランザクションサーバ20に通知する。そして、シナリオサーバ10は、直前のチェックポイントの処理データのスナップショットをトランザクションサーバ20から取得する。そして、シナリオサーバ10は、トランザクションサーバ20から取得したスナップショットを用いて、キャンセル処理を行い、直前のチェックポイントまで処理をロールバックする。 Also, since an error has occurred in the processing of block n, the scenario server 10 executes the cancel processing at the time of error occurrence and notifies the transaction server 20 of abort. Then, the scenario server 10 acquires a snapshot of the processed data of the immediately preceding checkpoint from the transaction server 20 . Then, the scenario server 10 uses the snapshot obtained from the transaction server 20 to perform cancellation processing and rolls back the processing to the previous checkpoint.

また、トランザクションサーバ20が、シナリオサーバ10のエラー発生を検知して、リカバリ処理やキャンセル処理を行ってもよい。例えば、トランザクションサーバ20が、ステータスが「Processing」であるトランザクションについてタイムアウトが発生した場合には、記憶部23に記憶されたステータスについて、当該トランザクションのトランザクションIDに対応するステータスを「Aborted」に更新する。そして、トランザクションサーバ20は、当該トランザクションのトランザクションIDに対応するスナップショットを記憶部23から読み出し、読み出したスナップショットを用いて、直前のチェックポイントまで処理をロールバックする。 Also, the transaction server 20 may detect the occurrence of an error in the scenario server 10 and perform recovery processing or cancellation processing. For example, when a timeout occurs for a transaction whose status is "Processing", the transaction server 20 updates the status corresponding to the transaction ID of the transaction stored in the storage unit 23 to "Aborted". . Then, the transaction server 20 reads the snapshot corresponding to the transaction ID of the transaction from the storage unit 23, and uses the read snapshot to roll back the processing to the previous checkpoint.

[シナリオサーバおよびトランザクションサーバの処理手順]
次に、図7および図8を用いて、第1の実施形態に係るシナリオサーバ10およびトランザクションサーバ20による処理手順の例を説明する。図7は、実施の形態に係るシナリオサーバにおける処理の一例を示すフローチャートである。図8は、実施の形態に係るトランザクションサーバにおける処理の一例を示すフローチャートである。
[Processing procedure of scenario server and transaction server]
Next, an example of processing procedures by the scenario server 10 and the transaction server 20 according to the first embodiment will be described with reference to FIGS. 7 and 8. FIG. FIG. 7 is a flowchart illustrating an example of processing in the scenario server according to the embodiment; 8 is a flowchart illustrating an example of processing in the transaction server according to the embodiment; FIG.

まず、図7を用いて、シナリオサーバ10の処理の一例を説明する。図7に例示するように、シナリオサーバ10の通知部12bは、APIサーバ30からリクエストを受け付けてマイクロサービスに関する処理を開始すると(ステップS101肯定)、トランザクションサーバ20にbegin通知する(ステップS102)。そして、シナリオサーバ10の取得部12cは、処理中のブロックの処理が完了したか判定する(ステップS103)。 First, an example of processing of the scenario server 10 will be described with reference to FIG. As illustrated in FIG. 7, when the notification unit 12b of the scenario server 10 receives a request from the API server 30 and starts microservice-related processing (Yes at step S101), it notifies the transaction server 20 of begin (step S102). Then, the acquiring unit 12c of the scenario server 10 determines whether the processing of the block being processed has been completed (step S103).

そして、取得部12cは、処理の途中でエラーが発生し、ブロックの処理が完了していないと判定した場合には(ステップS103否定)、トランザクションサーバ20にabortを通知する(ステップS104)。続いて、取得部12cは、直前のチェックポイントの処理データのスナップショットをトランザクションサーバ20から取得する(ステップS105)。その後、エラー処理部12dは、取得した処理データを用いて、リカバリ処理を行い(ステップS106)、ステップS103に戻る。 Then, when the acquiring unit 12c determines that an error has occurred in the middle of processing and the processing of the block has not been completed (No at step S103), it notifies the transaction server 20 of abort (step S104). Subsequently, the acquiring unit 12c acquires a snapshot of the processed data of the immediately preceding checkpoint from the transaction server 20 (step S105). After that, the error processing unit 12d performs recovery processing using the acquired processing data (step S106), and returns to step S103.

また、取得部12cが、処理の途中でエラーが発生し、ブロックの処理が完了したと判定した場合には(ステップS103肯定)、通知部12bは、全てのブロックの処理が完了したかを判定する(ステップS107)。この結果、通知部12bは、全てのブロックの処理が完了していないと判定した場合には(ステップS107否定)、トランザクションサーバ20にチェックポイントのスナップショットを指示し(ステップS108)、ステップS103に戻る。 Further, when the obtaining unit 12c determines that an error has occurred in the middle of the processing and the processing of the block has been completed (Yes at step S103), the notification unit 12b determines whether the processing of all blocks has been completed. (step S107). As a result, if the notification unit 12b determines that the processing of all blocks has not been completed (No at step S107), it instructs the transaction server 20 to take a checkpoint snapshot (step S108), and proceeds to step S103. return.

また、通知部12bは、全てのブロックの処理が完了したと判定した場合には(ステップS107肯定)、トランザクションサーバ20にトランザクション処理の確定を依頼するcommitを通知し(ステップS109)、処理を終了する。 If the notification unit 12b determines that the processing of all blocks has been completed (Yes at step S107), it notifies the transaction server 20 of commit requesting confirmation of the transaction processing (step S109), and ends the processing. do.

続いて、図8を用いて、トランザクションサーバ20の処理の一例を説明する。図8に例示するように、トランザクションサーバ20の管理部22aは、サービスサーバ10からbeginの通知を受信した場合には(ステップS201肯定)、新規のトランザクションIDの払い出しを行う(ステップS202)。 Next, an example of processing of the transaction server 20 will be described using FIG. As illustrated in FIG. 8, when the management unit 22a of the transaction server 20 receives a begin notification from the service server 10 (Yes at step S201), it issues a new transaction ID (step S202).

そして、管理部22aは、サービスサーバ10からトランザクション処理の確定を依頼するcommitの通知を受信したかを判定する(ステップS203)。この結果、管理部22aは、サービスサーバ10からトランザクション処理の確定を依頼するcommitの通知を受信していないと判定した場合には(ステップS203否定)、サービスサーバ10からスナップショットの指示を受信したか判定する(ステップS204)。この結果、サービスサーバ10からスナップショットの指示を受信した場合には(ステップS204肯定)、格納部22bは、トランザクションIDに対応付けて、スナップショットを記憶部23に格納し(ステップS205)、ステップS203の処理に戻る。 Then, the management unit 22a determines whether or not a commit notification requesting confirmation of transaction processing has been received from the service server 10 (step S203). As a result, when the management unit 22a determines that it has not received a commit notification requesting confirmation of transaction processing from the service server 10 (No at step S203), it receives a snapshot instruction from the service server 10. (step S204). As a result, when a snapshot instruction is received from the service server 10 (Yes at step S204), the storage unit 22b stores the snapshot in the storage unit 23 in association with the transaction ID (step S205). Return to the processing of S203.

また、管理部22aは、サービスサーバ10からスナップショットの指示を受信していない場合には(ステップS204否定)、タイムアウトが発生もしくはサービスサーバ10からabortを受信したかを判定する(ステップS206)。この結果、タイムアウトが発生もしくはサービスサーバ10からabortを受信した場合には(ステップS206肯定)、送信部22cは、リカバリ処理を行う(ステップS207)。例えば、送信部22cは、直前のチェックポイントの処理データのスナップショットをサービスサーバ10に送信することで、リカバリ処理を行う。 If the management unit 22a has not received a snapshot instruction from the service server 10 (No at step S204), the management unit 22a determines whether a timeout has occurred or an abort has been received from the service server 10 (step S206). As a result, when a timeout occurs or an abort is received from the service server 10 (Yes at step S206), the transmission unit 22c performs recovery processing (step S207). For example, the transmission unit 22c performs recovery processing by transmitting a snapshot of the processing data of the immediately preceding checkpoint to the service server 10 .

また、ステップS203の処理において、管理部22aは、サービスサーバ10からトランザクション処理の確定を依頼するcommitの通知を受信したと判定した場合には(ステップS203肯定)、当該トランザクションIDのステータスを「Complete」の状態に更新し(ステップS208)、その後、当該トランザクションの管理を終了する。 In addition, in the processing of step S203, when the management unit 22a determines that a commit notification requesting confirmation of transaction processing has been received from the service server 10 (Yes in step S203), the status of the transaction ID is changed to "Complete." ” (step S208), and then ends the management of the transaction.

[実施の形態の効果]
サービス提供システム1では、サービスサーバ10が、処理の開始時に処理開始をトランザクションサーバに通知し、開始した一連の処理のうち、所定の単位ごとの処理が完了するたびに、トランザクションサーバ20に処理データを通知する。そして、トランザクションサーバ20が、サービスサーバ10から処理開始の通知を受信すると、当該処理の状態の遷移を管理する。続いて、トランザクションサーバ20が、サービスサーバ10から処理データを受信すると、当該処理データを記憶部23に格納する。そして、サービスサーバ10が、処理の途中でエラーが発生した場合には、トランザクションサーバ20に対して直前に通知した処理データを要求し、当該処理データをトランザクションサーバ20から取得する。続いて、サービスサーバ10が、取得した処理データを用いて、エラーが発生した際に実行するエラー処理を実行する。その後、トランザクションサーバ20が、サービスサーバ10から処理データの要求を受け付けた場合には、記憶部23に記憶された処理データを当該サービスサーバ10に送信する。
[Effects of Embodiment]
In the service providing system 1, the service server 10 notifies the transaction server of the start of processing at the start of processing. to notify you. When the transaction server 20 receives a processing start notification from the service server 10, it manages the state transition of the processing. Subsequently, when the transaction server 20 receives the processing data from the service server 10 , it stores the processing data in the storage unit 23 . When an error occurs during processing, the service server 10 requests the transaction server 20 for the processing data notified immediately before, and acquires the processing data from the transaction server 20 . Subsequently, the service server 10 uses the acquired processing data to execute error processing to be executed when an error occurs. After that, when the transaction server 20 receives a request for processing data from the service server 10 , it transmits the processing data stored in the storage unit 23 to the service server 10 .

このように、実施の形態に係るサービス提供システム1では、複数のサービスサーバ10A~10Cがそれぞれ提供する各マイクロサービスについて、共通のトランザクションサーバ20によってトランザクションマネジメントを行う。このため、サービス提供システム1では、マイクロサービスごとにトランザクションマネジメントを構築することなく、複数のマイクロサービスを実行するシステムを容易に構築することが可能である。 As described above, in the service providing system 1 according to the embodiment, the common transaction server 20 performs transaction management for each microservice provided by each of the plurality of service servers 10A to 10C. Therefore, in the service providing system 1, it is possible to easily construct a system that executes a plurality of microservices without constructing transaction management for each microservice.

つまり、実施の形態に係るサービス提供システム1では、様々な異なるサービスを横断して全体の一貫性を保証するトランザクションマネジメント機能そのものをメタマイクロサービスとして捉え、フレームワークとして様々なオーケストレーション案件に適用できる。これにより、サービス提供システム1では、サービス複合のオーケストレーションワークフローを定義する開発者が、トランザクションマネジメントを意識せず、通常処理とキャンセル処理といった業務処理のみに着目して実装でき、生産性が向上する。また、複数のサービス複合オーケストレーション型マイクロサービスの増産が可能になる。 In other words, in the service providing system 1 according to the embodiment, the transaction management function itself that guarantees overall consistency across various different services is treated as a meta-micro service, and can be applied as a framework to various orchestration projects. . As a result, in the service providing system 1, developers who define service-composite orchestration workflows can focus only on business processing such as normal processing and cancellation processing without being conscious of transaction management, thereby improving productivity. . In addition, it becomes possible to increase the production of multiple service complex orchestration type microservices.

また、サービス提供システム1のトランザクションサーバ20は、タイムアウトが発生した場合には、記憶部23に記憶された処理データを用いてロールバック処理を行うので、サービスサーバ10がワークフローの途中でクラッシュした場合でもロールバックを行うことが可能である。 Further, when a timeout occurs, the transaction server 20 of the service providing system 1 performs rollback processing using the processing data stored in the storage unit 23. Therefore, even if the service server 10 crashes during the workflow, However, it is possible to rollback.

また、サービス提供システム1のサービスサーバ10は、予め設定された所定の単位ごとの処理が完了するたびに、スナップショットを作成し、処理が完了したタイミングをチェックポイントとして、スナップショットをトランザクションサーバ20に通知する。このため、サービスサーバ10は、エラー発生時にトランザクションサーバに記憶されたスナップショットを用いて、ロールバック処理等を行うことが可能である。 In addition, the service server 10 of the service providing system 1 creates a snapshot each time a process for each preset unit is completed, and uses the timing at which the process is completed as a checkpoint to store the snapshot in the transaction server 20 . to notify. Therefore, the service server 10 can perform rollback processing and the like using the snapshot stored in the transaction server when an error occurs.

[システム構成等]
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部または任意の一部が、CPUやGPU及び当該CPUやGPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。
[System configuration, etc.]
Also, each component of each device illustrated is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution and integration of each device is not limited to the one shown in the figure, and all or part of them can be functionally or physically distributed and integrated in arbitrary units according to various loads and usage conditions. Can be integrated and configured. Furthermore, all or any part of each processing function performed by each device is realized by a CPU or GPU and a program analyzed and executed by the CPU or GPU, or as hardware by wired logic can be realized.

また、本実施形態において説明した各処理のうち、自動的におこなわれるものとして説明した処理の全部または一部を手動的におこなうこともでき、あるいは、手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的におこなうこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。 Further, among the processes described in this embodiment, all or part of the processes described as being automatically performed can be performed manually, or the processes described as being performed manually can be performed manually. All or part of this can also be done automatically by known methods. In addition, information including processing procedures, control procedures, specific names, and various data and parameters shown in the above documents and drawings can be arbitrarily changed unless otherwise specified.

[プログラム]
また、上記実施形態において説明したサービスサーバ10またはトランザクションサーバ20が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。例えば、実施形態におけるサービスサーバ10またはトランザクションサーバ20が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。この場合、コンピュータがプログラムを実行することにより、上記実施形態と同様の効果を得ることができる。さらに、かかるプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータに読み込ませて実行することにより上記実施形態と同様の処理を実現してもよい。
[program]
It is also possible to create a program in which the processing executed by the service server 10 or the transaction server 20 described in the above embodiment is written in a computer-executable language. For example, it is possible to create a program in which the processing executed by the service server 10 or the transaction server 20 in the embodiment is written in a computer-executable language. In this case, the same effects as those of the above embodiments can be obtained by having the computer execute the program. Further, such a program may be recorded in a computer-readable recording medium, and the program recorded in this recording medium may be read by a computer and executed to realize processing similar to that of the above embodiments.

図9は、プログラムを実行するコンピュータを示す図である。図9に例示するように、コンピュータ1000は、例えば、メモリ1010と、CPU1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、シリアルポートインタフェース1050と、ビデオアダプタ1060と、ネットワークインタフェース1070とを有し、これらの各部はバス1080によって接続される。 FIG. 9 is a diagram showing a computer that executes a program. As illustrated in FIG. 9, computer 1000 includes, for example, memory 1010, CPU 1020, hard disk drive interface 1030, disk drive interface 1040, serial port interface 1050, video adapter 1060, and network interface 1070. , and these units are connected by a bus 1080 .

メモリ1010は、図9に例示するように、ROM(Read Only Memory)1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、図9に例示するように、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。 The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012 as illustrated in FIG. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). Hard disk drive interface 1030 is connected to hard disk drive 1090 as illustrated in FIG. A disk drive interface 1040 is connected to the disk drive 1100 . A removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1100 . Serial port interface 1050 is connected to mouse 1110 and keyboard 1120, for example. Video adapter 1060 is connected to display 1130, for example.

ここで、図9に例示するように、ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、上記の、プログラムは、コンピュータ1000によって実行される指令が記述されたプログラムモジュールとして、例えばハードディスクドライブ1090に記憶される。 Here, as illustrated in FIG. 9, the hard disk drive 1090 stores an OS 1091, application programs 1092, program modules 1093, and program data 1094, for example. That is, the above program is stored, for example, in hard disk drive 1090 as a program module in which instructions to be executed by computer 1000 are described.

また、上記実施形態で説明した各種データは、プログラムデータとして、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出し、各種処理手順を実行する。 Various data described in the above embodiments are stored as program data in the memory 1010 or the hard disk drive 1090, for example. Then, the CPU 1020 reads the program modules 1093 and program data 1094 stored in the memory 1010 and the hard disk drive 1090 to the RAM 1012 as necessary, and executes various processing procedures.

なお、プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限られず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ等を介してCPU1020によって読み出されてもよい。あるいは、プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。 Note that the program module 1093 and program data 1094 related to the program are not limited to being stored in the hard disk drive 1090. For example, they may be stored in a removable storage medium and read by the CPU 1020 via a disk drive or the like. . Alternatively, the program module 1093 and program data 1094 related to the program are stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.), and are transmitted via the network interface 1070. It may be read by CPU 1020 .

上記の実施形態やその変形は、本願が開示する技術に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。 The above-described embodiments and modifications thereof are included in the scope of the invention described in the claims and their equivalents, as well as in the technology disclosed in the present application.

1 サービス提供システム
10、10A~10C サービスサーバ
11、21 通信処理部
12、22 制御部
12a 作成部
12b 通知部
12c 取得部
12d エラー処理部
13、23 記憶部
20 トランザクションサーバ
30 APIゲートウェイ
40 ユーザ端末
1 Service Providing System 10, 10A to 10C Service Server 11, 21 Communication Processing Unit 12, 22 Control Unit 12a Creation Unit 12b Notification Unit 12c Acquisition Unit 12d Error Processing Unit 13, 23 Storage Unit 20 Transaction Server 30 API Gateway 40 User Terminal

Claims (4)

複数のサービスサーバと、各サービスサーバのトランザクションを管理するトランザクションサーバとを有するサービス提供システムであって、
各サービスサーバは、
処理の開始時に処理開始を前記トランザクションサーバに通知し、開始した一連の処理のうち、所定の単位ごとの処理が完了するたびに、前記トランザクションサーバに処理データを通知する通知部と、
前記処理の途中でエラーが発生した場合には、前記トランザクションサーバに対して直前に通知した処理データを要求し、当該処理データを前記トランザクションサーバから取得する取得部と、
前記取得部によって取得された処理データを用いて、エラーが発生した際に実行するエラー処理を実行するエラー処理実行部と
を有し、
前記トランザクションサーバは、
前記サービスサーバから処理開始の通知を受信すると、当該処理の状態の遷移を管理する管理部と、
前記サービスサーバから処理データを受信すると、当該処理データを記憶部に格納する格納部と、
前記サービスサーバから処理データの要求を受け付けた場合には、前記記憶部に記憶された処理データを当該サービスサーバに送信する送信部と
を有することを特徴とするサービス提供システム。
A service providing system having a plurality of service servers and a transaction server for managing transactions of each service server,
Each service server
a notification unit that notifies the transaction server of the start of processing at the start of processing, and notifies the transaction server of processing data each time a predetermined unit of processing in a series of started processing is completed;
an acquisition unit that, when an error occurs during the processing, requests the transaction server for the processing data notified immediately before and acquires the processing data from the transaction server;
an error processing execution unit that executes error processing to be executed when an error occurs using the processing data acquired by the acquisition unit;
The transaction server is
a management unit that manages the transition of the state of the processing when a notification of the start of processing is received from the service server;
a storage unit that, upon receiving processing data from the service server, stores the processing data in a storage unit;
and a transmitting unit configured to transmit the processed data stored in the storage unit to the service server when a request for the processed data is received from the service server.
前記管理部は、タイムアウトが発生した場合には、前記記憶部に記憶された処理データを用いてロールバック処理を行うことを特徴とする請求項1に記載のサービス提供システム。 2. The service providing system according to claim 1, wherein, when a timeout occurs, the management section performs rollback processing using the processing data stored in the storage section. 前記通知部は、予め設定された所定の単位ごとの処理が完了するたびに、スナップショットを作成し、前記処理が完了したタイミングをチェックポイントとして、前記スナップショットを前記トランザクションサーバに通知することを特徴とする請求項1に記載のサービス提供システム。 The notification unit is configured to create a snapshot each time a process for each preset unit is completed, and to notify the transaction server of the snapshot with the timing of completion of the process as a checkpoint. 2. The service providing system according to claim 1. 複数のサービスサーバと、各サービスサーバのトランザクションを管理するトランザクションサーバとを有するサービス提供システムによって実行されるサービス提供方法であって、
各サービスサーバが、処理の開始時に処理開始を前記トランザクションサーバに通知し、開始した一連の処理のうち、所定の単位ごとの処理が完了するたびに、前記トランザクションサーバに処理データを通知する通知工程と、
前記トランザクションサーバが、前記サービスサーバから処理開始の通知を受信すると、当該処理の状態の遷移を管理する管理工程と、
前記トランザクションサーバが、前記サービスサーバから処理データを受信すると、当該処理データを記憶部に格納する格納工程と、
前記各サービスサーバが、前記処理の途中でエラーが発生した場合には、前記トランザクションサーバに対して直前に通知した処理データを要求し、当該処理データを前記トランザクションサーバから取得する取得工程と、
前記各サービスサーバが、前記取得工程によって取得された処理データを用いて、エラーが発生した際に実行するエラー処理を実行するエラー処理実行工程と、
前記トランザクションサーバが、前記サービスサーバから処理データの要求を受け付けた場合には、前記記憶部に記憶された処理データを当該サービスサーバに送信する送信工程と
を含むことを特徴とするサービス提供方法。
A service providing method executed by a service providing system having a plurality of service servers and a transaction server for managing transactions of each service server,
A notification step in which each service server notifies the transaction server of the start of processing at the start of processing, and notifies the transaction server of processing data each time a predetermined unit of processing in the series of processing that has been started is completed. When,
a management step of, when the transaction server receives a processing start notification from the service server, managing the state transition of the processing;
a storing step of, when the transaction server receives processing data from the service server, storing the processing data in a storage unit;
an acquisition step of requesting the transaction server for the processing data notified immediately before and acquiring the processing data from the transaction server when an error occurs during the processing;
an error processing execution step in which each service server executes error processing to be executed when an error occurs using the processing data acquired in the acquisition step;
and a transmission step of transmitting, when the transaction server receives a request for processing data from the service server, the processing data stored in the storage unit to the service server.
JP2021173957A 2021-10-25 2021-10-25 Service provision system and service provision method Active JP7196262B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021173957A JP7196262B1 (en) 2021-10-25 2021-10-25 Service provision system and service provision method
JP2022198839A JP7296515B2 (en) 2021-10-25 2022-12-13 Service provision system and service provision method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021173957A JP7196262B1 (en) 2021-10-25 2021-10-25 Service provision system and service provision method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2022198839A Division JP7296515B2 (en) 2021-10-25 2022-12-13 Service provision system and service provision method

Publications (2)

Publication Number Publication Date
JP7196262B1 true JP7196262B1 (en) 2022-12-26
JP2023063893A JP2023063893A (en) 2023-05-10

Family

ID=84600879

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021173957A Active JP7196262B1 (en) 2021-10-25 2021-10-25 Service provision system and service provision method

Country Status (1)

Country Link
JP (1) JP7196262B1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013228803A (en) 2012-04-24 2013-11-07 Nippon Telegr & Teleph Corp <Ntt> Work flow management system, work flow management method, service state management device, and work flow management device
CN108519918A (en) 2018-03-14 2018-09-11 广东能龙教育股份有限公司 Distributed transaction processing method based on transaction chain
CN109165084A (en) 2018-08-20 2019-01-08 四川长虹电器股份有限公司 Distributed transaction management method based on state stream
US20190294504A1 (en) 2018-03-21 2019-09-26 Cisco Technology, Inc. Tracking microservices using a state machine and generating digital display of rollback paths
JP2019169109A (en) 2018-03-26 2019-10-03 富士通株式会社 Information processing device, information processing system and information processing program
WO2019208098A1 (en) 2018-04-23 2019-10-31 日本電信電話株式会社 Coordination process restarting device and coordination process restarting method
US20200257676A1 (en) 2019-02-12 2020-08-13 Ebay Inc. Global distributed transactions across microservices
US20200351392A1 (en) 2019-05-05 2020-11-05 International Business Machines Corporation Achieving atomicity in a chain of microservices

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013228803A (en) 2012-04-24 2013-11-07 Nippon Telegr & Teleph Corp <Ntt> Work flow management system, work flow management method, service state management device, and work flow management device
CN108519918A (en) 2018-03-14 2018-09-11 广东能龙教育股份有限公司 Distributed transaction processing method based on transaction chain
US20190294504A1 (en) 2018-03-21 2019-09-26 Cisco Technology, Inc. Tracking microservices using a state machine and generating digital display of rollback paths
JP2019169109A (en) 2018-03-26 2019-10-03 富士通株式会社 Information processing device, information processing system and information processing program
WO2019208098A1 (en) 2018-04-23 2019-10-31 日本電信電話株式会社 Coordination process restarting device and coordination process restarting method
CN109165084A (en) 2018-08-20 2019-01-08 四川长虹电器股份有限公司 Distributed transaction management method based on state stream
US20200257676A1 (en) 2019-02-12 2020-08-13 Ebay Inc. Global distributed transactions across microservices
US20200351392A1 (en) 2019-05-05 2020-11-05 International Business Machines Corporation Achieving atomicity in a chain of microservices

Also Published As

Publication number Publication date
JP2023063893A (en) 2023-05-10

Similar Documents

Publication Publication Date Title
US10437795B2 (en) Upgrading systems with changing constraints
US11847438B2 (en) Offline capabilities for live applications in a cloud collaboration platform
US10585657B2 (en) Setup, management, and packaging of applications accessing centralized and decentralized data
US10790965B1 (en) Tiered distributed ledger technology (DLT) in a network function virtualization (NFV) core network
US9417985B2 (en) Distributed analysis and attribution of source code
US11153182B2 (en) Resource lifecycle automation
JP6130518B2 (en) Instance host configuration
US20130014102A1 (en) Planned virtual machines
US11010186B2 (en) Non-transitory computer-readable recording medium, adjustment device, and adjustment method
US20100161549A1 (en) Masterless distributed batch scheduling engine
JP2012520504A (en) A programming model for synchronizing the browser cache across devices and web services
Fehling et al. A collection of patterns for cloud types, cloud service models, and cloud-based application architectures
JP2006190279A (en) Method and apparatus for metadata driven business logic processing
US10503428B2 (en) System and method for concurrent multipoint backup
US10698719B2 (en) System and method for virtual machine restoration
JP2017068480A (en) Job management method, job management device, and program
CN110413369B (en) System and method for backup in virtualized environments
US11061779B2 (en) System and method for orchestrated backup in a virtualized environment
CN101145165A (en) Work stream data persistence processing method, device and work flow system
JP7196262B1 (en) Service provision system and service provision method
JP7296515B2 (en) Service provision system and service provision method
CN114546705B (en) Operation response method, operation response device, electronic apparatus, and storage medium
US20220014429A1 (en) Staging configuration changes with deployment freeze options
US10339011B1 (en) Method and system for implementing data lossless synthetic full backups
US20190179722A1 (en) Tool for enterprise-wide software monitoring

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211025

A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20211117

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20221115

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221214

R150 Certificate of patent or registration of utility model

Ref document number: 7196262

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150