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

Communication system, gateway device and communication method Download PDF

Info

Publication number
JP2019174969A
JP2019174969A JP2018060171A JP2018060171A JP2019174969A JP 2019174969 A JP2019174969 A JP 2019174969A JP 2018060171 A JP2018060171 A JP 2018060171A JP 2018060171 A JP2018060171 A JP 2018060171A JP 2019174969 A JP2019174969 A JP 2019174969A
Authority
JP
Japan
Prior art keywords
server
stage
communication
evaluation
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.)
Granted
Application number
JP2018060171A
Other languages
Japanese (ja)
Other versions
JP7258468B2 (en
Inventor
芳治 小島
Yoshiharu Kojima
芳治 小島
裕一郎 江崎
Yuichiro Ezaki
裕一郎 江崎
斉藤 稔
Minoru Saito
稔 斉藤
誠一郎 田中
Seiichiro Tanaka
誠一郎 田中
直丸 川崎
Tadamaru Kawasaki
直丸 川崎
和也 橋本
Kazuya Hashimoto
和也 橋本
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

Abstract

To allow a timely optimal service to be provided to a user of a client while reducing work of manually setting a communication destination, when providing the user with services.SOLUTION: A gateway device comprises an environmental parameter acquisition unit, a specification information storage unit, an evaluation condition storage unit, a stage determination unit, a server parameter acquisition unit, a communication destination selection unit and a communication processing unit. The environmental parameter acquisition unit acquires an environmental parameter of a system. In the evaluation condition storage unit, a stage evaluation formula and a server evaluation formula are stored. The stage determination unit substitutes the environmental parameter into the stage evaluation formula to determine a current stage. The communication destination selection unit substitutes a server parameter into the server evaluation formula to select candidates for a server being a communication destination, and the communication processing unit sequentially attempts communication with the candidates for the server.SELECTED DRAWING: Figure 1

Description

本発明の実施形態は、通信システム、ゲートウェイ装置および通信方法に関する。   Embodiments described herein relate generally to a communication system, a gateway device, and a communication method.

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

このような手法において、各サービスは、個別に開発されそれぞれ異なる環境で稼働する。また各サービスは、目的が異なることからサービス毎に複数のサーバが利用されている場合があり、サービス利用者(ソフトウェア開発者など)は、サービス接続時に所望のサービスを選択(指定)して利用する必要がある。例として、高性能かつ高価なサーバと低性能かつ安価なサーバの中から所望のサーバのサービスを選択する場合や、テスト用と本番用に用途を分けたサーバの中から所望のサーバのサービスを選択する場合などが考えられる。   In such a method, each service is individually developed and operates in different environments. Since each service has a different purpose, multiple servers may be 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, when selecting a desired server service from a high-performance and expensive server and a low-performance and inexpensive server, or from a server that is used for test and production purposes, The case where it selects is considered.

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

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

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

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

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

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

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

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

実施形態のゲートウェイ装置は、環境パラメータ取得部、仕様情報記憶部、評価条件記憶部、ステージ判定部、サーバパラメータ取得部、通信先選定部、通信処理部を備える。環境パラメータ取得部はゲートウェイ装置の側で検出可能なシステムの環境パラメータを取得する。仕様情報記憶部には各サーバと各サーバで動作するアプリケーションプログラム(API)とで実現されるマイクロサービスの情報と、ネットワーク上における各サーバの所在情報とを含む仕様情報が記憶されている。評価条件記憶部には各サーバでアプリケーションプログラムが動作しているステージを評価するための第1評価条件(ステージ評価式)と、ステージ毎に前記サーバの機能がリクエストを処理可能か否かを評価するための第2評価条件(サーバ評価式)とが記憶されている。ステージ判定部は取得されたシステムの環境パラメータを基に第1評価条件を満たす現在のステージを判定する。サーバパラメータ取得部は各サーバに存在する機能を実数化したサーバパラメータを取得する。通信先選定部は取得されたサーバパラメータと仕様情報を基に、ステージ判定部により判定されたステージに対応する第2評価条件を満たす通信先のサーバの候補を選定する。通信処理部は通信先選定部により選定されたサーバの候補へ通信を順次試みる。   The gateway device of the embodiment includes an environmental parameter acquisition unit, a specification information storage unit, an evaluation condition storage unit, a stage determination unit, a server parameter acquisition unit, a communication destination selection unit, and a communication processing unit. The environmental parameter acquisition unit acquires environmental parameters of the system that can be detected on the gateway device side. The specification information storage unit stores specification information including information on microservices realized by each server and an application program (API) running on each server, and location information of each server on the network. The evaluation condition storage unit evaluates the first evaluation condition (stage evaluation formula) for evaluating the stage in which the application program is operating on each server, and whether the server function can process the request for each stage. 2nd evaluation conditions (server evaluation formula) for performing are memorize | stored. The stage determination unit determines a 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 in which functions existing in each server are actualized. 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. このアプリケーションシステムの全体的な動作を示すフローチャートである。It is a flowchart which shows the whole operation | movement of this application system. このアプリケーションシステムにおいて現在のステージを判定する動作を示すフローチャートである。It is a flowchart which shows the operation | movement which determines the present stage in this application system. このアプリケーションシステムにおいて通信先のサーバを判定する動作を示すフローチャートである。It is a flowchart which shows the operation | movement which determines the server of a communication destination in this application system. このアプリケーションシステムにおいて通信動作を示すフローチャートである。It is a flowchart which shows communication operation | movement in this application system.

以下、図面を参照して、実施形態を詳細に説明する。
(実施形態)
図1は通信システムの一つの実施の形態のアプリケーションシステムの構成を示す図である。
Hereinafter, embodiments will be described in detail with reference to the drawings.
(Embodiment)
FIG. 1 is a diagram showing a configuration of an application system according to an 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”) provided by a plurality of application servers 41 to 44 (hereinafter referred to as “servers 41 to 44”) as server computers. , MS_2 ”) and a client computer C1 as a client computer are connected via the network 1, and an API gateway 2 is interposed as a gateway device between them, and communication between the servers 41 to 44 and the client C1 is performed by an API gateway. A network system 2 relays.

