JP7258468B2 - Communication system, gateway device and communication method - Google Patents

Communication system, gateway device and communication method Download PDF

Info

Publication number
JP7258468B2
JP7258468B2 JP2018060171A JP2018060171A JP7258468B2 JP 7258468 B2 JP7258468 B2 JP 7258468B2 JP 2018060171 A JP2018060171 A JP 2018060171A JP 2018060171 A JP2018060171 A JP 2018060171A JP 7258468 B2 JP7258468 B2 JP 7258468B2
Authority
JP
Japan
Prior art keywords
server
stage
evaluation
communication
servers
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
JP2018060171A
Other languages
Japanese (ja)
Other versions
JP2019174969A (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.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Digital Solutions 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 Toshiba Corp, Toshiba Digital Solutions Corp filed Critical Toshiba Corp
Priority to JP2018060171A priority Critical patent/JP7258468B2/en
Publication of JP2019174969A publication Critical patent/JP2019174969A/en
Application granted granted Critical
Publication of JP7258468B2 publication Critical patent/JP7258468B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明の実施形態は、通信システム、ゲートウェイ装置および通信方法に関する。 TECHNICAL FIELD Embodiments of the present invention relate to communication systems, gateway devices, and communication methods.

近年のソフトウェア開発では、マイクロサービスと呼ばれる小規模のサービスを複数用意し、それらをAPIゲートウェイで束ねる形でシステムを構築する手法が取り入れられている。 In software development in recent years, a method of building a system by preparing multiple small-scale services called microservices and bundling them with an API gateway has been adopted.

このような手法において、各サービスは、個別に開発されそれぞれ異なる環境で稼働する。また各サービスは、目的が異なることからサービス毎に複数のサーバが利用されている場合があり、サービス利用者(ソフトウェア開発者など)は、サービス接続時に所望のサービスを選択(指定)して利用する必要がある。例として、高性能かつ高価なサーバと低性能かつ安価なサーバの中から所望のサーバのサービスを選択する場合や、テスト用と本番用に用途を分けたサーバの中から所望のサーバのサービスを選択する場合などが考えられる。 In such an approach, each service is developed separately and runs in different environments. In addition, since each service has a different purpose, there are cases where multiple servers are used for each service, and service users (software developers, etc.) select (designate) and use the desired service when connecting to the service. There is a need to. For example, selecting a desired server service from high-performance, expensive servers and low-performance, low-cost servers, or selecting a desired server service from servers divided into test and production purposes. A case of selecting is conceivable.

従来、クラウド上でアプリケーションを利用するためのプラットフォームを提供する例えばアマゾンウェブサービス(「AWS」と称す)などは、クライアントとサーバ(サービス)との中継装置であるアプリケーションプログラミングインターフェースゲートウェイ(以下「APIゲートウェイ」と称す)に、テスト時または本番時といったステージに合わせて各APIの通信先を切り替える通信先切替機能を備える(例えば非特許文献1参照)。 Conventionally, Amazon Web Services (referred to as "AWS"), which provides a platform for using applications on the cloud, has an application programming interface gateway (hereinafter referred to as "API gateway"), which is a relay device between clients and servers (services). ”) has a communication destination switching function for switching the communication destination of each API according to the stage such as testing or production (see, for example, Non-Patent Document 1).

また、他には、例えば複数の通信パターンの設定の中からいくつかを組み合わせることで通信先を自動切替する技術があり(例えば特許文献1参照)、特定のサーバに通信できないときに代替サーバに通信するような設定が容易にできる。 In addition, for example, there is a technique of automatically switching communication destinations by combining some of the settings of a plurality of communication patterns (see, for example, Patent Document 1), and when a specific server cannot be communicated with, an alternative server is used. Communication settings can be easily made.

Amazon API Gateway:https://aws.amazon.com/jp/api-gateway/Amazon API Gateway: https://aws.amazon.com/jp/api-gateway/

特開2013-196460号公報JP 2013-196460 A

しかしながら、上記した従来技術では、以下のような問題がある。
特許文献1に示される従来の技術の場合、通信先の通信パターンをソフトウェア開発者が手動操作で組み合わせて通信先を設定する必要があり、都度、設定作業が必要であり設定コストがかかる。
However, the conventional technology described above has the following problems.
In the case of the conventional technology disclosed in Patent Document 1, a software developer needs to manually combine communication patterns of communication destinations to set communication destinations, and setting work is required each time, which incurs setting costs.

近年のソフトウェア開発のように、APIゲートウェイを用いて複数のサーバのAPIにより提供されるサービスを束ねる場合、多数のAPIに対して通信パターンを手動操作で組み合わせて設定する必要があるため、人手による設定コストがより増大することになる。 As in recent software development, when an API gateway is used to bundle services provided by APIs of multiple servers, it is necessary to manually combine and set communication patterns for a large number of APIs. Configuration costs would be higher.

また、非特許文献1で示される従来の技術では、ステージの設定に際して各APIに対して通信先を手動操作で個別に指定する必要がある。必要なステージ数はサービス数に応じて掛け算式で増えていく可能性があり、この技術においてもステージを増やすたびに各APIに対する設定作業が必要となるため、設定作業のためのコストが膨れ上がる可能性がある。 Further, in the conventional technique disclosed in Non-Patent Document 1, it is necessary to individually specify the communication destination for each API by manual operation when setting the stage. The number of required stages may increase in a multiplicative manner according to the number of services, and even with this technology, setting work for each API is required each time the number of stages is increased, so the cost for setting work will increase. there is a possibility.

本発明が解決しようとする課題は、クライアントからのリクエストをAPIゲートウェイが中継してサーバに渡して処理を実行させ、クライアントのユーザにサービスを提供する上で、人手による通信先の設定作業を削減しつつその時々で最適なサービスをユーザに提供できる通信システム、ゲートウェイ装置および通信方法を提供することにある。 The problem to be solved by the present invention is that the API gateway relays a request from a client and passes it to a server for processing, thereby reducing the manual work of setting communication destinations in providing services to client users. To provide a communication system, a gateway device, and a communication method capable of providing a user with an optimum service at any given time while maintaining the same.

実施形態のゲートウェイ装置は、環境パラメータ取得部、仕様情報記憶部、評価条件記憶部、ステージ判定部、サーバパラメータ取得部、通信先選定部、通信処理部を備える。環境パラメータ取得部はゲートウェイ装置の側で検出可能なシステムの環境パラメータを取得する。仕様情報記憶部には各サーバと各サーバで動作するアプリケーションプログラム(API)とで実現されるマイクロサービスの情報と、ネットワーク上における各サーバの所在情報とを含む仕様情報が記憶されている。評価条件記憶部には各サーバでアプリケーションプログラムが動作しているステージを評価するための第1評価条件(ステージ評価式)と、ステージ毎に前記サーバの機能がリクエストを処理可能か否かを評価するための第2評価条件(サーバ評価式)とが記憶されている。ステージ判定部は取得されたシステムの環境パラメータを基に第1評価条件を満たす現在のステージを判定する。サーバパラメータ取得部は各サーバに存在する機能を実数化したサーバパラメータを取得する。通信先選定部は取得されたサーバパラメータと仕様情報を基に、ステージ判定部により判定されたステージに対応する第2評価条件を満たす通信先のサーバの候補を選定する。通信処理部は通信先選定部により選定されたサーバの候補へ通信を順次試みる。 The gateway device of the embodiment includes an environmental parameter acquisition section, a specification information storage section, an evaluation condition storage section, a stage determination section, a server parameter acquisition section, a communication destination selection section, and a communication processing section. The environment parameter acquisition unit acquires system environment parameters that can be detected by the gateway device. The specification information storage unit stores specification information including microservice information realized by each server and an application program (API) operating on each server, and location information of each server on the network. The evaluation condition storage unit stores a first evaluation condition (stage evaluation formula) for evaluating the stage in which the application program is running on each server, and whether or not the function of the server can process the request for each stage. A second evaluation condition (server evaluation formula) for The stage determination unit determines the current stage that satisfies the first evaluation condition based on the acquired environmental parameters of the system. The server parameter acquisition unit acquires server parameters obtained by converting functions existing in each server into real numbers. The communication destination selection unit selects communication destination server candidates that satisfy the second evaluation condition corresponding to the stage determined by the stage determination unit based on the acquired server parameters and specification information. The communication processing unit sequentially attempts communication with the server candidates selected by the communication destination selection unit.

実施形態のアプリケーションシステムの構成を示す図である。It is a figure which shows the structure of the application system of embodiment. ステージ情報テーブルの一例を示す図である。It is a figure which shows an example of a stage information table. API情報テーブルの一例を示す図である。It is a figure which shows an example of an API information table. サーバ情報テーブルの一例を示す図である。It is a figure which shows an example of a server information table. 環境パラメータテーブルの一例を示す図である。It is a figure which shows an example of an environmental parameter table. サーバパラメータテーブルの一例を示す図である。It is a figure which shows an example of a server parameter table. このアプリケーションシステムの全体的な動作を示すフローチャートである。4 is a flow chart showing the overall operation of this application system; このアプリケーションシステムにおいて現在のステージを判定する動作を示すフローチャートである。4 is a flow chart showing the operation of determining the current stage in this application system; このアプリケーションシステムにおいて通信先のサーバを判定する動作を示すフローチャートである。4 is a flow chart showing an operation of determining a communication destination server in this application system; このアプリケーションシステムにおいて通信動作を示すフローチャートである。4 is a flowchart showing communication operations in this application system;

以下、図面を参照して、実施形態を詳細に説明する。
(実施形態)
図1は通信システムの一つの実施の形態のアプリケーションシステムの構成を示す図である。
Hereinafter, embodiments will be described in detail with reference to the drawings.
(embodiment)
FIG. 1 is a diagram showing the configuration of an application system in one embodiment of a communication system.

図1に示すように、実施形態のアプリケーションシステムは、サーバコンピュータとしての複数のアプリケーションサーバ41~44(以下「サーバ41~44」と称す)により提供されるマイクロサービスMS_1、MS_2(以下「サービスMS_1、MS_2」と称す)とクライアントコンピュータとしてのクライアントC1とをネットワーク1を介して接続し、互いの間にゲートウェイ装置としてAPIゲートウェイ2を介在させ、サーバ41~44とクライアントC1間の通信をAPIゲートウェイ2が中継するネットワークシステムである。 As shown in FIG. 1, the application system of the embodiment includes microservices MS_1 and MS_2 (hereinafter "service MS_1 , MS_2") and a client C1 as a client computer are connected via a network 1, an API gateway 2 is interposed between them as a gateway device, and communication between the servers 41 to 44 and the client C1 is performed by the API gateway. 2 is a relay network system.

複数のサーバ41~44のうち、サーバ41、42はサービスMS_1を提供する。サーバ41のサーバ名を「1_1」とし、サーバ42のサーバ名を「1_2」とする。 Of the plurality of servers 41-44, servers 41 and 42 provide service MS_1. Assume that the server name of the server 41 is "1_1" and the server name of the server 42 is "1_2".

複数のサーバ41~44のうち、サーバ43、44はサービスMS_2を提供する。サーバ43のサーバ名を「2_1」とし、アプリケーションサーバ44のサーバ名を「2_2」とする。 Of the plurality of servers 41-44, servers 43 and 44 provide service MS_2. Assume that the server name of the server 43 is "2_1" and the server name of the application server 44 is "2_2".

サービスMS_1、MS_2を提供する各サーバ41~44は、ウェブ上で処理を行うソフトウェアまたは処理コンポーネントとしてのアプリケーションプログラミングインタフェース(以下「API」と称す)を有する。 Each of the servers 41-44 that provide the services MS_1 and MS_2 has an application programming interface (hereinafter referred to as "API") as software or processing components that perform processing on the web.

APIはクライアントC1よりAPIゲートウェイ2を通じて受信された処理依頼のリクエストによりデータ処理を実行するWeb利用可能なプログラムモジュールである。 The API is a Web-enabled program module that executes data processing in response to a processing request received from the client C1 through the API gateway 2. FIG.

APIは、サーバ、クライアントなどのコンピュータが有するソフトウェアコンポーネントが互いにやりとりするのに使用するインタフェースプログラムである。ネットワーク1は、インターネットを含む通信回線である。 An API is an interface program used by computer software components such as servers and clients to communicate with each other. A network 1 is a communication line including the Internet.

サーバ41~44、クライアントC1、APIゲートウェイ2は、ハードウェアとして、CPU、メモリ、通信インタフェースなどを有するコンピュータである。 The servers 41 to 44, the client C1, and the API gateway 2 are computers having CPUs, memories, communication interfaces, etc. as hardware.

クライアントC1には、JavaScript(登録商標)が実行可能なウェブブラウザなどのソフトウェアコンポーネントがインストールされている。ウェブブラウザは、サーバ41~44へのアクセスによりサーバ41~44のAPIより各種機能の入力画面を表示可能である。 A software component such as a web browser capable of executing JavaScript (registered trademark) is installed in the client C1. The web browser can display input screens for various functions from the APIs of the servers 41 to 44 by accessing the servers 41 to 44 .

入力画面には、例えばアンケート調査などのようにクライアントC1の操作者がテキストデータ(文字など)を直接キー入力するための入力ボックスが表示される。入力ボックスに入力されたデータは、ネットワーク1およびAPIゲートウェイ2を経由してサーバ41~44のうちの対象のAPIに送られて処理される。 The input screen displays an input box for the operator of the client C1 to directly key-input text data (characters, etc.), such as for a questionnaire survey. The data entered in the input box is sent to the target API among the servers 41 to 44 via the network 1 and API gateway 2 and processed.

APIゲートウェイ2は、上記ハードウェアにより実現される機能構成として、記憶部20、環境パラメータ取得部27、サーバパラメータ取得部28、通信先選択部29、制御部30、通信管理部31、編集部34などを有する。 The API gateway 2 includes a storage unit 20, an environment parameter acquisition unit 27, a server parameter acquisition unit 28, a communication destination selection unit 29, a control unit 30, a communication management unit 31, an editing unit 34, as a functional configuration realized by the above hardware. and so on.

記憶部20には、評価条件としての評価条件テーブル21、API情報テーブル22およびサーバ情報テーブル23などの仕様情報テーブル24、環境パラメータテーブル25、サーバパラメータテーブル26などが記憶されている。API情報テーブル22には、サーバ41~44で動作するAPIの仕様情報(図3参照)が記憶されている。サーバ情報テーブル23には、サーバ41~44の仕様情報(図4参照)が記憶されている。通信管理部31は、通信処理部32と通信エラー通知部33を有する。 The storage unit 20 stores an evaluation condition table 21 as evaluation conditions, specification information tables 24 such as an API information table 22 and a server information table 23, an environment parameter table 25, a server parameter table 26, and the like. The API information table 22 stores specification information (see FIG. 3) of APIs that operate on the servers 41-44. The server information table 23 stores specification information (see FIG. 4) of the servers 41-44. The communication management section 31 has a communication processing section 32 and a communication error notification section 33 .

図2に示すように、評価条件テーブル21には、システム全体の環境や状況を示すステージを評価するためのステージ評価式(第1評価条件)、サーバ評価式(第2評価条件)などがステージの識別情報(ステージID)およびステージ名毎に記憶されている。ステージ評価式は、ステージに該当するかどうかを評価するための論理式である。この論理式に、取得した環境パラメータを代入することで計算結果として得られる値が予め設定された閾値を満たすか否かが評価条件である。 As shown in FIG. 2, the evaluation condition table 21 includes a stage evaluation formula (first evaluation condition), a server evaluation formula (second evaluation condition), and the like for evaluating the stage indicating the environment and situation of the entire system. identification information (stage ID) and each stage name. The stage evaluation formula is a logical formula for evaluating whether or not the item corresponds to the stage. An evaluation condition is whether or not a value obtained as a calculation result by substituting the acquired environmental parameter into this logical expression satisfies a preset threshold value.

例えばサービスの実施段階がテスト段階であることを表すステージの判別式を、Process=testとし、本番段階(運用段階)であることを表すステージの判別式を、Process=prodとする。また、現在時刻が昼であることを表すステージの判別式は、1000 < Time < 2000とする。このようにステージの判別結果を実数(数値)で得たり、または「正」、「否」の2値で得たり、コマンドで得てもよい。 For example, let Process=test be the discriminant of the stage that indicates that the implementation stage of the service is the test stage, and Process=prod be the discriminant of the stage that indicates that the service is in the production stage (operation stage). Also, the stage discriminant expressing that the current time is daytime is 1000<Time<2000. In this way, the determination result of the stage may be obtained as a real number (numerical value), as a binary value of "positive" or "no", or as a command.