複数のサーバ41〜44のうち、サーバ41、42はサービスMS_1を提供する。サーバ41のサーバ名を「1_1」とし、サーバ42のサーバ名を「1_2」とする。   Among the plurality of servers 41 to 44, the servers 41 and 42 provide the service MS_1. 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」とする。   Among the plurality of servers 41 to 44, the servers 43 and 44 provide the service MS_2. 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 to 44 that provide the services MS_1 and MS_2 has an application programming interface (hereinafter referred to as “API”) as software or a processing component that performs processing on the web.

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

APIは、サーバ、クライアントなどのコンピュータが有するソフトウェアコンポーネントが互いにやりとりするのに使用するインタフェースプログラムである。ネットワーク1は、インターネットを含む通信回線である。   The API is an interface program used by software components included in computers such as servers and clients to communicate with each other. The 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 a CPU, a memory, a communication interface, and the like 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 of various functions from the API of the servers 41 to 44 by accessing the servers 41 to 44.

入力画面には、例えばアンケート調査などのようにクライアントC1の操作者がテキストデータ(文字など)を直接キー入力するための入力ボックスが表示される。入力ボックスに入力されたデータは、ネットワーク1およびAPIゲートウェイ2を経由してサーバ41〜44のうちの対象のAPIに送られて処理される。   On the input screen, for example, an input box for the operator of the client C1 to directly input text data (characters, etc.) is displayed as in a questionnaire survey. Data input to the input box is sent to the target API among the servers 41 to 44 via the network 1 and the 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, and an editing unit 34 as functional configurations realized by the hardware. Etc.

記憶部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 an evaluation condition, a specification information table 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 to 44. The server information table 23 stores specification information of the servers 41 to 44 (see FIG. 4). The communication management unit 31 includes a communication processing unit 32 and a communication error notification unit 33.