サーバ評価式は、当該ステージにおいてサーバ評価の基準となる計算式であり、ステージに毎に設定されている。ステージを特定した後、特定したステージに対応する計算式に、取得したサーバパラメータを代入することで計算結果として得られる数値の大きさによって、通信先候補としてのサーバの順位が決定する。 The server evaluation formula is a calculation formula that serves as a reference for server evaluation in the relevant stage, and is set for each stage. After specifying the stage, the ranking of the server as a communication destination candidate is determined by the magnitude of the numerical value obtained as a calculation result by substituting the acquired server parameter into the calculation formula corresponding to the specified stage.

すなわち、評価条件テーブル21は、各サーバ41~44でAPIが動作しているステージを評価するためのステージ評価式と、ステージ毎にサーバ41~44の機能がクライアントC1からのリクエストを処理可能か否かを評価するためのサーバ評価式とが記憶された評価条件記憶部として機能する。 That is, the evaluation condition table 21 includes a stage evaluation formula for evaluating the stage in which the API is running on each server 41 to 44, and whether the functions of the servers 41 to 44 can process the request from the client C1 for each stage. It functions as an evaluation condition storage unit that stores a server evaluation expression for evaluating whether or not.

仕様情報テーブル24は、各サーバ41~44と各サーバ41~44で動作するAPIとで実現されるマイクロサービスの情報(マイクロサービスID)と、ネットワーク1上における各サーバ41~44の所在情報(ロケーション)とを含む仕様情報が記憶された仕様情報記憶部として機能する。 The specification information table 24 includes information (microservice ID) of microservices implemented by the servers 41 to 44 and APIs that operate on the servers 41 to 44, and location information of the servers 41 to 44 on the network 1 ( (location) is stored as a specification information storage unit.

例えば図3に示すように、API情報テーブル22には、APIのID毎に、APIの名称であるAPI名と通信先のマイクロサービスIDとが対応して記憶される。 For example, as shown in FIG. 3, the API information table 22 stores, for each API ID, the API name, which is the name of the API, and the microservice ID of the communication destination in association with each other.

図4に示すように、サーバ情報テーブル23には、サーバのID毎に、各サーバ41~44のネットワーク1上のロケーション(所在情報)とマイクロサービスIDとサーバ名が記憶されている。 As shown in FIG. 4, the server information table 23 stores the location (location information) of each server 41 to 44 on the network 1, the microservice ID, and the server name for each server ID.

環境パラメータ取得部27は、APIゲートウェイ2の側で検出可能なシステムの環境パラメータを取得する。この環境パラメータは、例えば現在時刻(Time)、時間帯(Time zone)、カレンダ(week,day)、サービスの実施段階(Process:テスト段階(test)か本番段階(prod)か)、このゲートウェイ2を中継するデータの通信量の総計、有料サーバの利用金額の合計(課金総額:Billing)といった、システム全体に対して一意に定まる変数であり、それぞれについて取得モジュール27a~27nが設けられている。各取得モジュール27a~27nは、通信先選択部29からの要求に応じてこれらの値を一意に取得できるように実装されている。 The environment parameter acquisition unit 27 acquires system environment parameters detectable on the API gateway 2 side. The environment parameters are, for example, the current time (Time), time zone (Time zone), calendar (week, day), service implementation stage (Process: test stage (test) or production stage (prod)), this gateway 2 , and the total amount of usage of pay servers (total billing: Billing), which are uniquely determined for the entire system, and acquisition modules 27a to 27n are provided for each. Each acquisition module 27a to 27n is implemented so as to uniquely acquire these values in response to a request from the communication destination selection unit 29. FIG.

また、環境パラメータ取得部27が返す値がステージ評価式に代入された結果が現在の状況に該当するか否かを表すものである必要があるため、評価式は、論理式で表し、評価結果は真理値(数値)であることが望ましい。 In addition, the value returned by the environment parameter acquisition unit 27 must indicate whether the result of substituting the stage evaluation formula corresponds to the current situation. is preferably a truth value (numerical value).

図5に示すように、環境パラメータテーブル25は、環境パラメータID毎に変数名とその変数名の値(パラメータ値)が対応して記憶される。変数名の値(パラメータ値)は、環境パラメータ取得部27により取得された値が入る。この例では、変数名として、課金額Billing、段階Processを例に挙げているが、この他、例えば時刻、サーバの課金総額、サーバの動作状況またはサーバで稼働しているAPIの動作状況などが考えられる。 As shown in FIG. 5, the environment parameter table 25 stores a variable name and a value (parameter value) of the variable name corresponding to each environment parameter ID. The value of the variable name (parameter value) contains the value acquired by the environment parameter acquisition unit 27 . In this example, billing amount Billing and stage Process are used as variable names, but other variables include time, server total billing amount, server operation status, or API operation status running on the server. Conceivable.

サーバパラメータ取得部28は、各サーバ41~44に存在する機能や性能を実数化したサーバパラメータを取得する。このサーバパラメータは、一例として、例えばサーバの性能、利用料(課金額)、バージョン(テスト版、本番用など)、バグの有無といった、サーバ毎に一意に定まるサーバ固有の性質を表す値(属性情報)である。 The server parameter acquisition unit 28 acquires server parameters that represent the functions and performance of each of the servers 41 to 44 in real numbers. These server parameters are, for example, values (attribute information).

サーバパラメータ取得部28は、複数の取得モジュール28a~28nを有する。各取得モジュール28a~28nは、それぞれ性能を取得するプログラム、利用料(課金額)を取得するプログラムといったようにパラメータ毎に設けられおり、パラメータは、利用しているサーバの数の分だけ取得される。 The server parameter acquisition unit 28 has a plurality of acquisition modules 28a-28n. Each of the acquisition modules 28a to 28n is provided for each parameter, such as a program for acquiring performance and a program for acquiring a usage fee (accounting amount), and parameters are acquired for the number of servers in use. be.

図6に示すように、サーバパラメータテーブル26は、サーバパラメータID毎に変数名とそのサーバIDと変数名の値(パラメータ値)が対応して記憶される。変数名の値(パラメータ値)は、サーバパラメータ取得部28により取得された値が入る。この例では、変数名として、課金額Billing、運用段階Version_newestを例に挙げている。 As shown in FIG. 6, the server parameter table 26 stores a variable name, its server ID, and the value of the variable name (parameter value) in association with each server parameter ID. A value obtained by the server parameter obtaining unit 28 is entered as the value of the variable name (parameter value). In this example, billing amount Billing and operation stage Version_newest are used as variable names.

通信先選択部29は、取得されたシステムの環境パラメータを基にステージ評価式を満たす現在のステージ(テストか本番か)を判定するステージ判定部として機能する。具体的には、通信先選択部29は、環境パラメータを、評価条件として設定されている異なる複数のステージ評価式(stage_1,stage_2,…)に代入し、ステージ毎に評価し、評価結果の中から、評価のよいステージを現在のステージとして特定する。 The communication destination selection unit 29 functions as a stage determination unit that determines the current stage (test or production) that satisfies the stage evaluation formula based on the acquired environmental parameters of the system. Specifically, the communication destination selection unit 29 substitutes the environmental parameters into a plurality of different stage evaluation formulas (stage_1, stage_2, . . . ) set as evaluation conditions, evaluates each stage, , identify the stage with the best rating as the current stage.

また、通信先選択部29は、サーバパラメータ取得部28により取得されたサーバパラメータを基に、判定したステージに対応するサーバ評価式を満たす通信先のサーバの候補を選定する。より具体的には、通信先選択部29は、サーバ評価式を満たす通信先候補のサーバのリストを生成し、生成したリストにおいて評価結果のよい通信先候補の順にサーバに優先度を付与して制御部30を通じて通信処理部32に渡す。 Further, the communication destination selection unit 29 selects communication destination server candidates that satisfy the server evaluation formula corresponding to the determined stage based on the server parameters acquired by the server parameter acquisition unit 28 . More specifically, the communication destination selection unit 29 generates a list of communication destination candidate servers that satisfy the server evaluation formula, and assigns priority to the servers in order of the communication destination candidates with the best evaluation results in the generated list. It is passed to the communication processing section 32 through the control section 30 .

制御部30は、クライアントC1からのAPIリクエストをリクエスト先のサーバ(サーバ41~44のいずれか)へ中継する制御を行う。また、制御部30は、下記各部を制御する。 The control unit 30 performs control to relay an API request from the client C1 to a server (one of the servers 41 to 44) that is the request destination. Also, the control unit 30 controls the following units.

通信管理部31は、通信先選定部29から制御部30を通じてサーバリストを受け取り、サーバリストに従ってサーバと通信を行う。通信処理部32は、通信先選定部29により選定されたサーバ(サーバ41~44のいずれか)の候補へ通信を順次試みる。この際、通信処理部32は、渡されたサーバリストに記載されているサーバIDのうち優先度の高い候補の順にサーバへ通信を試みる。 The communication management unit 31 receives the server list from the communication destination selection unit 29 through the control unit 30, and communicates with the server according to the server list. The communication processing unit 32 sequentially attempts communication with the server candidates (one of the servers 41 to 44) selected by the communication destination selection unit 29. FIG. At this time, the communication processing unit 32 attempts to communicate with the server in order of priority among the server IDs described in the delivered server list.

通信処理部32は、候補の全てのサーバへ通信を試みた結果、通信が失敗、つまり通信エラーが生じた際に通信エラー通知部33に対して通信エラーを返すよう指示する。通信エラー通知部33は、この指示に従い制御部30に通信エラーを返す。そして、制御部30は、通信エラーをクライアントC1へ返す。 The communication processing unit 32 instructs the communication error notification unit 33 to return a communication error when the communication fails, that is, when a communication error occurs as a result of trying to communicate with all the candidate servers. The communication error notification unit 33 returns a communication error to the control unit 30 according to this instruction. Then, the control unit 30 returns a communication error to the client C1.

編集部34は、管理者のPCからのアクセスにより、評価条件テーブル21の内容を編集するための編集画面を管理者のPCに表示し、編集画面にて評価条件テーブル21の内容を編集可能である。 The editing unit 34 displays an editing screen for editing the contents of the evaluation condition table 21 on the administrator's PC by accessing from the administrator's PC, and can edit the contents of the evaluation condition table 21 on the editing screen. be.

以下、図7乃至図10のフローチャートを参照してこの実施形態のアプリケーションシステムの動作を説明する。図7はこのアプリケーションシステムの全体的な動作を示すフローチャートである。 The operation of the application system of this embodiment will be described below with reference to the flow charts of FIGS. 7 to 10. FIG. FIG. 7 is a flow chart showing the overall operation of this application system.

まず、図7のフローチャートを参照してAPIゲートウェイ2においてクライアントC1よりAPIリクエストを受け取ってから通信対象のサーバに対して通信を中継するまでの処理動作を説明する。 First, the processing operation from receiving an API request from the client C1 in the API gateway 2 to relaying the communication to the communication target server will be described with reference to the flowchart of FIG.

APIゲートウェイ2では、制御部30が、クライアントC1からAPIリクエストが受信されるのを待機しており(図7のステップS101のNo、ステップS102)、クライアントC1からのAPIリクエストを受け取ると(図7のステップS101のYes)、制御部30は、通信先選択部29に対して通信先のサーバの候補のリスト(サーバリスト)の生成を指示する(ステップS103)。 In the API gateway 2, the control unit 30 waits for an API request to be received from the client C1 (No in step S101 in FIG. 7, step S102), and when it receives an API request from the client C1 (FIG. 7 (Yes in step S101), the control unit 30 instructs the communication destination selection unit 29 to generate a list of communication destination server candidates (server list) (step S103).

このとき、制御部30は、クライアントC1から受け取ったAPIリクエストがどのAPIに対するものであるかを示す要求先情報を通信先選択部29に伝達する。要求先情報はAPIリクエストに含まれている。 At this time, the control unit 30 transmits request destination information indicating to which API the API request received from the client C1 is directed to the communication destination selection unit 29 . Request destination information is included in the API request.

制御部30からの指示を受けた通信先選択部29は、環境パラメータ取得部27が取得した環境パラメータ(時刻、サーバの課金総額、サーバの動作状況またはサーバで稼働しているAPIの動作状況など)を用いて、通信先の現在のステージを特定(判定)する(ステップS104)。なお、このステージ特定の動作については、後述の図8のフローチャートを参照した説明で詳細に説明する。 The communication destination selection unit 29 receives an instruction from the control unit 30, and the environment parameters acquired by the environment parameter acquisition unit 27 (the time, the total billing amount of the server, the operation status of the server, the operation status of the API running on the server, etc.) ) to identify (determine) the current stage of the communication destination (step S104). The operation of specifying the stage will be described in detail later with reference to the flowchart of FIG.

通信先選択部29は、ステージの特定と共に、取得したサーバパラメータをサーバ評価式に代入して、サーバの性能や状態などを評価する。 Along with identifying the stage, the communication destination selection unit 29 substitutes the acquired server parameters into the server evaluation formula to evaluate the performance, state, and the like of the server.

通信先選択部29は、特定したステージの条件を満たすサーバのサーバIDを、そのステージで動作しているサーバの所在情報とマイクロサービスで利用するAPIの情報を仕様情報テーブル24(サーバ情報テーブル23およびAPI情報テーブル22)から抽出し、読み出したサーバの情報およびAPIの情報を用いて通信先となり得るサーバの候補を選定し、通信先候補のサーバリストを生成し、制御部30に渡す(ステップS105)。なお、通信先のサーバを選定する動作については、後述の図9のフローチャートを参照した説明で詳細に説明する。 The communication destination selection unit 29 stores the server ID of the server that satisfies the conditions of the identified stage, the location information of the server operating in that stage, and the API information used in the microservices in the specification information table 24 (server information table 23). and API information table 22), select server candidates that can be communication destinations using the read server information and API information, generate a server list of communication destination candidates, and pass it to the control unit 30 (step S105). The operation of selecting a communication destination server will be described in detail later with reference to the flowchart of FIG.

制御部30は、クライアントC1から受信したAPIリクエストと、通信先選択部29により生成された通信先候補のサーバリストとを通信管理部31に渡す(ステップS106)。 The control unit 30 passes the API request received from the client C1 and the server list of communication destination candidates generated by the communication destination selection unit 29 to the communication management unit 31 (step S106).

通信管理部31は、制御部30から渡されたサーバリストに記載されている優先度が上位のサーバIDから順にサーバと通信を実行し(ステップS107)、通信により得られた通信結果を制御部30へ返す。 The communication management unit 31 executes communication with the servers in order from the highest priority server ID described in the server list passed from the control unit 30 (step S107), and sends the communication result obtained by the communication to the control unit. Return to 30.

制御部30は、通信管理部31から受け取った通信結果をクライアントC1に返す(ステップS108)。 The control unit 30 returns the communication result received from the communication management unit 31 to the client C1 (step S108).

図8のフローチャートを参照して上記S104のステージ特定動作を詳細に説明する。
この処理では、通信先選択部29は、評価条件テーブル21から読み出したステージ情報に含まれるステージ評価式を用いて現在のステージを特定(判定)する。
The stage specifying operation of S104 will be described in detail with reference to the flowchart of FIG.
In this process, the communication destination selection unit 29 identifies (determines) the current stage using the stage evaluation formula included in the stage information read from the evaluation condition table 21 .

この場合、通信先選択部29は、まず、ステージの評価条件、つまり図2の評価条件テーブル21のステージ評価式を読み出し(ステップS201)、環境パラメータ取得部27に対してシステム内外を含めた全ての環境パラメータを要求する(ステップS202)。 In this case, the communication destination selection unit 29 first reads the stage evaluation condition, that is, the stage evaluation formula of the evaluation condition table 21 in FIG. environmental parameters are requested (step S202).

環境パラメータ取得部27は、各取得モジュール27a~27nを用いて環境パラメータを取得し(ステップS203)、それを通信先選択部29に返す。 The environmental parameter acquisition unit 27 acquires environmental parameters using the acquisition modules 27 a to 27 n (step S 203 ) and returns them to the communication destination selection unit 29 .