図2に示すように、評価条件テーブル21には、システム全体の環境や状況を示すステージを評価するためのステージ評価式(第1評価条件)、サーバ評価式(第2評価条件)などがステージの識別情報(ステージID)およびステージ名毎に記憶されている。ステージ評価式は、ステージに該当するかどうかを評価するための論理式である。この論理式に、取得した環境パラメータを代入することで計算結果として得られる値が予め設定された閾値を満たすか否かが評価条件である。   As shown in FIG. 2, the evaluation condition table 21 includes a stage evaluation expression (first evaluation condition), a server evaluation expression (second evaluation condition), etc. for evaluating a stage indicating the environment and status 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 it corresponds to a stage. The 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, a stage discriminant indicating that the service implementation stage is the test stage is Process = test, and a stage discriminant indicating the production stage (operation stage) is Process = prod. The discriminant of the stage indicating that the current time is noon is 1000 <Time <2000. As described above, the stage discrimination result may be obtained as a real number (numerical value), or may be obtained as a binary value of “positive” or “not”, or may be obtained by a command.

サーバ評価式は、当該ステージにおいてサーバ評価の基準となる計算式であり、ステージに毎に設定されている。ステージを特定した後、特定したステージに対応する計算式に、取得したサーバパラメータを代入することで計算結果として得られる数値の大きさによって、通信先候補としてのサーバの順位が決定する。   The server evaluation formula is a calculation formula that becomes a reference for server evaluation in the stage, and is set for each stage. After the stage is specified, the rank 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 is a stage evaluation formula for evaluating the stage in which the API is operating in each server 41 to 44, and whether the function of the server 41 to 44 can process a request from the client C1 for each stage. It functions as an evaluation condition storage unit that stores a server evaluation formula for evaluating whether or not.

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

例えば図3に示すように、API情報テーブル22には、APIのID毎に、APIの名称であるAPI名と通信先のマイクロサービスIDとが対応して記憶される。   For example, as shown in FIG. 3, in the API information table 22, for each API ID, an API name that is an API name and a micro service ID of a communication destination are stored 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 micro service 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 environmental parameter acquisition unit 27 acquires environmental parameters of the system that can be detected on the API gateway 2 side. The environmental parameters include, for example, the current time (Time), time zone (Time zone), calendar (week, day), service implementation stage (Process: test stage or test stage (prod)), this gateway 2 Are variables that are uniquely determined for the entire system, such as the total amount of data relayed and the total usage amount of the pay server (billing total: Billing), and acquisition modules 27a to 27n are provided for each. Each of the acquisition modules 27a to 27n is mounted so that these values can be uniquely acquired in response to a request from the communication destination selection unit 29.

また、環境パラメータ取得部27が返す値がステージ評価式に代入された結果が現在の状況に該当するか否かを表すものである必要があるため、評価式は、論理式で表し、評価結果は真理値(数値)であることが望ましい。   In addition, since the value returned by the environment parameter acquisition unit 27 needs to indicate whether or not the result obtained by substituting the value into the stage evaluation expression corresponds to the current situation, the evaluation expression is expressed by a logical expression, and the evaluation result Is preferably a truth 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 for each environment parameter ID. The value acquired by the environment parameter acquisition unit 27 is entered as the value of the variable name (parameter value). In this example, the billing amount Billing and the stage Process are given as examples of variable names. However, for example, the time, the total billing amount of the server, the operating status of the server or the operating status of the API running on the server, etc. Conceivable.

サーバパラメータ取得部28は、各サーバ41〜44に存在する機能や性能を実数化したサーバパラメータを取得する。このサーバパラメータは、一例として、例えばサーバの性能、利用料(課金額)、バージョン(テスト版、本番用など)、バグの有無といった、サーバ毎に一意に定まるサーバ固有の性質を表す値(属性情報)である。   The server parameter acquisition unit 28 acquires server parameters obtained by realizing functions and performance existing in the servers 41 to 44. As an example, this server parameter is a value (attribute) that represents a server-specific property that is uniquely determined for each server, such as server performance, usage fee (billing amount), version (test version, production, etc.), and presence or absence of bugs. Information).

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