通信先選択部29は、環境パラメータ取得部27が取得した環境パラメータを受け取ると、受け取った環境パラメータを、全てのステージ評価式(ステージID"stage_1","stage_2"…ステージID"stage_4")に代入し、ステージ毎にサーバの現在のステージを評価する(ステップS204)。 When the communication destination selection unit 29 receives the environment parameters acquired by the environment parameter acquisition unit 27, the communication destination selection unit 29 applies the received environment parameters to all stage evaluation formulas (stage IDs "stage_1", "stage_2", ... stage IDs "stage_4"). and evaluate the current stage of the server for each stage (step S204).

そして、各ステージ評価式で評価した中から、評価のよいもの(具体的には条件式ならば評価結果が正しいか条件を満たすもの、また関数式ならば高い数値のもの)を、そのサーバの現在のステージとして判定、つまりステージを特定する(ステップS205)。 Then, among those evaluated by each stage evaluation formula, the one with the best evaluation (specifically, if the evaluation result is correct for a conditional formula, or if it is a function formula, one with a high numerical value) is assigned to that server. The current stage is determined, that is, the stage is specified (step S205).

ここで、図2の評価条件テーブル21のステージ評価式内の変数Billingや変数Processは、各環境パラメータに該当しており、取得した環境パラメータの値を評価式に代入する。例えば変数Bllingと変数Processについて、取得した環境パラメータが"1500","test"であれば、ステージID"stage_1"の評価式は「否」、ステージID"stage_2"の評価式は「正」、ステージID"stage_3"の評価式は「否」、ステージID"stage_4"の評価式は「否」となり、この中から、評価として正しい値、つまり評価結果が「正」のステージID"stage_2"を現在のステージとして判定する。 Here, the variable Billing and the variable Process in the stage evaluation formula of the evaluation condition table 21 of FIG. 2 correspond to each environmental parameter, and the value of the acquired environmental parameter is substituted into the evaluation formula. For example, for the variable Blling and the variable Process, if the acquired environment parameters are "1500" and "test", the evaluation formula for the stage ID "stage_1" is "No", the evaluation formula for the stage ID "stage_2" is "Positive", The evaluation formula for stage ID "stage_3" is "fail", and the evaluation formula for stage ID "stage_4" is "fail". Determine as the current stage.

なお、ここで示した評価式は、一例であり、上記条件式(選択式)の他に、例えば変数を用いた多項式(F1(X1,X2,…Xn)など)で表現してもよく、取得した環境パラメータを各変数X1,X2,…Xnに代入することで、各ステージの評価結果が真理値で表現される。この中から、評価結果の実数が最大となるステージを現在のステージとして特定(判定)する。 Note that the evaluation formula shown here is just an example, and in addition to the above conditional formula (selection formula), it may be expressed by, for example, a polynomial formula using variables (F1 (X1, X2, . . . Xn), etc.). By substituting the acquired environmental parameters into the variables X1, X2, . Among these, the stage with the largest real number of evaluation results is specified (determined) as the current stage.

図9のフローチャートを参照して上記S105の通信先のサーバの選定動作を詳細に動作を説明する。
この処理では、通信先選択部29は、評価条件テーブル21よりサーバの評価条件、つまり図2の評価条件テーブル21のサーバ評価式を読み出す(ステップS301)。
The operation of selecting the communication destination server in S105 will be described in detail with reference to the flow chart of FIG.
In this process, the communication destination selection unit 29 reads the evaluation condition of the server from the evaluation condition table 21, that is, the server evaluation formula of the evaluation condition table 21 of FIG. 2 (step S301).

続いて、通信先選択部29は、サーバパラメータ取得部28に対して全サーバパラメータを要求する(ステップS302)。 Subsequently, the communication destination selection unit 29 requests all server parameters from the server parameter acquisition unit 28 (step S302).

この要求を受けたサーバパラメータ取得部28は、各取得モジュール28a~28nを用いてそれぞれ対応するサーバパラメータを取得する(ステップS303)。 The server parameter acquisition unit 28 that has received this request acquires the corresponding server parameters using the acquisition modules 28a to 28n (step S303).

サーバパラメータ取得部28の各取得モジュール28a~28nが通信先選択部29に返す値は、環境パラメータと同様に、通信先選択部29が読み出したサーバ評価式(図2参照)に代入して評価(閾値と比較)するため、実数であることが望ましい。但し、通信不可となるサーバを表す場合は、例外値(exception)を利用する。 The values returned by the acquisition modules 28a to 28n of the server parameter acquisition unit 28 to the communication destination selection unit 29 are evaluated by substituting them into the server evaluation formula (see FIG. 2) read by the communication destination selection unit 29, similarly to the environment parameters. (compared with a threshold), preferably a real number. However, when representing a server that cannot be communicated with, an exception value is used.

通信先選択部29は、サーバパラメータ取得部28が取得したサーバパラメータをサーバパラメータ取得部28から受け取り、受け取ったサーバパラメータを、上記S104の処理で判定したステージIDのステージに含まれるサーバ評価式に代入し、評価値を算出し記憶する(ステップS304)。 The communication destination selection unit 29 receives the server parameters acquired by the server parameter acquisition unit 28 from the server parameter acquisition unit 28, and applies the received server parameters to the server evaluation formula included in the stage of the stage ID determined in the process of S104. Then, the evaluation value is calculated and stored (step S304).

ここで利用するサーバ評価式は、図8の処理で判定したステージIDの"stage2"に対応するサーバ評価式、つまり「-billing+version_newest」である。 The server evaluation formula used here is the server evaluation formula corresponding to the stage ID "stage2" determined in the process of FIG. 8, that is, "-billing+version_newest".

サーバパラメータの取得結果が、図6に示すように、サーバパラメータテーブル26の値であった場合、各値をサーバ評価式に代入すると、サーバ41(1_1)の計算結果(評価値)は、-1000+1="-999"、サーバ42(1_2)の計算結果(評価値)は、-10+1="-9"、サーバ43(2_1)の計算結果(評価値)は、0+1="1"、サーバ44(2_2)の計算結果(評価値)は、0+exception="例外"となる。 If the server parameter acquisition result is the value of the server parameter table 26 as shown in FIG. 1000+1="-999", the calculation result (evaluation value) of the server 42(1_2) is -10+1="-9", the calculation result (evaluation value) of the server 43(2_1) is 0+1 ="1", and the calculation result (evaluation value) of the server 44 (2_2) is 0+exception="exception".

このように取得したサーバパラメータをサーバ評価式の各変数に代入することで、そのステージでの評価計算を行い、各サーバの評価結果として実数を算出する。但し、サーバ44(2_2)の計算結果(評価値)のように例外値が評価結果となった場合は、そのサーバは、通信不可と判定する。 By substituting the server parameters acquired in this way for each variable of the server evaluation formula, the evaluation calculation at the stage is performed, and a real number is calculated as the evaluation result of each server. However, if the evaluation result is an exceptional value like the calculation result (evaluation value) of the server 44(2_2), the server determines that communication is impossible.

通信先選択部29は、仕様情報テーブル24より、リクエストされたAPIを有する接続先とすべき候補のサーバIDとそのロケーションを取得し、サーバIDとそのロケーションとが対応した接続先候補のサーバリストを生成する(ステップS305)。 The communication destination selection unit 29 acquires the server IDs of the connection destination candidates having the requested API and their locations from the specification information table 24, and creates a server list of connection destination candidates corresponding to the server IDs and their locations. is generated (step S305).

ここでは、まず、リクエストに含まれるAPIIDにて通信するマイクロサービスIDをAPI情報テーブル22から取得する。続いて、通信先選択部29は、取得したマイクロサービスIDのマイクロサービスに含まれるサーバIDとそのロケーション(ネットワーク1上のサーバの所在情報)をサーバ情報テーブル23から取得し、これらに基づいて接続先候補のサーバリストを生成する。 Here, first, the microservice ID to be communicated with the API ID included in the request is obtained from the API information table 22 . Subsequently, the communication destination selection unit 29 acquires the server ID and its location (location information of the server on the network 1) included in the microservice of the acquired microservice ID from the server information table 23, and establishes a connection based on these. Generate a server list of candidate destinations.

通信先選択部29は、生成した接続先候補のサーバリストの各サーバIDに優先度を付与(評価値の高いサーバIDの順に1から番号を振って順位付け)し(ステップS306)、優先度を付与した接続先候補のサーバリストを制御部30に返す(ステップS307)。なお、評価結果で例外値となっているサーバは、通信不可と判定し、リストから除外する。上記評価結果では、計算結果(評価値)から、サーバ44(2_2)を除いたサーバ41(1_1)、サーバ42(1_2)、サーバ43(2_1)がサーバリストに載せられる。 The communication destination selection unit 29 assigns a priority to each server ID in the generated server list of connection destination candidates (ranks the server ID by assigning a number starting from 1 in descending order of the evaluation value) (step S306). to the control unit 30 (step S307). A server with an exceptional value in the evaluation result is determined to be incapable of communication and is excluded from the list. In the above evaluation result, the server 41(1_1), the server 42(1_2), and the server 43(2_1) except for the server 44(2_2) are listed on the server list from the calculation result (evaluation value).

図10のフローチャートを参照して上記S107の通信動作を詳細に説明する。
通信監理部31では、通信処理部32が、制御部30から受け取った情報(通信先候補のサーバリストとAPIリクエスト等)に含まれる通信先候補のサーバリストから、最も優先度の高いサーバIDを選択して当該サーバと通信を実行する(図10のステップS401)。
The communication operation of S107 will be described in detail with reference to the flow chart of FIG.
In the communication management unit 31, the communication processing unit 32 selects the server ID with the highest priority from the communication destination candidate server list included in the information (communication destination candidate server list, API request, etc.) received from the control unit 30. Select and execute communication with the server (step S401 in FIG. 10).

ここで、通信に成功した場合(ステップS402のNo)、通信処理部32は、当該サーバの通信を終了して、サーバから受け取った通信結果を制御部30に返す(ステップS403)。 Here, if the communication is successful (No in step S402), the communication processing unit 32 terminates the communication with the server and returns the communication result received from the server to the control unit 30 (step S403).

一方、通信に失敗した場合(ステップS402のYes)、通信処理部32は、通信に失敗したサーバのサーバIDを通信先候補のサーバリストから除外する(ステップS404)。 On the other hand, if communication fails (Yes in step S402), the communication processing unit 32 excludes the server ID of the server with which communication failed from the server list of communication destination candidates (step S404).

除外後、通信処理部32は、通信先候補のサーバリストに通信先サーバのサーバIDが残っているかどうかを確認する(ステップS405)。 After the exclusion, the communication processing unit 32 checks whether the server ID of the communication destination server remains in the server list of communication destination candidates (step S405).

通信先候補のサーバリストを確認した結果、通信先候補のサーバリスト内に通信先サーバのサーバIDが残っていない場合(ステップS405のNo)、通信処理部32は通信エラー通知部33に通信エラーを返すよう指示し、この指示に従い通信エラー通知部33は、制御部30に通信エラーを返す(ステップS406)。 As a result of checking the server list of communication destination candidates, if the server ID of the communication destination server does not remain in the server list of communication destination candidates (No in step S405), the communication processing unit 32 notifies the communication error notification unit 33 of the communication error. and the communication error notification unit 33 returns a communication error to the control unit 30 according to this instruction (step S406).

サーバリスト内に通信先のサーバのサーバIDが残っている場合(ステップS405のYes)、通信処理部32は、リストに残っているサーバIDの中から通信を試みたサーバの次に評価の高かったサーバのサーバIDを選択し(ステップS407)、選択したサーバIDを持つサーバに対して通信を再実行する(ステップS408)。 If the server ID of the communication destination server remains in the server list (Yes in step S405), the communication processing unit 32 selects the server with the next highest evaluation after the communication attempt from among the server IDs remaining in the list. The server ID of the selected server is selected (step S407), and communication is re-executed with the server having the selected server ID (step S408).

このようにこの実施形態のアプリケーションシステムによれば、クライアントC1からAPIリクエストがAPIゲートウェイ2に受信されると、APIゲートウェイ2は、APIリクエストに従い通信をサーバのAPIに中継する際に、環境パラメータおよびサーバパラメータを取得し、初めに、取得した環境パラメータをステージ評価式に代入して現在のステージを判定し、次に、取得したサーバパラメータを、判定した現在のステージに対応するサーバ評価式に代入して通信先とすべきサーバを選定する。つまり現在の状況に応じて通信の中継先となるサーバが自動的に選定されるので、ソフトウェア開発者は、状況に応じて手動操作で中継先のサーバを指定する必要が無くなり、その分の作業コストを削減することができる。 Thus, according to the application system of this embodiment, when the API gateway 2 receives an API request from the client C1, the API gateway 2 relays the communication to the API of the server in accordance with the API request. Get the server parameters, first substitute the obtained environment parameters into the stage evaluation formula to determine the current stage, then substitute the obtained server parameters into the server evaluation formula corresponding to the determined current stage to select a server to communicate with. In other words, the server that will be the relay destination for communication is automatically selected according to the current situation, so software developers no longer need to manually specify the relay destination server according to the situation. Cost can be reduced.

また、APIゲートウェイ2は、多数のAPIの情報を管理している場合が多く、接続先をAPI毎に通信パターンなどを設定する必要があり、この通信パターンの設定には人手を要するが、この実施形態では、API毎の通信パターンの設定は不要であり、想定される状況に対応する評価式をステージ評価用とサーバ評価用の2つの評価式を用意すればよいので、設定コストを低減することができる。 In addition, the API gateway 2 often manages information of a large number of APIs, and it is necessary to set communication patterns and the like for connection destinations for each API. In the embodiment, it is not necessary to set a communication pattern for each API, and it is sufficient to prepare two evaluation formulas corresponding to assumed situations, one for stage evaluation and one for server evaluation, thereby reducing the setting cost. be able to.

このアプリケーションシステムでは、現在のステージや通信先となるサーバを、利用者が指定することなく自動的に選定し、サーバの利用環境や利用状況に応じて全APIの通信先の切り替えを適宜行うので、そのための通信パターンの設定作業が不要になり、APIゲートウェイ2を用いて複数のサーバ41~44のAPIを利用してサービスを束ねるようなソフトウェアを開発するにあたり、人手による設定作業を削減し、トータルコストを低減することができる。 In this application system, the current stage and communication destination server are automatically selected without being specified by the user, and all API communication destinations are appropriately switched according to the usage environment and usage status of the server. , the setting work of the communication pattern for that purpose becomes unnecessary, and when developing software that bundles services using the APIs of a plurality of servers 41 to 44 using the API gateway 2, manual setting work is reduced, Total cost can be reduced.

本発明の実施形態を説明したが、この実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。この新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。ここに示した実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 While embodiments of the invention have been described, the embodiments have been presented by way of example and are not intended to limit the scope of the invention. This novel embodiment can be embodied in various other forms, and various omissions, replacements, and modifications can be made without departing from the scope of the invention. The embodiments shown here and their modifications are included in the scope and gist of the invention, and are included in the scope of the invention described in the claims and equivalents thereof.

上記実施形態では、APIゲートウェイ2において、クライアントC1からのリクエストを制御部30が受け付けて、各サーバ41~44に振り分けたが、この他、APIゲートウェイ2にサービス毎にいくつかのAPIを設けておき、クライアントC1からのリクエストを、一旦、APIゲートウェイ2のAPIで受け付けて、そのAPIが、該当サービスを提供するサーバ41~44にリクエストを振り分けるようにしてもよい。 In the above embodiment, in the API gateway 2, the control unit 30 receives requests from the client C1 and distributes them to the respective servers 41 to 44. In addition, the API gateway 2 may be provided with several APIs for each service. Alternatively, the request from the client C1 may be temporarily accepted by the API of the API gateway 2, and the API may distribute the request to the servers 41 to 44 that provide the corresponding service.

また、ステージの評価結果に応じてサーバを選定する具体例としては、サーバ41~44の設置場所が、例えば「大阪」や「東京」などのように異なる地域に点在しているケースにおいて、「東京」、「千葉」、「神奈川」などの関東圏で災害が発生したという災害発生情報を、環境パラメータ取得部27が、例えば防災サイトのサーバより取得してその災害発生情報を通信先選択部29に渡し、通信先選択部29は、災害発生情報に含まれる位置情報(環境パラメータ)から、予め設定されている関数式で災害発生地域としての点数を計算し、その点数から災害発生でサービス提供に影響が生じる度合いを評価し、関東圏の度合いが高い場合は、クライアントC1からのリクエストを、同種のサービスを提供する「大阪」のサーバへ振り分けるようにしてもよい。 Further, as a specific example of selecting a server according to the stage evaluation result, in a case where the installation locations of the servers 41 to 44 are scattered in different areas such as "Osaka" and "Tokyo", The environmental parameter acquisition unit 27 acquires disaster occurrence information indicating that a disaster has occurred in the Kanto area such as "Tokyo", "Chiba", and "Kanagawa" from, for example, a disaster prevention site server, and selects a communication destination for the disaster occurrence information. 29, and the communication destination selection unit 29 calculates the score of the disaster area using a preset function from the location information (environmental parameters) included in the disaster occurrence information, The degree of influence on service provision is evaluated, and if the degree of influence in the Kanto region is high, the request from the client C1 may be distributed to a server in "Osaka" that provides the same kind of service.