図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) for each server parameter ID. The value acquired by the server parameter acquisition unit 28 is entered as the variable name value (parameter value). In this example, the billing amount Billing and the operation stage Version_newest are given as examples of 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 assigns environmental parameters to a plurality of different stage evaluation expressions (stage_1, stage_2,...) Set as evaluation conditions, evaluates each stage, and includes the evaluation results. From this, the stage with the best evaluation is identified 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 candidates that satisfy the server evaluation formula, and gives priority to the servers in the order of communication destination candidates with good evaluation results in the generated list. The data is transferred to the communication processing unit 32 through the control unit 30.

制御部30は、クライアントC1からのAPIリクエストをリクエスト先のサーバ(サーバ41〜44のいずれか)へ中継する制御を行う。また、制御部30は、下記各部を制御する。   The control unit 30 performs control to relay the API request from the client C1 to the request destination server (any of the servers 41 to 44). 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 tries communication with the server (any one of the servers 41 to 44) selected by the communication destination selection unit 29. At this time, the communication processing unit 32 tries to communicate with the server in the order of candidates with the highest priority among the server IDs described in the passed 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 communication fails as a result of attempting communication with all candidate servers, that is, when a communication error occurs. The communication error notification unit 33 returns a communication error to the control unit 30 in accordance with 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 the contents of the evaluation condition table 21 can be edited on the editing screen. is there.

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

まず、図7のフローチャートを参照してAPIゲートウェイ2においてクライアントC1よりAPIリクエストを受け取ってから通信対象のサーバに対して通信を中継するまでの処理動作を説明する。   First, the processing operation from when the API gateway 2 receives an API request from the client C1 until the communication is relayed 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 receives the API request from the client C1 (FIG. 7). In step S101, the control unit 30 instructs the communication destination selection unit 29 to generate a candidate server list (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. The request destination information is included in the API request.

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

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

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

制御部30は、クライアントC1から受信したAPIリクエストと、通信先選択部29により生成された通信先候補のサーバリストとを通信管理部31に渡す(ステップS106)。   The control unit 30 passes the API request received from the client C1 and the communication destination candidate server list 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 performs communication with the server in order from the server ID having the higher priority described in the server list passed from the control unit 30 (step S107), and the communication result obtained by the communication is transmitted 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 in S104 will be described in detail with reference to the flowchart in FIG.
In this process, the communication destination selection unit 29 specifies (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 out the stage evaluation conditions, that is, the stage evaluation formulas in the evaluation condition table 21 of FIG. 2 (step S201), and the environment parameter acquisition unit 27 includes all the inside and outside the system. The environmental parameter is requested (step S202).

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

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

そして、各ステージ評価式で評価した中から、評価のよいもの(具体的には条件式ならば評価結果が正しいか条件を満たすもの、また関数式ならば高い数値のもの)を、そのサーバの現在のステージとして判定、つまりステージを特定する(ステップS205)。   From the evaluations of each stage evaluation formula, the one with the best evaluation (specifically, the one that satisfies the condition that the evaluation result is correct if it is a conditional expression, or the one that has a high numerical value if it is a function expression) 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 in 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 environmental parameters are “1500” and “test”, the evaluation expression of the stage ID “stage_1” is “No”, the evaluation expression of the stage ID “stage_2” is “positive”, The evaluation expression for the stage ID “stage_3” is “No” and the evaluation expression for the stage ID “stage_4” is “No”. From this, the correct value for the evaluation, that is, the stage ID “stage_2” whose evaluation result is “Positive” is selected. Judge as the current stage.

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

図9のフローチャートを参照して上記S105の通信先のサーバの選定動作を詳細に動作を説明する。
この処理では、通信先選択部29は、評価条件テーブル21よりサーバの評価条件、つまり図2の評価条件テーブル21のサーバ評価式を読み出す(ステップS301)。
With reference to the flowchart of FIG. 9, the operation of selecting the communication destination server in S105 will be described in detail.
In this process, the communication destination selection unit 29 reads out the server evaluation condition from the evaluation condition table 21, that is, the server evaluation formula in 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)。   Receiving this request, the server parameter acquisition unit 28 acquires the corresponding server parameter using each of the acquisition modules 28a to 28n (step S303).

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

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

ここで利用するサーバ評価式は、図8の処理で判定したステージIDの"stage2"に対応するサーバ評価式、つまり「-billing+version_newest」である。   The server evaluation formula used here is a 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="例外"となる。   As shown in FIG. 6, when the server parameter acquisition result is a value in the server parameter table 26, when each value is substituted into the server evaluation formula, the calculation result (evaluation value) of the server 41 (1_1) is − 1000 + 1 = "-999", the calculation result (evaluation value) of the server 42 (1_2) is -10 + 1 = "-9", and the calculation result (evaluation value) of the server 43 (2_1) is 0 + 1 = "1", the calculation result (evaluation value) of the server 44 (2_2) is 0 + exception = "exception".

このように取得したサーバパラメータをサーバ評価式の各変数に代入することで、そのステージでの評価計算を行い、各サーバの評価結果として実数を算出する。但し、サーバ44(2_2)の計算結果(評価値)のように例外値が評価結果となった場合は、そのサーバは、通信不可と判定する。   By assigning the server parameters acquired in this way to each variable of the server evaluation formula, an evaluation calculation at that stage is performed, and a real number is calculated as an evaluation result of each server. However, when an exceptional value becomes an evaluation result 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)。   From the specification information table 24, the communication destination selection unit 29 acquires candidate server IDs and locations that should be connection destinations having the requested API, and a server list of connection destination candidates corresponding to the server IDs and the locations. Is generated (step S305).