また上記実施形態では、APIゲートウェイ2の各構成要素を、コンピュータのハードディスク装置などのストレージにインストールしたプログラムで実現したが、この他、上記プログラムを、コンピュータ読取可能な電子媒体:electronic mediaに記憶しておき、プログラムを電子媒体からコンピュータに読み取らせることで本発明の機能をコンピュータが実現するようにしてもよい。電子媒体としては、例えばCD-ROM等の記録媒体やフラッシュメモリ、リムーバブルメディア:Removable media等が含まれる。さらに、ネットワークを介して接続した異なるコンピュータに構成要素を分散して記憶し、各構成要素を機能させたコンピュータ間で通信することで実現してもよい。 In the above embodiment, each component of the API gateway 2 is realized by a program installed in a storage such as a hard disk device of a computer. Alternatively, the functions of the present invention may be realized by the computer by causing the computer to read the program from the electronic medium. Examples of electronic media include recording media such as CD-ROMs, flash memories, removable media, and the like. Furthermore, it may be realized by distributing and storing the constituent elements in different computers connected via a network, and by communicating between the computers that operate each constituent element.

41~44…アプリケーションサーバ(サーバ)、C1…クライアント、2…APIゲートウェイ、20…記憶部、21…評価条件テーブル、22…API情報テーブル、23…サーバ情報テーブル、24…仕様情報テーブル、25…環境パラメータテーブル、26…サーバパラメータテーブル、27…環境パラメータ取得部、28…サーバパラメータ取得部、29…通信先選択部、30…制御部、31…通信管理部、32…通信処理部、33…通信エラー通知部。 41 to 44 application server (server) C1 client 2 API gateway 20 storage unit 21 evaluation condition table 22 API information table 23 server information table 24 specification information table 25 Environmental parameter table 26 Server parameter table 27 Environmental parameter acquisition unit 28 Server parameter acquisition unit 29 Communication destination selection unit 30 Control unit 31 Communication management unit 32 Communication processing unit 33 Communication error notification part.

Claims (9)

クライアントと複数のサーバとがネットワークを介して接続され、前記クライアントからのリクエストを要求先のサーバへ中継するシステムにおいて前記リクエストを前記要求先のサーバへ中継するゲートウェイ装置であって、
前記ゲートウェイ装置が検出可能な前記システム全体の環境を示す環境パラメータを取得する環境パラメータ取得部と、
前記複数のサーバの各サーバと前記各サーバで動作するアプリケーションプログラムとで実現されるマイクロサービスの情報と、前記ネットワーク上における前記各サーバの所在情報とを含む仕様情報が記憶された仕様情報記憶部と、
前記環境パラメータを用いて各サーバでのアプリケーションプログラムの動作を示すステージを判定する判定値を与えるステージ評価式を有する第1評価条件と、前記各サーバに存在する機能を実数化したサーバパラメータを用いて前記判定値により特定されたステージ毎の前記各サーバの機能を評価する評価値を与えるサーバ評価式を有する第2評価条件とが記憶された評価条件記憶部と、
取得された前記システムの環境パラメータを前記ステージ評価式に適用して得た判定値に基づいて前記要求先のサーバの現在のステージを判定するステージ判定部と、
前記各サーバのサーバパラメータを取得するサーバパラメータ取得部と、
取得された前記サーバパラメータを前記現在のステージに対応する前記サーバ評価式に適用して得た評価値および前記仕様情報に基づいて前記要求先のサーバの候補を選定する通信先選定部と、
前記通信先選定部により選定されたサーバの候補へ通信を順次試みる通信処理部と
を具備するゲートウェイ装置。
A gateway device for relaying a request to a destination server in a system in which a client and a plurality of servers are connected via a network and relaying a request from the client to the destination server,
an environment parameter acquisition unit that acquires an environment parameter indicating an environment of the entire system that can be detected by the gateway device;
A specification information storage unit storing specification information including information on microservices realized by each server of the plurality of servers and application programs running on each server, and location information of each server on the network. and,
Using a first evaluation condition having a stage evaluation formula that gives a judgment value for determining a stage indicating the operation of the application program on each server using the environment parameters, and using server parameters that are real numbers representing the functions that exist in each server. an evaluation condition storage unit storing a second evaluation condition having a server evaluation formula that gives an evaluation value for evaluating the function of each server for each stage specified by the determination value;
a stage determination unit that determines the current stage of the request destination server based on a determination value obtained by applying the acquired environment parameter of the system to the stage evaluation formula;
a server parameter acquisition unit that acquires the server parameters of each server;
a communication destination selection unit that selects candidates for the request destination server based on the evaluation value obtained by applying the acquired server parameter to the server evaluation formula corresponding to the current stage and the specification information;
and a communication processing unit that sequentially attempts communication with the server candidates selected by the communication destination selection unit.
前記環境パラメータが、サービスの運用段階か本番段階か、時刻、時間帯、カレンダ、中継するデータ量、有料サーバの課金額のいずれかの値を含む請求項1記載のゲートウェイ装置。 2. The gateway device according to claim 1, wherein said environmental parameters include any one of the operation stage or production stage of the service, time, time period, calendar, amount of data to be relayed, and billing amount of pay server. 前記サーバパラメータが、サーバ毎に設定される課金額、性能のいずれかの値を含む請求項1記載のゲートウェイ装置。 2. The gateway device according to claim 1, wherein said server parameter includes either a billing amount or a performance value set for each server. 前記第1評価条件が、前記ステージ評価式に前記環境パラメータを代入して計算した結果として得られる値が予め設定された閾値を満たすか否かである請求項1記載のゲートウェイ装置。 2. The gateway apparatus according to claim 1, wherein said first evaluation condition is whether or not a value obtained as a result of calculation by substituting said environment parameter into said stage evaluation formula satisfies a preset threshold value. 前記第2評価条件の前記サーバ評価式が、判定した現在のステージに対応して設定されたサーバ評価用の計算式である請求項1記載のゲートウェイ装置。 2. The gateway device according to claim 1, wherein said server evaluation formula of said second evaluation condition is a calculation formula for server evaluation set corresponding to the determined current stage. 前記通信先選定部は、
前記第2評価条件を用いて通信先候補のサーバのリストを生成し、前記リストにおいて評価結果のよい通信先候補の順に前記サーバに優先度を付与して通信処理部に渡し、
前記通信処理部は、
渡されたサーバリストの優先度の高い候補の順に通信を試みる請求項1記載のゲートウェイ装置。
The communication destination selection unit
generating a list of communication destination candidate servers using the second evaluation condition, assigning priority to the server in order of communication destination candidates with good evaluation results in the list, and passing the server to the communication processing unit;
The communication processing unit
2. The gateway device according to claim 1, wherein communication is attempted in the order of priority candidates in the delivered server list.
前記ステージ判定部は、
前記環境パラメータを評価条件として設定されている複数の前記ステージ評価式に代入し、ステージ毎に評価し、評価結果のよいステージを現在のステージとして特定する請求項1記載のゲートウェイ装置。
The stage determination unit
2. The gateway device according to claim 1, wherein said environmental parameters are substituted into said plurality of stage evaluation formulas set as evaluation conditions, each stage is evaluated, and a stage with a good evaluation result is specified as a current stage.
クライアントと複数のサーバとネットワークを介して接続されたゲートウェイ装置とを有し、前記クライアントからのリクエストを前記ゲートウェイ装置が要求先のサーバへ中継する通信システムにおいて、
前記ゲートウェイ装置が、
前記ゲートウェイ装置が検出可能な前記通信システム全体の環境を示す環境パラメータを取得する環境パラメータ取得部と、
前記複数のサーバの各サーバと前記各サーバで動作するアプリケーションプログラムとで実現されるマイクロサービスの情報と、前記ネットワーク上における前記各サーバの所在情報とを含む仕様情報が記憶された仕様情報記憶部と、
前記環境パラメータを用いて各サーバでのアプリケーションプログラムの動作を示すステージを判定する判定値を与えるステージ評価式を有する第1評価条件と、前記各サーバに存在する機能を実数化したサーバパラメータを用いて前記判定値により特定されたステージ毎の前記各サーバの機能を評価する評価値を与えるサーバ評価式を有する第2評価条件とが記憶された評価条件記憶部と、
取得された前記通信システムの環境パラメータを前記ステージ評価式に適用して得た判定値に基づいて前記要求先のサーバの現在のステージを判定するステージ判定部と、
前記各サーバのサーバパラメータを取得するサーバパラメータ取得部と、
取得された前記サーバパラメータを前記現在のステージに対応する前記サーバ評価式に適用して得た評価値および前記仕様情報に基づいて前記要求先のサーバの候補を選定する通信先選定部と、
前記通信先選定部により選定されたサーバの候補へ通信を順次試みる通信処理部と
を具備する通信システム。
In a communication system comprising a client, a plurality of servers, and a gateway device connected via a network, wherein the gateway device relays a request from the client to a destination server,
The gateway device
an environment parameter acquisition unit that acquires an environment parameter indicating an environment of the entire communication system that can be detected by the gateway device;
A specification information storage unit storing specification information including information on microservices realized by each server of the plurality of servers and application programs running on each server, and location information of each server on the network. and,
Using a first evaluation condition having a stage evaluation formula that gives a judgment value for determining a stage indicating the operation of the application program on each server using the environment parameters, and using server parameters that are real numbers representing the functions that exist in each server. an evaluation condition storage unit storing a second evaluation condition having a server evaluation formula that gives an evaluation value for evaluating the function of each server for each stage specified by the determination value;
a stage determination unit that determines the current stage of the request destination server based on a determination value obtained by applying the acquired environmental parameter of the communication system to the stage evaluation formula;
a server parameter acquisition unit that acquires the server parameters of each server;
a communication destination selection unit that selects candidates for the request destination server based on the evaluation value obtained by applying the acquired server parameter to the server evaluation formula corresponding to the current stage and the specification information;
and a communication processing unit that sequentially attempts communication with the server candidates selected by the communication destination selection unit.
クライアントと複数のサーバとがネットワークを介して接続され、前記クライアントからのリクエストを要求先のサーバへ中継するシステムにおいて前記リクエストを前記要求先のサーバへ中継するゲートウェイ装置による通信方法であって、
前記ゲートウェイ装置が、
前記ゲートウェイ装置が検出可能な前記システム全体の環境を示す環境パラメータを取得し、
前記複数のサーバの各サーバと前記各サーバで動作するアプリケーションプログラムとで実現されるマイクロサービスの情報と、前記ネットワーク上における前記各サーバの所在情報とを含む仕様情報を記憶し、
前記環境パラメータを用いて各サーバでのアプリケーションプログラムの動作を示すステージを判定する判定値を与えるステージ評価式を有する第1評価条件と、前記各サーバに存在する機能を実数化したサーバパラメータを用いて前記判定値により特定されたステージ毎の前記各サーバの機能を評価する評価値を与えるサーバ評価式を有する第2評価条件とを記憶し、
取得した前記システムの環境パラメータを前記ステージ評価式に適用して得た判定値に基づいて前記要求先のサーバの現在のステージを判定し、
前記各サーバのサーバパラメータを取得し、
取得した前記サーバパラメータを前記現在のステージに対応する前記サーバ評価式に適用して得た評価値およびと前記仕様情報に基づいて前記要求先のサーバの候補を選定し、
選定したサーバの候補へ通信を順次試みる通信方法。
A communication method using a gateway device for relaying a request from a client to a destination server in a system in which a client and a plurality of servers are connected via a network and relaying the request from the client to the destination server,
The gateway device
Acquiring an environment parameter indicating an environment of the entire system detectable by the gateway device;
storing specification information including information on microservices realized by each of the plurality of servers and application programs running on each of the servers, and location information of each of the servers on the network;
Using a first evaluation condition having a stage evaluation formula that gives a judgment value for determining a stage indicating the operation of the application program on each server using the environment parameters, and using server parameters that are real numbers representing the functions that exist in each server. a second evaluation condition having a server evaluation formula that gives an evaluation value for evaluating the function of each server for each stage specified by the determination value;
determining the current stage of the request destination server based on a determination value obtained by applying the acquired environment parameter of the system to the stage evaluation formula;
obtaining server parameters for each of said servers;
selecting candidates for the request destination server based on the evaluation value obtained by applying the acquired server parameter to the server evaluation formula corresponding to the current stage and the specification information;
A communication method that sequentially tries to communicate with selected server candidates.
JP2018060171A 2018-03-27 2018-03-27 Communication system, gateway device and communication method Active JP7258468B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018060171A JP7258468B2 (en) 2018-03-27 2018-03-27 Communication system, gateway device and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018060171A JP7258468B2 (en) 2018-03-27 2018-03-27 Communication system, gateway device and communication method

Publications (2)

Publication Number Publication Date
JP2019174969A JP2019174969A (en) 2019-10-10
JP7258468B2 true JP7258468B2 (en) 2023-04-17

Family

ID=68170360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018060171A Active JP7258468B2 (en) 2018-03-27 2018-03-27 Communication system, gateway device and communication method

Country Status (1)

Country Link
JP (1) JP7258468B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114844899A (en) * 2022-04-28 2022-08-02 中国工商银行股份有限公司 Server selection method and device, processor and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007183793A (en) 2006-01-06 2007-07-19 Hitachi Ltd Information processing method, information processor, and program
JP2008140120A (en) 2006-12-01 2008-06-19 Fujitsu Ltd Calculation resource management program, calculation resource management device and distributed processing system
JP2013186770A (en) 2012-03-09 2013-09-19 Hitachi Ltd Data processing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007183793A (en) 2006-01-06 2007-07-19 Hitachi Ltd Information processing method, information processor, and program
JP2008140120A (en) 2006-12-01 2008-06-19 Fujitsu Ltd Calculation resource management program, calculation resource management device and distributed processing system
JP2013186770A (en) 2012-03-09 2013-09-19 Hitachi Ltd Data processing device

Also Published As

Publication number Publication date
JP2019174969A (en) 2019-10-10

Similar Documents

Publication Publication Date Title
US10114732B2 (en) Debugging in-cloud distributed code in live load environment
US10757036B2 (en) Method and system for provisioning computing resources
US9996453B2 (en) On-demand software test environment generation
US9830180B2 (en) Tracing relationships across multiple layers of a cloud reference model framework
US9471447B2 (en) Virtualization simulation engine including assuming a dormant state for a lower priority application
US9639411B2 (en) Impact notification system
AU2011229697A1 (en) System and method for cloud enterprise services
JP2016103179A (en) Allocation method for computer resource and computer system
EP3468144B1 (en) Displaying errors of cloud service components
US20150193246A1 (en) Apparatus and method for data center virtualization
US20180176289A1 (en) Information processing device, information processing system, computer-readable recording medium, and information processing method
JP6235156B2 (en) Computer system and load leveling program
EP3731093B1 (en) Service location management in computing systems
US9552226B1 (en) Predictive order status system and method for computing environment
JP7258468B2 (en) Communication system, gateway device and communication method
US9288252B2 (en) Managing web services using a reverse proxy
EP3111326A2 (en) Architecture and method for cloud provider selection and projection
US11872429B2 (en) Commissioning a fire system
US20150193862A1 (en) Architecture and method for implementing a marketplace for data center resources
US8082171B1 (en) Methods and systems for hosting business applications having pipeline-based business logic using shared computing resources
US20150193128A1 (en) Virtual data center graphical user interface
WO2015103560A2 (en) Architecture and method for cloud provider selection and projection
JP6362080B2 (en) Management system and management method
JP6273179B2 (en) Orchestration system, method, and program
AU2015261587B2 (en) Method and system for monitoring usage of computing resources

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210305

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220208

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220411

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220906

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221107

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: 20230307

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230405

R150 Certificate of patent or registration of utility model

Ref document number: 7258468

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150