ここでは、まず、リクエストに含まれるAPIIDにて通信するマイクロサービスIDをAPI情報テーブル22から取得する。続いて、通信先選択部29は、取得したマイクロサービスIDのマイクロサービスに含まれるサーバIDとそのロケーション(ネットワーク1上のサーバの所在情報)をサーバ情報テーブル23から取得し、これらに基づいて接続先候補のサーバリストを生成する。   Here, first, the micro service ID for communication using the API ID included in the request is acquired 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 micro service with the acquired micro service ID from the server information table 23, and connects based on these. A server list of destination candidates is generated.

通信先選択部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 (sequentially assigns a number from 1 in order of the server ID having the highest evaluation value) (step S306). Is returned to the control unit 30 (step S307). It should be noted that a server that is an exception value in the evaluation result is determined to be unable to communicate and is excluded from the list. In the evaluation result, the server 41 (1_1), the server 42 (1_2), and the server 43 (2_1) excluding the server 44 (2_2) are included in 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 flowchart of FIG.
In the communication supervision unit 31, the communication processing unit 32 obtains the server ID having the highest priority from the communication destination candidate server list included in the information received from the control unit 30 (communication destination candidate server list and API request). Select and execute communication with the server (step S401 in FIG. 10).

ここで、通信に成功した場合(ステップS402のNo)、通信処理部32は、当該サーバの通信を終了して、サーバから受け取った通信結果を制御部30に返す(ステップS403)。   Here, when the communication is successful (No in Step S402), the communication processing unit 32 ends the communication of 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, when communication fails (Yes in Step S402), the communication processing unit 32 excludes the server ID of the server that has failed in communication 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 communication destination candidate server list (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 sends a communication error to the communication error notification unit 33. In response to this instruction, the communication error notification unit 33 returns a communication error to the control unit 30 (step S406).

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

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

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

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

本発明の実施形態を説明したが、この実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。この新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。ここに示した実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although the embodiment of the present invention has been described, this embodiment is presented as an example and is not intended to limit the scope of the invention. The novel embodiment can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. The embodiments and modifications thereof described herein are included in the scope and gist of the invention, and are included in the invention described in the claims and the 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 a request from the client C1 and distributes the request to each of the servers 41 to 44. In addition to this, the API gateway 2 is provided with several APIs for each service. Alternatively, a request from the client C1 may be once received 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からのリクエストを、同種のサービスを提供する「大阪」のサーバへ振り分けるようにしてもよい。   As a specific example of selecting a server according to the evaluation result of the stage, in the case where the installation locations of the servers 41 to 44 are scattered in different areas such as “Osaka” and “Tokyo”, for example, The environmental parameter acquisition unit 27 acquires disaster occurrence information that a disaster has occurred in the Kanto area such as “Tokyo”, “Chiba”, “Kanagawa”, etc. from a server of the disaster prevention site, for example, and selects the destination of the disaster occurrence information. The communication destination selection unit 29 calculates the score as a disaster occurrence area from the position information (environment parameter) included in the disaster occurrence information by using a preset function formula, and the disaster occurrence from the score. Evaluate the degree of impact on service provision, and if the degree of Kanto is high, distribute the request from client C1 to the “Osaka” server that provides the same type of service. It may be so that.

また上記実施形態では、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. In addition, the above program is stored in a computer-readable electronic medium: electronic media. The function of the present invention may be realized by the computer by causing the computer to read the program from the electronic medium. Examples of the electronic medium include a recording medium such as a CD-ROM, flash memory, and removable media. Further, the configuration may be realized by distributing and storing components in different computers connected via a network, and communicating between computers in which the components are functioning.

41〜44…アプリケーションサーバ(サーバ)、C1…クライアント、2…APIゲートウェイ、20…記憶部、21…評価条件テーブル、22…API情報テーブル、23…サーバ情報テーブル、24…仕様情報テーブル、25…環境パラメータテーブル、26…サーバパラメータテーブル、27…環境パラメータ取得部、28…サーバパラメータ取得部、29…通信先選択部、30…制御部、31…通信管理部、32…通信処理部、33…通信エラー通知部。   41-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評価条件とが記憶された評価条件記憶部と、
取得された前記システムの環境パラメータを基に前記第1評価条件を満たす現在のステージを判定するステージ判定部と、
各サーバに存在する機能を実数化したサーバパラメータを取得するサーバパラメータ取得部と、
取得された前記サーバパラメータと前記仕様情報を基に、前記ステージ判定部により判定されたステージに対応する前記第2評価条件を満たす通信先のサーバの候補を選定する通信先選定部と、
前記通信先選定部により選定されたサーバの候補へ通信を順次試みる通信処理部と
を具備するゲートウェイ装置。
In a gateway device connected to a client and a plurality of servers via a network and relaying a request from the client to a request destination server,
An environmental parameter acquisition unit for acquiring environmental parameters of a system detectable on the gateway device side;
A specification information storage unit storing specification information including information on microservices realized by each server and an application program operating on each server, and location information of each server on the network;
A first evaluation condition for evaluating a stage in which an application program is operating on each server and a second evaluation condition for evaluating whether the function of the server can process the request for each stage A stored evaluation condition storage unit;
A stage determination unit that determines a current stage that satisfies the first evaluation condition based on the acquired environmental parameters of the system;
A server parameter acquisition unit that acquires server parameters obtained by realizing functions existing in each server;
Based on the acquired server parameter and the specification information, a communication destination selection unit that selects communication destination server candidates that satisfy the second evaluation condition corresponding to the stage determined by the stage determination unit;
A gateway apparatus comprising: a communication processing unit that sequentially attempts communication with server candidates selected by the communication destination selection unit.
前記環境パラメータが、サービスの運用段階か本番段階か、時刻、時間帯、カレンダ、中継するデータ量、有料サーバの課金額のいずれかの値を含む請求項1記載のゲートウェイ装置。   2. The gateway device according to claim 1, wherein the environmental parameter includes one of a service operation stage and a production stage, a time, a time zone, a calendar, a data amount to be relayed, and a charge amount of a pay server. 前記サーバパラメータが、サーバ毎に設定される課金額、性能のいずれかの値を含む請求項1記載のゲートウェイ装置。   The gateway device according to claim 1, wherein the server parameter includes one of a charge amount and a performance set for each server. 前記第1評価条件が、条件式または関数式に前記環境パラメータを代入して計算した結果として得られる値が予め設定された閾値を満たすか否かである請求項1記載のゲートウェイ装置。   The gateway apparatus according to claim 1, wherein the first evaluation condition is whether or not a value obtained as a result of substituting the environmental parameter into a conditional expression or function expression satisfies a preset threshold value. 前記第2評価条件が、決定したステージに対応して設定されたサーバ評価用の計算式である請求項1記載のゲートウェイ装置。   The gateway apparatus according to claim 1, wherein the second evaluation condition is a calculation expression for server evaluation set corresponding to the determined stage. 前記通信先選定部は、
前記第2評価条件を満たす通信先候補のサーバのリストを生成し、前記リストにおいて評価結果のよい通信先候補の順に前記サーバに優先度を付与して通信処理部に渡し、
前記通信処理部は、
渡されたサーバリストの優先度の高い候補の順に通信を試みる請求項1記載のゲートウェイ装置。
The communication destination selection unit
A list of communication destination candidate servers that satisfy the second evaluation condition is generated, and priority is given to the servers in order of communication destination candidates with good evaluation results in the list, and passed to the communication processing unit.
The communication processing unit
The gateway apparatus according to claim 1, wherein communication is attempted in order of candidates having a high priority in the passed server list.
前記ステージ判定部は、
前記環境パラメータを評価条件として設定されている複数のステージ評価式に代入し、ステージ毎に評価し、評価結果のよいステージを現在のステージとして特定する請求項1記載のゲートウェイ装置。
The stage determination unit
The gateway apparatus according to claim 1, wherein the environmental parameter is substituted into a plurality of stage evaluation expressions set as evaluation conditions, evaluated for each stage, and a stage having a good evaluation result is specified as the current stage.
クライアントと複数のサーバとネットワークを介して接続されたゲートウェイ装置とを有し、前記クライアントからのリクエストをゲートウェイ装置が要求先のサーバへ中継する通信システムにおいて、
前記ゲートウェイ装置が、
前記ゲートウェイ装置の側で検出可能なシステムの環境パラメータを取得する環境パラメータ取得部と、
各サーバと前記各サーバで動作するアプリケーションプログラムとで実現されるマイクロサービスの情報と、前記ネットワーク上における前記各サーバの所在情報とを含む仕様情報が記憶された仕様情報記憶部と、
各サーバでアプリケーションプログラムが動作しているステージを評価するための第1評価条件と、前記ステージ毎に前記サーバの機能が前記リクエストを処理可能か否かを評価するための第2評価条件とが記憶された評価条件記憶部と、
取得された前記システムの環境パラメータを基に前記第1評価条件を満たす現在のステージを判定するステージ判定部と、
各サーバに存在する機能を実数化したサーバパラメータを取得するサーバパラメータ取得部と、
取得された前記サーバパラメータと前記仕様情報を基に、前記ステージ判定部により判定されたステージに対応する前記第2評価条件を満たす通信先のサーバの候補を選定する通信先選定部と、
前記通信先選定部により選定されたサーバの候補へ通信を順次試みる通信処理部と
を具備する通信システム。
In a communication system having a gateway device connected to a client and a plurality of servers via a network, the gateway device relays a request from the client to a requested server.
The gateway device is
An environmental parameter acquisition unit for acquiring environmental parameters of a system detectable on the gateway device side;
A specification information storage unit storing specification information including information on microservices realized by each server and an application program operating on each server, and location information of each server on the network;
A first evaluation condition for evaluating a stage in which an application program is operating on each server and a second evaluation condition for evaluating whether the function of the server can process the request for each stage A stored evaluation condition storage unit;
A stage determination unit that determines a current stage that satisfies the first evaluation condition based on the acquired environmental parameters of the system;
A server parameter acquisition unit that acquires server parameters obtained by realizing functions existing in each server;
Based on the acquired server parameters and the specification information, a communication destination selection unit that selects communication destination server candidates that satisfy the second evaluation condition corresponding to the stage determined by the stage determination unit;
A communication processing unit comprising: a communication processing unit that sequentially attempts communication with server candidates selected by the communication destination selection unit.
クライアントと複数のサーバにネットワークを介して接続され、前記クライアントからのリクエストを要求先のサーバへ中継するゲートウェイ装置における通信方法であって、
前記ゲートウェイ装置が、
前記ゲートウェイ装置の側で検出可能なシステムの環境パラメータを取得し、
各サーバと前記各サーバで動作するアプリケーションプログラムとで実現されるマイクロサービスの情報と、前記ネットワーク上における前記各サーバの所在情報とを含む仕様情報を記憶し、
各サーバでアプリケーションプログラムが動作しているステージを評価するための第1評価条件と、前記ステージ毎に前記サーバの機能が前記リクエストを処理可能か否かを評価するための第2評価条件とを記憶し、
取得した前記システムの環境パラメータを基に前記第1評価条件を満たす現在のステージを判定し、
各サーバに存在する機能を実数化したサーバパラメータを取得し、
前記ゲートウェイ装置が、取得した前記サーバパラメータと前記仕様情報を基に、判定したステージに対応する前記第2評価条件を満たす通信先のサーバの候補を選定し、
選定したサーバの候補へ通信を順次試みる通信方法。
A communication method in a gateway device connected to a client and a plurality of servers via a network and relaying a request from the client to a request destination server,
The gateway device is
Obtaining environmental parameters of the system detectable on the gateway device side;
Storing specification information including information on microservices realized by each server and an application program operating on each server, and location information of each server on the network;
A first evaluation condition for evaluating a stage in which an application program is operating on each server; and a second evaluation condition for evaluating whether the function of the server can process the request for each stage. Remember,
Determining a current stage satisfying the first evaluation condition based on the acquired environmental parameters of the system;
Get server parameters that realize the functions that exist on each server,
Based on the acquired server parameter and the specification information, the gateway device selects a communication destination server candidate that satisfies the second evaluation condition corresponding to the determined stage,
A communication method that attempts to communicate sequentially with the 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 true JP2019174969A (en) 2019-10-10
JP7258468B2 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)

Cited By (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

Cited By (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

Also Published As

Publication number Publication date
JP7258468B2 (en) 2023-04-17

Similar Documents

Publication Publication Date Title
US11443104B2 (en) Graphical user interface for inter-party communication with automatic scoring
US9996453B2 (en) On-demand software test environment generation
US10445222B2 (en) Debugging in-cloud distributed code in live load environment
US20180101371A1 (en) Deployment manager
US11178049B2 (en) Device deployment and net work management using a self-service portal
US20130346619A1 (en) Apparatus and methods for auto-discovery and migration of virtual cloud infrastructure
US10430172B2 (en) Re-configuration in cloud computing environments
US9471447B2 (en) Virtualization simulation engine including assuming a dormant state for a lower priority application
US20180176289A1 (en) Information processing device, information processing system, computer-readable recording medium, and information processing method
JP2017527911A (en) Scalable data storage pool
CN104246741A (en) Orchestrating hybrid cloud services
CA2998465C (en) Application provisioning system for requesting configuration updates for application objects across data centers
EP3468144B1 (en) Displaying errors of cloud service components
US9639411B2 (en) Impact notification system
US11550774B2 (en) System and method for alert insight in configuration management databases (CMDBs)
US9552226B1 (en) Predictive order status system and method for computing environment
US11886927B2 (en) ICT resource management device, ICT resource management method and ICT resource management program
US9288252B2 (en) Managing web services using a reverse proxy
JP2019174969A (en) Communication system, gateway device and communication method
TW202031016A (en) Ict resource management device, ICT resource management method and ict resource management program
US10180830B2 (en) Information processing device, deployment method, and recording medium
US20240069887A1 (en) Computer system, deployment plan generation method, and deployment control system
Ifrah et al. Troubleshooting Amazon AWS Containerized Solutions
JP6385304B2 (en) Computer resource management service management device
JP2021051461A (en) System execution support method and device

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