JP6475037B2 - API aggregation device and API compatible method - Google Patents
API aggregation device and API compatible method Download PDFInfo
- Publication number
- JP6475037B2 JP6475037B2 JP2015028802A JP2015028802A JP6475037B2 JP 6475037 B2 JP6475037 B2 JP 6475037B2 JP 2015028802 A JP2015028802 A JP 2015028802A JP 2015028802 A JP2015028802 A JP 2015028802A JP 6475037 B2 JP6475037 B2 JP 6475037B2
- Authority
- JP
- Japan
- Prior art keywords
- api
- enabler
- information
- response information
- application
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Description
本発明は、複数のAPI(Application Programming Interface)を集約したアプリケーションから、リクエストを受け付けたAPI又はイネーブラが機能不全の場合でも所望の情報をユーザに提供することが可能なAPI集約装置及びAPI互換方法に関する。 The present invention provides an API aggregation device and an API compatible method capable of providing desired information to a user even when an API that receives a request or an enabler receives a failure from an application in which a plurality of APIs (Application Programming Interfaces) are aggregated. About.
近年、プログラムであるスクラッチで開発していたような機能、地図描画や認証等の共通機能が、情報インターフェイスであるAPIという形で提供されてきている。APIを活用したアプリケーション(以下、アプリと略すこともある)の開発では、複数のAPIを組み合わせる(マッシュアップする)ことで、早く、安く、多様な機能のアプリを開発することができ、様々な企業が自社機能を実現するAPIに注目している。つまり、ソフトウェア開発において、APIを活用したソフトウェア開発により、幾つかのAPIを組み合わせて検証を含む開発期間の短縮、開発コストを削減することが実施されている。 2. Description of the Related Art In recent years, functions that have been developed as a program, such as scratch, and common functions such as map drawing and authentication have been provided in the form of an API, which is an information interface. In the development of applications that use APIs (hereinafter, sometimes abbreviated as applications), you can develop applications of various functions quickly, cheaply, and various functions by combining (mashing up) multiple APIs. Companies are focusing on APIs that realize their functions. That is, in software development, software development utilizing APIs is implemented to combine several APIs to shorten the development period including verification and reduce the development cost.
提供されるAPIについては、利用状況をAPI提供者にフィードバックする等の代償として、無償で提供されることが多い。APIはグーグル、アマゾン等のユーザへ製品を提供しているベンダが、無償で公開、提供している場合が多い。 The provided API is often provided free of charge, for example, at the expense of feedback of the usage status to the API provider. APIs are often released and provided free of charge by vendors providing products to users such as Google and Amazon.
例えば、図14に示すように、位置情報取得機能10に繋がるAPI10aと、グルメ検索機能11に繋がるAPI11aと、レコメンド機能12に繋がるAPI12aとが集約されているとする。この際に、ユーザが飲食店を検索する場合、スマートフォン(スマホと略すこともある)にアプリケーション13をインストールし、そのアプリ13からインターネットを介して各API10a〜12aにアクセスして所望のグルメ情報を取得することができる。
For example, as shown in FIG. 14, it is assumed that an
この場合、アプリ13からリクエスト情報14qがAPI10aを介して位置情報取得機能10に送信され、位置情報取得機能10がAPI10aを介して位置情報であるレスポンス情報14pをアプリ13へ返す。これにより、スマホに飲食店の位置が表示される。次に、ユーザが、アプリ13でその位置の周辺にどの様な飲食店があるか検索する。この検索によるリクエスト情報15qがAPI11aを介してグルメ検索機能11に送信され、グルメ検索機能11がAPI11aを介して「店」の情報であるレスポンス情報15pをアプリ13へ返す。これにより、スマホに飲食店の情報が表示される。
In this case, the request information 14 q is transmitted from the
次に、ユーザが、アプリ13で飲食店の中から嗜好する飲食物を検索する。この検索によるリクエスト情報16qがAPI12aを介してレコメンド機能12に送信され、レコメンド機能12がAPI12aを介してユーザが嗜好する飲食物の情報を含むレスポンス情報16pをアプリ13へ返す。これにより、スマホにユーザが嗜好する飲食物が表示される。
この種の技術として非特許文献1に記載のものがある。
Next, the user uses the
Non-Patent
しかし、APIを複数組み合わせてアプリを作成した場合、組み合わせた内の1つのAPIでも機能しなくなると、組合されたAPI全体が機能しなくなり、アプリを提供するサービスが停止してしまうという問題がある。 However, in the case of creating an application by combining multiple APIs, there is a problem that the entire combined API will not function and the service providing the application will be stopped if even one of the combined APIs does not function. .
図14の例では、グルメ検索機能11が×印で示すように機能しなくなった場合、このグルメ検索機能11を含む位置情報取得機能10及びレコメンド機能12の全体が機能しなくなり、アプリ13を提供するサービスが停止してしまう。
In the example of FIG. 14, when the
本発明は、このような背景に鑑みてなされたものであり、複数組み合わせたAPIの1つが機能不全となった場合でも、その機能不全のAPIに係る機能の情報をアプリケーションに提供することができるAPI集約装置及びAPI互換方法を提供することを課題とする。 The present invention has been made in view of such a background, and even when one of a plurality of combined APIs becomes dysfunctional, it is possible to provide the application with information on functions related to the dysfunctional API. An object is to provide an API aggregation device and an API compatible method.
前記した課題を解決するため、請求項1に記載の発明は、所定の目的を少なくとも通信を行って実現するイネーブラに繋がるAPIを複数組み合わせたアプリケーションが、所望の情報を取得するためのリクエスト情報を前記APIを介して前記イネーブラへ送信し、前記送信されたリクエスト情報を受信した前記イネーブラが前記リクエスト情報に応じたレスポンス情報を、前記APIを介して前記アプリケーションへ返信する通信システムにおいて、前記アプリケーションと前記イネーブラとの間に少なくとも前記APIを介して接続されたAPI集約装置であって、前記アプリケーションから所望のイネーブラへ前記APIを介して前記リクエスト情報を送信した際に、当該リクエスト情報の内容に適合したレスポンス情報が返信されない機能不全の場合、当該機能不全のイネーブラが返信するはずのレスポンス情報と互換性のあるレスポンス情報を含む対応イネーブラからのレスポンス情報を、当該対応イネーブラに繋がる対応APIを介して当該アプリケーションへ返信するAPI処理機能部を備え、前記API処理機能部は、前記API毎に繋がる機能に互換性が有る場合に、その互換性の有るAPIの対応関係を示すAPI互換情報を記憶するデータベースと、前記アプリケーションから送信されるリクエスト情報を受信したイネーブラが返信するレスポンス情報を受信した際に、当該レスポンス情報が予め定められた規定の内容に不適合の場合、当該不適合のレスポンス情報を返信したイネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在すれば、互換動作可能と判断する判断部と、前記互換動作可能と判断された際に、前記不適合のレスポンス情報を返信したイネーブラへのリクエスト情報を変換する際に、共通のパラメータを用いて設計された異なる前記対応APIに繋がる対応イネーブラへのリクエスト情報の宛先において、当該宛先であるドメイン名を共通化した共通ドメインを設け、当該共通ドメインの次のパスを前記対応イネーブラを示す宛先に変換し、この変換されたリクエスト情報を対応イネーブラへ送信する変換部と、前記変換されたリクエスト情報を受信した対応イネーブラから返信されるレスポンス情報を、前記アプリケーションへ返信する送信部と、を備え、前記変換部は、前記判断部で前記互換動作可能と判断された際に、前記対応APIに繋がる対応イネーブラへのリクエスト情報の送信後に当該対応イネーブラから返信されたレスポンス情報を、前記不適合のレスポンス情報を返信したイネーブラから本来適正に出力されるレスポンス情報に整合するように変換し、前記送信部は、前記整合されたレスポンス情報を前記アプリケーションへ返信することを特徴とするAPI集約装置である。
In order to solve the above-mentioned problems, according to the invention of
この構成によれば、複数組み合わせたAPIの何れかが機能不全となった場合でも、その機能不全のAPIに係る機能の情報を、そのAPIに係る対応APIを介してアプリケーションに提供することができる。少なくとも前記APIを介してというのは、アプリケーションからAPI集約装置に繋がるAPIとイネーブラに繋がるAPIとは、API集約装置を介する際にAPIのパラメータ等の形式が置き換えられている場合がある。形式を置き換える場合は、置き換える形式の対応関係をAPI集約装置で保持する。
また、APIやイネーブラ等が機能不全となった場合でも、それを判定し、API処理機能部が機能不全となったAPIに係る対応API及び対応イネーブラへ切り替える互換切替動作を行って、対応イネーブラに適合するリクエスト情報を対応APIを介して対応イネーブラへ送信する。これにより、API処理機能部が対応イネーブラから返信されるレスポンス情報をアプリケーションへ返信する。このため、アプリケーションを有するスマートフォン等の端末機において、所望のレスポンス情報を得ることができる。API集約装置に接続するイネーブラに繋がるAPIが、接続される前からAPI集約装置へ繋がるAPIのAPIポリシーと合致しない場合には、API集約装置でAPIのパラメータ等の形式を置き換えている場合がある。そこで、その形式を置き換える場合は、置き換える形式の対応関係をAPI集約装置で保持する。
また、APIやイネーブラ等が機能不全となった場合でも、API処理機能部が機能不全となったAPIに係る対応API及び対応イネーブラへ切り替える互換切替動作を行う。この際、変換部は、対応イネーブラから返信されたレスポンス情報を、機能不全のイネーブラから本来適正に出力されるレスポンス情報としてアプリケーションへ返信する。このため、アプリケーションを有するスマートフォン等の端末機では、イネーブラ等の機能不全による互換切替動作を意識することなく、所望の情報を見ることができる。つまり、アプリケーションの可用性向上によりユーザはサービスを継続して受けることができるようになる。
According to this configuration, even when any of the plurality of combined APIs becomes dysfunctional, information of the function concerning the dysfunctional API can be provided to the application through the corresponding API concerning the API . At least through the API, the API connected from the application to the API aggregation device and the API connected to the enabler may sometimes be replaced with a form such as a parameter of the API when the API aggregation device is intervened. When replacing the format, the correspondence of the replacement format is held in the API aggregation device.
In addition, even if API, enabler, etc. become dysfunctional, it is judged and compatibility switching operation is performed to switch to corresponding API and corresponding enabler related to API where API processing function part has become dysfunctional, and to the corresponding enabler. Send matching request information to the corresponding enabler via the corresponding API. Thereby, the API processing function unit sends response information returned from the corresponding enabler to the application. Therefore, desired response information can be obtained in a terminal such as a smartphone having an application. If the API connected to the enabler connected to the API aggregation device does not match the API policy of the API connected to the API aggregation device before connection, the API aggregation device may replace the format of the API parameter etc. . Therefore, when replacing the format, the correspondence relationship of the replacement format is held in the API aggregation device.
In addition, even when an API, enabler or the like becomes dysfunctional, a compatibility switching operation is performed to switch to a corresponding API and a corresponding enabler related to the API where the API processing function unit becomes dysfunctional. At this time, the conversion unit returns the response information returned from the corresponding enabler to the application as response information that is originally properly output from the malfunction enabler. For this reason, in a terminal such as a smartphone having an application, desired information can be viewed without being aware of the compatible switching operation due to a malfunction such as an enabler. In other words, by improving the availability of the application, the user can receive the service continuously.
請求項2に係る発明は、前記API処理機能部は、前記アプリケーションから送信されたリクエスト情報を蓄積する蓄積部を更に備え、前記判断部は、前記アプリケーションから送信されるリクエスト情報を受信したイネーブラから返信されたレスポンス情報を受信した際に、当該受信したレスポンス情報が、前記蓄積されたリクエスト情報の内容に不適合の場合に、前記イネーブラ及び前記APIを含む通信経路の双方の機能不全と判断し、この機能不全と判断した通信経路上の当該イネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在すれば、互換動作可能と判断することを特徴とする請求項1に記載のAPI集約装置である。
In the invention according to claim 2 , the API processing function unit further includes a storage unit for storing request information transmitted from the application, and the determination unit receives from the enabler having received the request information transmitted from the application. When the returned response information is received, if the received response information does not conform to the contents of the stored request information, it is determined that both the enabler and the communication path including the API fail. the corresponding API of the API connected to the enabler on the communication path it is determined that the malfunction, if present API compatibility of said database, according to
この構成によれば、次のような作用効果を得ることができる。アプリケーションへ送信されたリクエスト情報を一旦蓄積しておき、その後、アプリケーションからのリクエスト情報を受信したイネーブラからの返信レスポンス情報を受信する。判断部は、その受信したレスポンス情報が、蓄積されたリクエスト情報の内容に不適合の場合に機能不全と判断することができるので、正確に機能不全と判断することができる。 According to this configuration, the following effects can be obtained. The request information sent to the application is temporarily stored, and thereafter, the reply response information from the enabler that has received the request information from the application is received. Since the determination unit can determine that the received response information is nonconforming to the contents of the stored request information as malfunction, it can accurately determine that the response information is malfunctioning.
請求項3に係る発明は、前記判断部は、前記リクエスト情報を受信した前記イネーブラからの返信レスポンス情報が、所定時間内に受信できなかった場合に、イネーブラ及びAPIを含む通信経路の双方の機能不全と判断し、この機能不全と判断した通信経路の当該イネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在する際に、互換動作可能と判断することを特徴とする請求項1に記載のAPI集約装置である。
In the invention according to claim 3, when the determination unit can not receive the response information from the enabler which has received the request information within a predetermined time, the function of both the enabler and the communication path including the API It is determined that the compatible operation is possible when the corresponding API related to the API connected to the enabler of the communication path determined to be inoperable and determined to be inoperable exists in the API compatible information of the database. An API aggregation device according to
この構成によれば、アプリケーションへ送信されたリクエスト情報を受信したイネーブラからの返信レスポンス情報が、所定時間内に受信できなかった際に機能不全と判断するので、タイマを設けるだけ等の簡単な構成で正確に、機能不全を判断することができる。 According to this configuration, when the reply response information from the enabler that has received the request information sent to the application is judged to be malfunctioning when it can not be received within the predetermined time, a simple configuration such as only providing a timer Can accurately determine the malfunction.
請求項4に係る発明は、前記判断部は、前記リクエスト情報を受信した前記イネーブラからの返信レスポンス情報がエラー情報である場合に、イネーブラ及びAPIを含む通信経路の双方の機能不全と判断し、この機能不全と判断した通信経路の当該イネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在する際に、互換動作可能と判断することを特徴とする請求項1に記載のAPI集約装置である。
In the invention according to claim 4, when the reply response information from the enabler that has received the request information is error information, the determination unit determines that both the enabler and the communication path including the API fail. 2. The apparatus according to
この構成によれば、アプリケーションへ送信されたリクエスト情報を受信したイネーブラからの返信レスポンス情報がエラー情報であることを検出するだけで機能不全と判断するので、簡単な構成で正確に、機能不全を判断することができる。 According to this configuration, it is determined that the function is malfunctioning only by detecting that the reply response information from the enabler, which has received the request information sent to the application, is error information, so that the malfunction is accurately performed with a simple configuration. It can be judged.
請求項5に係る発明は、所定の目的を少なくとも通信を行って実現するイネーブラに繋がるAPIを複数組み合わせたアプリケーションが、所望の情報を取得するためのリクエスト情報を前記APIを介して前記イネーブラへ送信し、前記送信されたリクエスト情報を受信した前記イネーブラが前記リクエスト情報に応じたレスポンス情報を、前記APIを介して前記アプリケーションへ返信する通信システムにおいて、前記アプリケーションと前記イネーブラとの間に少なくとも前記APIを介して接続されたAPI集約装置によるAPI集約方法であって、前記API集約装置は、前記API毎に繋がる機能に互換性が有る場合に、その互換性の有るAPIの対応関係を示すAPI互換情報を記憶するデータベースを備え、前記アプリケーションから所望のイネーブラへ前記APIを介して前記リクエスト情報を送信した際に、当該リクエスト情報の内容に適合したレスポンス情報が返信されない機能不全の場合、当該機能不全のイネーブラが返信するはずのレスポンス情報と互換性のあるレスポンス情報を含む対応イネーブラからのレスポンス情報を、当該対応イネーブラに繋がる対応APIを介して当該アプリケーションへ返信するステップと、前記アプリケーションから送信されるリクエスト情報を受信したイネーブラが返信するレスポンス情報を受信した際に、当該レスポンス情報が予め定められた規定の内容に不適合の場合、当該不適合のレスポンス情報を返信したイネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在すれば、互換動作可能と判断するステップと、前記互換動作可能と判断された際に、前記不適合のレスポンス情報を返信したイネーブラへのリクエスト情報を変換する際に、共通のパラメータを用いて設計された異なる前記対応APIに繋がる対応イネーブラへのリクエスト情報の宛先において、当該宛先であるドメイン名を共通化した共通ドメインを設け、当該共通ドメインの次のパスを前記対応イネーブラを示す宛先に変換し、この変換されたリクエスト情報を対応イネーブラへ送信するステップと、前記互換動作可能と判断された際に、前記対応APIに繋がる対応イネーブラへのリクエスト情報の送信後に当該対応イネーブラから返信されたレスポンス情報を、前記不適合のレスポンス情報を返信したイネーブラから本来適正に出力されるレスポンス情報に整合するように変換するステップと、前記整合されたレスポンス情報を前記アプリケーションへ返信するステップとを実行することを特徴とするAPI互換方法である。 According to the fifth aspect of the present invention, an application combining a plurality of APIs connected to an enabler that realizes at least a predetermined object by communication transmits request information for acquiring desired information to the enabler via the API. And in the communication system in which the enabler receiving the transmitted request information returns response information corresponding to the request information to the application via the API, at least the API between the application and the enabler. The API aggregation method by an API aggregation device connected via the API, wherein the API aggregation device indicates an API correspondence relationship with compatible APIs when the functions linked to each API have compatibility. A database for storing information; Upon transmitting the request information from Deployment to the desired enabler via the API, if the response information adapted to the contents of the request information is returned that are not dysfunctional, response information that should enabler of the dysfunction replies Sending response information from the corresponding enabler including response information compatible with the above to the application via the corresponding API linked to the corresponding enabler, and the enabler receiving the request information sent from the application returns the response. When the response information is received, if the response information does not conform to the predetermined content, the corresponding API associated with the API connected to the enabler that has sent the response information of the nonconformance is the API compatible information of the database. If it exists , Different determining that interchangeable operation, when said being compatible operational and determination, when converting the request information to the enabler that returns a response information of the non-conforming, designed using a common parameter In the destination of request information to the corresponding enabler linked to the corresponding API, a common domain in which the domain name that is the destination is shared is provided, and the path following the common domain is converted to the destination indicating the corresponding enabler, and this conversion is performed. Transmitting the request information to the corresponding enabler, and when it is determined that the compatible operation is possible, the response information returned from the corresponding enabler after the transmission of the request information to the corresponding enabler linked to the corresponding API, Properly output from the enabler that has returned non-conforming response information The method is an API compatible method characterized in that the steps of converting to match the response information and returning the matched response information to the application are performed.
この方法によれば、複数組み合わせたAPIの何れかが機能不全となった場合でも、その機能不全のAPIに係る機能の情報を、そのAPIに係る対応APIを介してアプリケーションに提供することができる。 According to this method, even when any of a plurality of combined APIs becomes dysfunctional, it is possible to provide information of the function concerning the malfunctioning API to the application through the corresponding API concerning the API .
本発明によれば、複数組み合わせたAPIの1つが機能不全となった場合でも、その機能不全のAPIに係る機能の情報をアプリケーションに提供することができるAPI集約装置及びAPI互換方法を提供することができる。 According to the present invention, it is possible to provide an API aggregation device and an API compatible method capable of providing an application with information on a function related to a malfunctioning API even when one of a plurality of combined APIs becomes dysfunctional. Can.
以下、本発明の実施形態を、図面を参照して説明する。
<実施形態の構成>
図1は、本発明の実施形態に係るAPI集約装置を含む通信システムの構成を示すブロック図である。
図1に示す通信システム20は、API集約装置24と、m個のアプリケーション25a〜25mと、j個のAPI26a〜26jと、n個イネーブラ27a,27b,27c,27d,〜27nと、n個のAPI28a,28b,28c,28d,〜28nとを備えて構成されている。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
<Configuration of Embodiment>
FIG. 1 is a block diagram showing the configuration of a communication system including an API aggregation device according to an embodiment of the present invention.
The
j個のAPI26a〜26jは、API集約装置24とm個のアプリケーション25a〜25mとの間に接続ており、m個のアプリケーション25a〜25mとは個数が異なる。また、n個のAPI28a〜28nは、API集約装置24とn個のイネーブラ27a〜27nとの間に接続ており、n個のイネーブラ27a〜27nと同数である。
The
各々のアプリケーション(アプリ)25a〜25mは、クラウド等に存在し、言い換えれば、インターネットのWEB(World Wide Web)上に存在し、インターネットに接続されている。例えば、スマートフォン(スマホ)やパーソナルコンピュータ等の端末機に、アプリ(例えば25a)をインストールし、このクライアントのアプリ25aからインターネット上のアプリサーバ(図示せず)にアクセスする。アプリサーバにはプログラミングコードが書かれており、このコードの中にAPI集約装置24のAPI26a〜26jを実行するというソースコードが書かれている。このソースコードを実行すると、インターネットを介してAPI集約装置24まで信号が伝わり、API28a〜28nにアクセスする。このアクセスが行われると、API集約装置24に繋がっている例えば位置情報取得機能としてのイネーブラ27aのAPI28aから、「位置情報」を取得し、これをアプリサーバを介してスマートフォンに返すといった仕組みになっている。
The respective applications (applications) 25a to 25m exist in the cloud or the like, in other words, exist on the WEB (World Wide Web) of the Internet, and are connected to the Internet. For example, an application (for example, 25a) is installed in a terminal such as a smart phone (smartphone) or a personal computer, and an application server (not shown) on the Internet is accessed from the
イネーブラ27a〜27nは、通信処理機能を備え、位置検索や必要情報等のユーザが所望する情報を提供する等、何らかの目的を果たすための機能を有する装置である。本実施形態では、例えば1つのイネーブラ27が1つの機能を持つものとする。1つの機能とは、例えば位置情報取得機能、グルメ検索機能及びレコメンド機能等の何れか1つの機能である。但し、1つのイネーブラ27は、位置情報取得機能、グルメ検索機能、レコメンド機能の3つの機能を併せ持ったり、2つの機能を併せ持ったりできる。当然のことながら、3つを超える機能を持つ場合もある。
The
API集約装置24は、利用したいAPIの機能が不全(機能不全)となった際に、その不全となった機能に互換性のある予め対応付けられた機能のAPIを利用する処理を行う。このAPI集約装置24は、API処理機能部21、開発者ポータル機能部22及び保守運用機能部23を備える。
When the function of the API to be used fails (malfunction), the
但し、機能不全とは、アプリケーションからのリクエスト情報の内容に適合したレスポンス情報が、APIを介したイネーブラからアプリケーションへ返信されて来ない場合をいう。具体的には、機能不全とは、API単独の機能不全、APIが繋がるイネーブラ単独の機能不全、API及びイネーブラ双方の機能不全、APIが繋がる通信回線の断線や通信設備の不具合等の機能不全を含むものとする。後述には、適宜その何れかの表現を用いる。 However, malfunction means the case where response information conforming to the contents of request information from the application is not returned from the enabler via the API to the application. Specifically, dysfunction means malfunction of API alone, malfunction of enabler alone linked to API, malfunction of both API and enabler, malfunction of communication line linked to API, failure of communication facility etc. Shall be included. Either expression is used suitably later.
更に具体的には、機能不全は、例えばイネーブラとしてのグルメ検索機能等の機能であれば、ハード的又はソフト的に壊れているか、メンテナンス中で動作不能となっている等の理由で、本来行うべき正常な動作を行わない状態をいう。 More specifically, in the case of a function such as a gourmet search function as an enabler, for example, malfunction is normally performed because it is broken in hardware or software, or inoperable during maintenance, etc. It is a state where normal operation is not performed.
また、機能不全は、後述するように、レスポンス情報がリクエスト情報の内容に適合していない場合(不適合の場合)や、エラー情報が含まれる場合、全てのレスポンス情報が受信できない場合に、機能不全とすることができる。 In addition, as described later, the malfunction is a malfunction when the response information does not conform to the contents of the request information (in the case of nonconformity), when error information is included, or when all the response information can not be received. It can be done.
開発者ポータル機能部(ポータル機能部ともいう)22は、開発者がAPI集約装置24に、事前に利用する複数のAPIに対応関係を持たせる登録処理を行う。例えば、API28bとAPI28cとに何らかの共通要素がある(互換関係がある)場合に、それらAPI28bとAPI28cとが対応関係を持つように登録する。
The developer portal function unit (also referred to as a portal function unit) 22 performs a registration process in which the developer causes the
APIの対応関係は、自APIが望むレスポンス情報が、他APIから得られる関係となっていることが必要条件である。言い換えれば、2つのAPIの全体のレスポンス情報中に、少なくとも共通のレスポンス情報があることが互換性があることであり、この互換性がある場合に、対応付けを行う。この対応付けは、一方のAPIから他方のAPIへ、又は他方のAPIから一方のAPIに対応付ける一方通行の対応付けでもよい。また、一方のAPIと他方のAPIとが双方向に対応付けられていてもよい。 The correspondence relationship between the APIs is that the response information desired by the own API can be obtained from other APIs. In other words, there is compatibility in that there is at least common response information in the entire response information of the two APIs, and if there is this compatibility, the correspondence is made. This association may be a one-way association in which one API is associated with another API, or the other API is associated with one API. Also, one API and the other API may be associated in both directions.
なお、一方のAPIに対応付けられたAPIを、対応APIという。図1では、API28bにAPI28cが対応付けられているので、対応API28cという。また、イネーブラ27bにイネーブラ27cが対応付けられているので、対応イネーブラ27cという。つまり、対応APIといった場合、この対応APIに繋がるイネーブラも同様に対応イネーブラという。
The API associated with one of the APIs is called a corresponding API. In FIG. 1, since the
API処理機能部21は、イネーブラ27a〜27n側の所定のAPI(例えば28bと28c)に互換性がある場合に対応付けを行い、利用中の例えばAPI28bのイネーブラ27bが機能不全である場合に、このAPI28bに係る対応API28cに切替え、この切替えたAPI28cに接続されたイネーブラ27cを利用して、その不全となった機能を維持するAPI互換処理(単に、互換処理ともいう)を行う。
The API
この互換処理を、図2を参照して具体的に説明する。但し、本実施形態では、図2に示すように、イネーブラ27aは位置情報取得機能27aであり、イネーブラ27bはAグルメ検索機能27b、イネーブラ27cはBグルメ検索機能27c、イネーブラ27dはレコメンド機能27dであるとする。また、Aグルメ検索機能27bとBグルメ検索機能27cとは、異なる企業が提供する飲食店情報を特定する検索機能である。位置情報取得機能27aにAPI28aが繋がり、Aグルメ検索機能27bにAPI28bが繋がり、Bグルメ検索機能27cにAPI28cが繋がり、レコメンド機能27dにAPI28dが繋がっている。また、各API28a〜28dを組み合わせてアプリ25aが作成されているとする。なお、位置情報取得機能27a、Aグルメ検索機能27b、Bグルメ検索機能27c、レコメンド機能27dを、単に、機能27a、機能27b、機能27c、機能27dと称す場合もある。
This compatibility process is specifically described with reference to FIG. However, in this embodiment, as shown in FIG. 2, the
この構成において、アプリケーション25aがAPI28aを介して位置情報取得機能27aから位置情報を取得した後に、API28bを介してAグルメ検索機能27bにレスポンス情報でアクセスしたとする。この際、Aグルメ検索機能27bが×印で示すように機能不全の場合、このレスポンス情報は返ってこない。この際、API集約装置24が、Aグルメ検索機能27bと互換性があるBグルメ検索機能27cに切替え、Bグルメ検索機能27cからAPI28cを介して、その不全となったAグルメ検索機能27bと同等なレスポンスを返すことになる。これによって、Bグルメ検索機能27cからのレスポンス情報が、Aグルメ検索機能27bのレスポンス情報としてアプリ25aに返信される。
In this configuration, it is assumed that, after the
また、API処理機能部21は、認証機能、トラフィック制御機能及びIF変換機能を有する。
認証機能は、APIがインターネットに公開され、様々なユーザに使用されるため、誰に使用されているかをユーザID等で認証する機能である。
トラフィック制御機能は、検索等のための通信が使用され過ぎるとAPI集約装置24等が破損するので、破損しないようにトラフィック制御を行う機能である。
Further, the API
The authentication function is a function of authenticating who is being used by a user ID or the like because the API is published on the Internet and used by various users.
The traffic control function is a function that performs traffic control so that the
IF機能は、アプリ25a〜25mからのリクエスト情報又はレスポンス情報の変換を行う機能である。この機能によれば、例えば、軽量なデータ記述言語の1つであるJSON(JavaScript(登録商標) Object Notation)形式を、構造化されたデータを交換するための言語であるXML(Extensible Markup Language)形式に変換することができる。
The IF function is a function that converts request information or response information from the
図1に戻って、保守運用機能部23は、API集約装置24を保守する処理、実際にAPIをAPI集約装置24に接続する処理、実際にAPI互換処理が実行されているか否かを判定する処理等を行う。更に、保守運用機能部23は、検索等のための通信のトラフィック量を分析するトラフィック分析機能や、API集約装置24からグルメ検索機能等のAPIにリクエスト情報を送れるようにするエンジニアリング機能を有する。
Returning to FIG. 1, the maintenance
次に、図3にAPI集約装置24の特徴構成を示す。このAPI集約装置24は、信号受信部21aと、信号情報蓄積部(蓄積部ともいう)21bと、信号送信部21cと、互換動作実行判断部(判断部ともいう)21dと、互換動作実行部(実行部ともいう)21eと、API互換情報DB(DBともいう)21fと、信号変換部21gと、開発者ポータル機能部22とを備えて構成されている。
Next, FIG. 3 shows a characteristic configuration of the
但し、破線枠21で囲む次の要素がAPI処理機能部21(図1参照)の機能を分割した構成要素である。即ち、信号受信部21a、信号情報蓄積部21b、信号送信部21c、互換動作実行判断部21d、互換動作実行部21e、API互換情報DB21f及び信号変換部21gが、API処理機能部21の構成要素である。
However, the next element enclosed by the
なお、API互換情報DB21fは請求項記載のデータベースを構成し、信号情報蓄積部21bは請求項記載の蓄積部、互換動作実行判断部21dは請求項記載の判断部、信号変換部21gは請求項記載の変換部、信号送信部21cは請求項記載の送信部を構成する。
The API
ここで、図3のAPI集約装置24で用いられるリクエスト情報とレスポンス情報の構成を、図4を参照して説明する。
図4(a)に示すように、リクエスト情報qは、メソッド及びURI(Uniform Resource Identifier)を有するリクエスト部qrと、ヘッダ情報及び認証情報を有するヘッダ部qhと、データ形式及びパラメータを有するボディ部qbとから構成されている。
Here, configurations of request information and response information used in the
As shown in FIG. 4A, the request information q includes a request part qr having a method and a URI (Uniform Resource Identifier), a header part qh having header information and authentication information, and a body part having a data format and parameters. It consists of qb.
図4(b)に示すように、レスポンス情報pは、ステータスコードを有するレスポンス部prと、ヘッダ情報を有するヘッダ部phと、データ形式及びパラメータを有するボディ部pbとから構成されている。 As shown in FIG. 4B, the response information p is composed of a response part pr having a status code, a header part ph having header information, and a body part pb having a data format and parameters.
次に、図5(a)及び(b)に、リクエスト情報qとレスポンス情報pの構成例を示し、その説明を行う。
図5(a)に示すリクエスト情報qにおいて、リクエスト部qrの情報は、例えば、「POST/apiName/v1/calls」である。「POST」がメソッドであり、「apiName/v1/calls」がURIである。
ヘッダ部qhの情報は、例えば、「Authorization API−KEY:h47tq384」である。「Authorization」がヘッダ情報であり、「API−KEY:h47tq384」が認証情報である。
Next, FIG. 5A and FIG. 5B show configuration examples of the request information q and the response information p, and will be described.
In the request information q shown in FIG. 5A, the information of the request unit qr is, for example, “POST / apiName / v1 / calls”. "POST" is a method, and "apiName / v1 / calls" is a URI.
The information of the header part qh is, for example, “Authorization API-KEY: h47tq384”. "Authorization" is header information, and "API-KEY: h47tq384" is authentication information.
ボディ部qbの情報は、例えば、「{“name”:“Alice” “from”:”0422−59−1111” “to”:“0422−59−2222”}」である。{}内の全ての文字列がパラメータである。データ形式は、例えばJSON形式である。 The information of the body part qb is, for example, "{" name ":" Alice "" from ":" 0422-59-1111 "" to ":" 0422-59-2222 "}. All strings in {} are parameters. The data format is, for example, JSON format.
次に、図5(b)に示すレスポンス情報pにおいて、レスポンス部prの情報は、例えば、「200 OK」であり、これがステータスコードである。
ヘッダ部phの情報は、例えば、「Location http://xxx/aaa/v1/bb」であり、これがヘッダ情報である。
Next, in the response information p shown in FIG. 5B, the information of the response part pr is, for example, “200 OK”, which is a status code.
The information of the header part ph is, for example, “Location http: // xxx / aaa / v1 / bb”, which is header information.
ボディ部pbの情報は、例えば、「{“id”:“001”}」であり、これがパラメータである。データ形式は、例えばJSON形式である。 The information of the body part pb is, for example, “{“ id ”:“ 001 ”}”, which is a parameter. The data format is, for example, JSON format.
図3に戻って、DB21fは、API互換情報を記憶するものである。API互換情報は、前述したように、複数のAPIに繋がる機能に何らかの互換性がある場合に、その互換性を有するAPIの対応関係を示す情報である。API互換情報には、差分パラメータ、類似率等が有る。
Returning to FIG. 3, the
差分パラメータについて説明する。例えば、一方のAPI28bに係るリクエスト情報に、パラメータとして送信元の電話番号と送信先の電話番号が保持されており、他方のAPI28cに係るリクエスト情報に、パラメータとして送信元の電話番号と送信先のURL(Uniform Resource Locator)が保持されているとする。この場合、パラメータは共通であるが、電話番号とURLとに差分があるので、これを差分パラメータという。
類似率は、2つのAPI28b,28cに係る各全体情報における類似した情報の比率である。例えば、類似率は、全体情報(例えば100)から差分パラメータ等の差分(例えば20)を減算した結果(80)が、全体情報(100)に占める割合である。
The difference parameter will be described. For example, in the request information related to one of the
The similarity rate is a ratio of similar information in each overall information according to the two
ポータル機能部22は、DB21fから、矢印Y0で示す信号により、API処理機能部21により公開されているAPIに互換性のあるAPI互換情報を取得し、このAPI互換情報に応じて各APIを対応付けて登録する。
The
ここで、アプリ開発者30は、図示せぬ通信端末機により、矢印Y1で示す信号により、API利用時に利用するAPIと、これに対応付けられているAPIとを、ポータル機能部22から選択し、これらの選択したAPIを、破線矢印Y2で示す信号によりアプリ25aに関連付ける。
Here, the
アプリ25aは、矢印Y3で示す信号により、API集約装置24を介して、当該アプリ25aに関連付けられたAPI(例えば図1の28b)に向けてリクエスト情報を送信する。この送信されたリクエスト情報は、API集約装置24の信号受信部21aで受信される。
The
信号受信部21aは、矢印Y4で示す信号により、受信したリクエスト情報を蓄積部21bに記憶して蓄積する。また、信号受信部21aは、矢印Y5で示す信号により、同リクエスト情報を信号送信部21cへ出力する。
The
信号送信部21cは、矢印Y6で示す信号により、そのリクエスト情報をAPI28b(図1参照)を介してイネーブラ27bへ送信する。
イネーブラ27bは、受信したリクエスト情報に応じたレスポンス情報を、矢印Y7で示す信号により、API28b(図1参照)を介して信号受信部21aへ送信する。
信号受信部21aは、イネーブラ27bから受信したレスポンス情報を、矢印Y8で示す信号により、判断部21dへ出力する。
The
The
The
判断部21dは、信号受信部21aからレスポンス情報を受信すると、蓄積部21bから矢印Y9で示す信号により、受信したレスポンス情報に対応するリクエスト情報を取得する。更に、判断部21dは、DB21fから矢印Y10で示す信号により、ポータル機能部22で先に取得され、矢印Y3で示したリクエスト情報の送信契機となったAPI互換情報を取得する。
When the
更に、判断部21dは、上記の取得したリクエスト情報へのレスポンス情報の対応関係から、当該レスポンス情報の送信元のイネーブラ27bが正常か、機能不全かを判断する。この機能不全とは、(1)レスポンス情報を受信せず、タイムアウトとなった場合、(2)レスポンス情報としてエラー情報が返ってきた場合、(3)所望以外のレスポンス情報が返ってきた場合等である。
Further, the
判断部21dの判断において、レスポンス情報の内容がリクエスト情報の内容に適合していれば、正常なので、この場合、レスポンス情報は、実行部21e及び信号変換部21gを通過して信号送信部21cから、API26b(図1参照)を介してアプリ25aへ返信される。
Since it is normal if the content of the response information conforms to the content of the request information in the determination of the
一方、レスポンス情報の内容がリクエスト情報の内容と全く対応していなかったり、レスポンス情報の内容が、この送信元のイネーブラ27bの機能不全を示す情報である場合、判断部21dは、イネーブラ27bが機能不全と判断する。
On the other hand, when the content of the response information does not correspond to the content of the request information at all or the content of the response information is information indicating the malfunction of the
この機能不全と判断した判断部21dは、先に取得したAPI互換情報によりAPI互換動作(互換動作ともいう)が可能か否かを判断する。つまり、レスポンス情報の送信元のイネーブラ27bに、他のイネーブラが対応付けられているか否かを判断する。対応付けられていない場合、判断部21dは互換動作が不可能と判断する。この場合、判断部21dは、矢印Y11で示す信号により、実行部21eへ互換動作不可能の情報を出力する。この情報を受けた実行部21eは、エラー情報を、矢印Y12,Y13,Y14で示す信号により、実行部21e及び信号変換部21gを介して信号送信部21cから、API26b(図1参照)を更に介してアプリ25aへ返信する。これにより、アプリ25aに係る例えばスマートフォンのユーザは、所望の検索内容が検索不能であることを認識できる。
The
一方、レスポンス情報の送信元のイネーブラ27bに、他のイネーブラ(例えば27c)が対応付けられている場合、判断部21dは互換動作が可能と判断する。この場合、判断部21dは、矢印Y11で示す信号により、実行部21eへ互換動作可能の情報を出力する。互換動作可能を受けた実行部21eは、矢印Y12で示す信号により、機能不全のイネーブラ27b及びこれに対応付けられたイネーブラ27cのAPI互換情報を信号変換部21gへ出力する。
On the other hand, when another enabler (for example, 27c) is associated with the
信号変換部21gは、機能不全のイネーブラ27bへAPI28bを介して送信されたリクエスト情報を、対応イネーブラ27cに繋がる対応API28cへのリクエスト情報に変換し、これを、矢印Y13で示す信号により、信号送信部21cへ出力する。信号送信部21cは、その対応API28cへのリクエスト情報を、矢印Y15で示す信号により、API28c(図1参照)を介して対応イネーブラ27cへ送信する。
The
対応イネーブラ27cは、受信したリクエスト情報に応じたレスポンス情報を、矢印Y16で示す信号により信号受信部21aへ送信する。この信号受信部21aは、受信したレスポンス情報を、矢印Y17で示す信号により信号変換部21gへ出力する。
The
信号変換部21gは、対応イネーブラ27cから受信したレスポンス情報を、機能不全のイネーブラ27bから本来適性に出力されるレスポンス情報に整合するように変換し、この変換されたレスポンス情報を、矢印Y18で示す信号により、信号送信部21cへ入力する。信号送信部21cは、その入力されたレスポンス情報を、矢印Y14で示す信号により、API26bを介してアプリ25aへ送信する。
The
この際、アプリ25aへのレスポンス情報が、対応イネーブラ27c(又は対応API28c)からの情報である内容を付してもよい。また、対応イネーブラ27c(又は対応API28c)からの応答であるレスポンス情報が、アプリ25aの所望の応答になるようにレスポンス情報を変更して、アプリ25aへ返信してもよい。この場合、図4(b)に示したレスポンス情報pのレスポンス部pr、ヘッダ部ph及びボディ部pbの何れかの情報を変更することになる。例えば、図5(b)に示すボディ部pbでは、データ形式がJSON形式であるが、これをXML形式に変換することができる。
At this time, the response information to the
なお、信号変換部21gは、上述したように、対応イネーブラ27cから受信したレスポンス情報を、本来適性に出力されるレスポンス情報に整合するように変換するが、この変換を行わず、その受信したレスポンス情報をアプリ25aへ送信するようにしてもよい。
Note that, as described above, the
このような構成の図3に示すAPI集約装置24は、各機能部を、リクエスト情報に対する処理部と、レスポンス情報に対する処理部とを分けて構成してもよい。
The
次に、前述した互換動作のパターンについて説明する。互換動作のパターンは、図6及び図7に示すように、第1〜第4の4つのパターンがある。図6(a)に第1パターン、(b)に第2パターン、図7(a)に第3パターン、(b)に第4パターンを示す。但し、全てのパターンにおいて、イネーブラ27bにイネーブラ27cが対応付けられているとする。これにより、各イネーブラ27b,27cに繋がるAPI28bにAPI28cが対応付けられ、また、アプリ25a側のAPI26bにAPI26cが対応付けられている。
Next, the pattern of the compatible operation described above will be described. There are four patterns of the compatible operation, as shown in FIG. 6 and FIG. 7. 6A shows a first pattern, FIG. 7B shows a second pattern, FIG. 7A shows a third pattern, and FIG. 7B shows a fourth pattern. However, it is assumed that the
図6(a)及び(b)に示す第1及び第2パターンは、互換動作として、×印で示す機能不全となったイネーブラ27bに繋がるAPI28bに代わりに、矢印q3で示すように、アプリ25a側の対応API26cにリクエストする場合のパターンである。
In the first and second patterns shown in FIGS. 6A and 6B, as the compatible operation, the
図6(a)に示す第1パターンは、アプリ25aから矢印q1,q2で示すように、API26b、API集約装置24、API28bを介してイネーブラ27bへリクエスト情報を送信したが、イネーブラ27bが×印で示すように機能不全であり、この不全内容のレスポンス情報が、矢印p1で示すようにAPI集約装置24に返ってきた場合である。この場合、API集約装置24は、互換動作が可能か否かを判断し、可能な場合に、矢印q3で示すように、アプリ25a側のAPI26cにリクエスト情報を送信する。
In the first pattern shown in FIG. 6A, as indicated by arrows q1 and q2 from the
このリクエスト情報は、矢印q4で示すように対応API28cを介して対応イネーブラ27cへ送信される。これにより、対応イネーブラ27cがそのリクエスト情報に応じたレスポンス情報を、矢印p2で示すようにAPI集約装置24へ送信する。API集約装置24は、対応イネーブラ27cから受信したレスポンス情報を、機能不全のイネーブラ27bから本来適性に出力されるレスポンス情報に整合するように変換し、この変換されたレスポンス情報を、矢印p3,p4で示すように、API26bを介してアプリ25aへ返信する。
This request information is transmitted to the
図6(b)に示す第2パターンにおいて、矢印q1,q2,p1,q3,q4,p2の順序で示す動作は、第1パターンと同様である。この後、矢印p2で示す対応イネーブラ27cからのレスポンス情報を受信したAPI集約装置24は、対応イネーブラ27cから受信したレスポンス情報を、機能不全のイネーブラ27bから本来適性に出力されるレスポンス情報に整合するように変換し、この変換されたレスポンス情報を、矢印p5で示すように、API26cを介してアプリ25aへ返信する。
In the second pattern shown in FIG. 6B, the operation shown in the order of arrows q1, q2, p1, q3, q4, p2 is the same as the first pattern. Thereafter, the
図7(a)及び(b)に示す第3及び第4パターンは、互換動作として、×印で示す機能不全となったイネーブラ27bに繋がるAPI28bに代わりに、矢印q5で示すように、対応イネーブラ27c側の対応API28cにリクエストする場合のパターンである。
The third and fourth patterns shown in FIGS. 7A and 7B correspond to the corresponding enabler as indicated by an arrow q5 instead of the
図7(a)に示す第3パターンにおいて、矢印q1,q2,p1の順序で示す動作は、第1パターンと同様である。この後、矢印q4で示すように、機能不全のイネーブラ27bからの不全内容のレスポンス情報を受信したAPI集約装置24は、互換動作が可能か否かを判断し、可能な場合に、矢印q5で示すように、対応API28cを介して対応イネーブラ27cへリクエスト情報を送信する。
In the third pattern shown in FIG. 7A, the operation shown in the order of arrows q1, q2 and p1 is the same as the first pattern. After that, as indicated by the arrow q4, the
このリクエスト情報は、矢印q4で示すように対応API28cを介して対応イネーブラ27cへ送信される。これにより、対応イネーブラ27cがそのリクエスト情報に応じたレスポンス情報を、矢印p2で示すようにAPI集約装置24へ送信する。API集約装置24は、対応イネーブラ27cから受信したレスポンス情報を、機能不全のイネーブラ27bから本来適性に出力されるレスポンス情報に整合するように変換し、この変換されたレスポンス情報を、矢印p3,p4で示すように、API26bを介してアプリ25aへ返信する。これにより、アプリ25aに係る例えばスマートフォンのユーザは、所望の検索内容を確認することができる。
This request information is transmitted to the
図7(b)に示す第4パターンにおいて、矢印q1,q2,p1,q5,q4,p2の順序で示す動作は、第3パターンと同様である。この後、矢印p2で示す対応イネーブラ27cからのレスポンス情報を受信したAPI集約装置24は、対応イネーブラ27cから受信したレスポンス情報を、機能不全のイネーブラ27bから本来適性に出力されるレスポンス情報に整合するように変換し、この変換されたレスポンス情報を、矢印p5で示すように、API26cを介してアプリ25aへ返信する。
In the fourth pattern shown in FIG. 7B, the operation shown in the order of arrows q1, q2, p1, q5, q4, and p2 is the same as the third pattern. Thereafter, the
このような第1〜第4パターンの互換動作は、図3に示したAPI集約装置24の判断部21dが互換動作可能と判断した際に、実行部21eを介して信号送信部21cが行うようになっている。実質的には、信号送信部21cに第1〜第4パターンの何れか1つの互換動作を行うためのプログラムや回路が予め形成されている。
Such compatible operation of the first to fourth patterns is performed by the
<実施形態の動作>
次に、本実施形態に係るAPI集約装置24による互換動作を説明する。但し、互換動作として上述した第2パターンの場合を代表して説明する。図8に第2パターンの構成図を示す。
<Operation of Embodiment>
Next, the compatible operation by the
また、図9に第2パターンの互換動作において送受信されるリクエスト情報qの具体例を示し、図10にレスポンス情報pの具体例を示し、図11(a)にリクエスト情報のパラメータ(リクエストパラメータ)の具体例を示し、図11(b)にレスポンス情報のパラメータ(レスポンスパラメータ)の具体例を示す。これらの図9〜図11に示すリクエスト情報q及びレスポンス情報pの具体例は、図4(a)及び(b)に示したリクエスト情報q及びレスポンス情報pの基本構成に対応している。 Further, FIG. 9 shows a specific example of request information q transmitted / received in the compatible operation of the second pattern, FIG. 10 shows a specific example of response information p, and FIG. 11 (a) shows parameters (request parameters) of request information. A specific example of the parameter of (response parameter) of the response information is shown in FIG. The specific examples of the request information q and the response information p shown in FIGS. 9 to 11 correspond to the basic configurations of the request information q and the response information p shown in FIGS. 4A and 4B.
図9に示すリクエスト情報qは、当該リクエスト情報qのリクエスト項目(リクエスト形式)として、メソッド種別、URI形式、ヘッダ情報、認証情報、データ形式を記載している。図10に示すレスポンス情報pは、当該レスポンス情報pのレスポンス項目(レスポンス形式)として、ステータスコード、ヘッダ情報、データ形式を記載している。 The request information q shown in FIG. 9 describes, as a request item (request format) of the request information q, a method type, a URI format, header information, authentication information, and a data format. The response information p illustrated in FIG. 10 describes a status code, header information, and a data format as a response item (response format) of the response information p.
本互換動作を行うための互換性の例では、パラメータの互換性について説明する。但し、パラメータ以外にも互換性を保つことが可能である。APIを集約する本実施形態のAPI集約装置24(図8参照)では、受信したリクエスト情報q及び、送信するレスポンス情報p、送受信する信号の全てについて互換のための変換を可能とする機能を持つ。例えば、認証情報(具体例は図5参照)が異なる場合に、当該認証情報を統一すること、図10に示すデータ形式を異なる形式に変換、例えばJSON形式をXML形式に変換(又はXML形式をJSON形式に変換)することが可能である。つまり、データ形式が異なっていても互換性を保つことができる。 The example of compatibility for performing this compatible operation describes the compatibility of parameters. However, it is possible to maintain compatibility other than parameters. The API aggregation device 24 (see FIG. 8) according to the present embodiment that aggregates the API has a function that enables conversion for compatibility with all of the received request information q, the response information p to be transmitted, and the signals to be transmitted and received. . For example, when the authentication information (see the example in FIG. 5) is different, unify the authentication information, convert the data format shown in FIG. 10 into a different format, eg convert the JSON format into an XML format (or convert the XML format It is possible to convert into JSON format. That is, compatibility can be maintained even if the data format is different.
図8に示すAグルメ検索機能27bとBグルメ検索機能27cとは、前述したように、異なる企業が提供する飲食店情報を特定する検索機能である。アプリ25aから各検索機能27b,27cに、図11(a)に示すリクエストパラメータとしての店舗名と、緯度及び経度とをリクエスト情報で与えると、図11(b)に示すレスポンスパラメータとしての住所、カテゴリ及びURLがレスポンス情報として返信されるようになっている。
As described above, the A
図9のURI形式に示すように、Aグルメ検索機能27bの送信先は、「http://api.sample.com/gourmetA/」となっている。これは、APIを集約するAPI集約装置24で該当のAPIを公開するときに、「http://api.sample.com/」というようにドメイン名を共通化してAPIをリストとして公開しているためである。
As shown in the URI format of FIG. 9, the transmission destination of the A
図11(a)及び(b)に示すAグルメ検索機能27b及びBグルメ検索機能27cの各々は、リクエスト情報q及びレスポンス情報pの各々に含むパラメータの意味は全く同じで、名称が異なる場合を示している。例えば、店舗名を表すAグルメ検索機能27bでは「name」が、Bグルメ検索機能27cでは「ShopName」となっているが、全く同じ内容を表している。このため、その単語の比較対象リストを、API互換情報DB21f(図3参照)に保持することで互換性を表すことができる。また、API26b,26cでは、異なるAPIであっても同じ意味のパラメータは同じパラメータ名で設計している。
In each of the A
このような内容のリクエスト情報q及びレスポンス情報pが用いられる場合において、本実施形態のAPI集約装置24による第2パターンの場合の互換動作を、図12及び図13に示すフローチャートを参照して説明する。
When the request information q and the response information p having such contents are used, the compatible operation in the case of the second pattern by the
但し、ユーザが図示せぬスマホで飲食店情報を検索するものとする。この際に、スマホに図8に示すアプリケーション25aをインストールし、そのアプリ25aからインターネットを介して各API28a〜28dにアクセスして、各機能27a〜27dから所望の飲食店情報を取得するものとする。
However, it is assumed that the user searches restaurant information with a smartphone (not shown). At this time, the
図12に示すステップS1において、アプリケーション25aが飲食店の位置情報取得のためのリクエスト情報qを、矢印q11で示す信号により、API26a、API集約装置24、API28aを介して位置情報取得機能27aへ送信する。このリクエスト情報qを受信した位置情報取得機能27aは、リクエスト情報qに応じた位置情報のレスポンス情報pを、矢印p11で示す信号により、API28a、API集約装置24、API26aを介してアプリ25aへ返信する。これにより、アプリ25aで飲食店の位置情報が取得される。
In step S1 shown in FIG. 12, the
これにより、スマホに飲食店の位置が表示され、ユーザは、その位置の周辺にどの様な飲食店があるかを検索可能となる。ここでユーザが、スマホにおいて、その飲食店検索のための操作を行ったとすると、次のような動作が実行される。 As a result, the position of the restaurant is displayed on the smartphone, and the user can search what kind of restaurant is located around the position. Here, if the user performs an operation for restaurant search in the smartphone, the following operation is performed.
ステップS2において、アプリ25aはAPI集約装置24に対して、Aグルメ検索機能27bのAPI26b「例えば図9に示すhttp://api.sample.com/gourmetA」に、次の文字列のリクエスト情報q(矢印q12)を送信する。
このリクエスト情報qは、例えば「GET http://api.sample.com/gourmetA?name=xxx&latitude=36.124&longitude=136.224」である。
このリクエスト情報qは、API集約装置24の蓄積部21b(図3)に一旦記憶(蓄積)される。
In step S2, the
The request information q is, for example, “GET http://api.sample.com/gourmetA?name=xxx&latitude=36.124&longitude=136.224”.
The request information q is temporarily stored (stored) in the
次に、ステップS3において、API集約装置24は、上記ステップS2で受信したリクエスト情報qを、矢印q13で示す信号により、API28b「例えば図9に示すhttp://shopA.xsample.com/searchGourmetA」を介してAグルメ検索機能27bへ送信する。
Next, in step S3, the
この送信されるリクエスト情報qは、例えば「GET http://shopA.xsample.com/searchGourmetA?name=xxx&latitude=36.124&longitude=136.224」である。 The transmitted request information q is, for example, “GET http://shopA.xsample.com/searchGourmetA?name=xxx&latitude=36.124&longitude=136.224”.
ステップS4において、Aグルメ検索機能27bは、受信したリクエスト情報qに応じたレスポンス情報pを、矢印p13で示す信号により、API28bを介してAPI集約装置24へ返信する。
In step S4, the A
ここで、ステップS5において、API集約装置24は、上記ステップS4で受信されたレスポンス情報pが、タイムアウトとならず適正に受信されたか否かを判断する。この結果、適正に受信された場合(Yes)、ステップS6において、API集約装置24は、レスポンス情報pにエラー情報が無いか否かを判断する。この結果、エラー情報が無ければ(Yes)、ステップS7において、API集約装置24は、上記ステップS3で記憶したリクエスト情報を蓄積部21bから取得する。
Here, in step S5, the
ステップS8において、API集約装置24は、上記ステップS5で受信されたレスポンス情報pが、上記ステップS7で取得されたリクエスト情報qの内容に適合しており、所望のレスポンス情報pか否かを判断する。この結果、所望のレスポンス情報pであれば(Yes)、ステップS9に進む。
In step S8, the
ステップS9において、API集約装置24は、所望のレスポンス情報pがAPI28bに係る対応API(又は対応機能)28cからのレスポンス情報が否かを判断する。この結果が、対応API(又は対応機能)からのレスポンス情報で無ければ(No)、ステップS10において、API集約装置24は、レスポンス情報をAPI26bを介してアプリ25aへ返信(図8には矢印で示さず)する。これにより、アプリ25aに係るスマートフォンのユーザは、所望の検索内容を確認することができる。
In step S9, the
一方、上記ステップS5において、タイムアウトとなりレスポンス情報pが受信されなかったと判断(No)された場合、上記ステップS6において、レスポンス情報pにエラー情報があると判断(No)された場合、上記ステップS8において、レスポンス情報pが所望のレスポンス情報でないと判断(No)された場合の、何れかの場合は、図13に示すステップS11へ進む。但し、それらステップS5,S6,S8の何れかの判断が(No)の場合は、Aグルメ検索機能27bが機能不全の場合である。
On the other hand, if it is determined in step S5 that a timeout has occurred and it is determined that the response information p has not been received (No), if it is determined in step S6 that error information is present in the response information p (No), the step S8 is performed. In any case where it is determined that the response information p is not the desired response information (No), the process proceeds to step S11 shown in FIG. However, in the case where the judgment in any one of the steps S5, S6 and S8 is (No), it is a case where the A
ステップS11において、API集約装置24は、レスポンス情報pを受信したAグルメ検索機能27bに繋がるAPI28bのAPI互換情報を、DB21fから検索して取得する。
In step S11, the
ステップS12において、API集約装置24は、その取得したAPI互換情報により、Aグルメ検索機能27bの互換動作が可能か否かを判断する。この結果、不可能(No)と判断された場合、ステップS13において、API集約装置24は、レスポンス情報pとしてエラー情報をアプリ25aへ返信(図8には矢印で示さず)する。これにより、アプリ25aに係るスマートフォンのユーザは、所望の検索内容が検索不能であることを認識できる。
In step S12, the
一方、上記ステップS12において、互換動作が可能(Yes)と判断された場合、ステップS14において、API集約装置24は、図8に示すAグルメ検索機能27bへAPI26b,28bを介して送信されたリクエスト情報q12を、Aグルメ検索機能27bに対応付けられたBグルメ検索機能27cに繋がる対応API26cへのリクエスト情報qcに変換する。
On the other hand, if it is determined in step S12 that the compatible operation is possible (Yes), in step S14, the
この変換されたリクエスト情報qcは、ステップS15において、図8に矢印q14で示す信号により対応API26cへ送信され、更に、API集約装置24から矢印q15で示す信号により、API28cを介してBグルメ検索機能27cへ送信される。
The converted request information qc is transmitted to the corresponding
但し、上記の矢印q14で示すリクエスト情報qcは、例えば図9に示すBグルメ検索機能27cのAPI26cのURI形式の「GET http://api.sample.com/gourmetB?shop=xxx&lat=36.124&long=136.224」である。
However, the request information qc indicated by the above arrow q14 is, for example, "GET http://api.sample.com/gourmetB? Shop = xxx & lat = 36.124 & long" in the URI format of the
また、矢印q15で示すリクエスト情報qcは、例えば図9に示すBグルメ検索機能27cのAPI28cのURI形式の「GET http://shopB.ysample.com/shopSearchB?ShopName=xxx&Lattitude=36.124&Longitude=136.224」である。
Further, the request information qc indicated by the arrow q15 is, for example, “GET http://shopB.ysample.com/shopSearchB?ShopName=xxx&Lattitude=36.124&Longitude=136” of the URI format of the
Bグルメ検索機能27cは、図12に示すステップS4において、受信したリクエスト情報qcに応じたレスポンス情報pcを、矢印p14で示す信号により、API28cを介してAPI集約装置24へ返信する。
In step S4 shown in FIG. 12, the B
上記の矢印p14で示すレスポンス情報pcは、例えば「ShopAddress:住所、GenreName:お店ジャンル、ShopUrl:店舗URL」である。 The response information pc indicated by the arrow p14 is, for example, "Shop Address: address, Genre Name: store genre, Shop Url: store URL".
次に、上述したステップS5,S6,S8の判断結果がNoであれば、ステップS11へ進み、以降上述した処理が同様に行われる。この際、図13のステップS11,S12と進み、ステップS12においてBグルメ検索機能27cの次のグルメ検索機能が無いので、Noと判定され、ステップS13においてエラー情報がアプリ25aへ送信されて処理が終了する。
Next, if the judgment result of step S5, S6, S8 mentioned above is No, it will progress to step S11 and the process mentioned above will be performed similarly. At this time, the process proceeds with steps S11 and S12 in FIG. 13, and there is no gourmet search function next to the B
一方、ステップS5,S6,S8の判断結果がYesであれば、ステップS9において、API集約装置24は、受信したレスポンス情報pcが対応API(又は対応機能)からのレスポンス情報が否かを判断する。この結果が、対応API(又は対応機能)としてのAPI28cを介したBグルメ検索機能27cからのレスポンス情報pcで有れば(Yes)、ステップS16に進む。
On the other hand, if the determination result in steps S5, S6, and S8 is Yes, in step S9, the
ステップS16において、API集約装置24は、レスポンス情報pcを、機能不全のAグルメ検索機能27bから本来適性に出力されるレスポンス情報pb1に整合するように変換する。
この変換されたレスポンス情報pb1は、例えば「address:住所、category:お店ジャンル、url:店舗URL」となる。
In step S16, the
The converted response information pb1 is, for example, "address: address, category: store genre, url: store URL".
そして、ステップS10において、API集約装置24は、その変換したレスポンス情報pb1を、図8の矢印p15で示す信号により、API26cを介してアプリ25aへ送信する。これにより、アプリ25aに係るスマートフォンのユーザは、所望の検索内容を確認することができる。
Then, in step S10, the
なお、ユーザが、スマホのアプリ13で検索した飲食店から、更に、嗜好する飲食物を検索したとする。この場合、その検索によるリクエスト情報qdが、矢印q16で示す信号により、API26d、API集約装置24、API28dを介してレコメンド機能27dへ送信される。レコメンド機能27dは、ユーザが嗜好する飲食物の情報であるレスポンス情報pdを、矢印p16で示す信号により、API28d、API集約装置24、API26dを介してアプリ25aへ返信する。これにより、アプリ25aでユーザが嗜好する飲食物の情報が取得されて表示される。
In addition, it is assumed that the user further searches for favorite food and drink from the restaurant searched by the
<実施形態の効果>
以上説明した本実施形態のAPI集約装置24は、図2に示す通信システムのアプリケーション25aとイネーブラ27a〜27dとの間に少なくともAPI26a,28a〜28dを介して接続されている。通信システムは、所定の目的を少なくとも通信を行って実現するイネーブラ27a〜27dに繋がるAPI28a〜28dを複数組み合わせたアプリケーション25aを有する。このアプリケーション25aが、所望の情報を取得するためのリクエスト情報を、情報インターフェイスであるAPI26a,28a〜28dを介してイネーブラ27へ送信する。この送信したリクエスト情報を受信したイネーブラ27a〜27dが当該リクエスト情報に応じたレスポンス情報を、API28a〜28d,26aを介してアプリケーション25aへ返信するようになっている。但し、「少なくともAPIAPI26a,28a〜28dを介して」というのは、アプリケーション25aからAPI集約装置24に繋がるAPI26aとイネーブラ27a〜27dに繋がるAPI28a〜28dとは、API集約装置24を介する際にAPI28a〜28dのパラメータ等の形式が置き換えられている場合がある。形式を置き換える場合は、置き換える形式の対応関係をAPI集約装置24で保持する。
<Effect of the embodiment>
The
本実施形態の特徴は、アプリケーション25aから所望のイネーブラ27bへAPI26b,28bを介してリクエスト情報を送信した際に、当該リクエスト情報の内容に適合したレスポンス情報が返信されない機能不全の場合、当該機能不全のイネーブラ27bに予め対応付けられた対応イネーブラ27cからのレスポンス情報を、当該対応イネーブラ27cに繋がる対応API28cを介して当該アプリケーション25aへ返信するAPI処理機能部21を備えることにある。
A feature of the present embodiment is that, when request information is transmitted from the
これによって、複数組み合わせたAPI28a〜28dの何れかが機能不全となった場合でも、その機能不全の例えばAPI28bに係る機能の情報を、そのAPI28bに係る対応API28cを介してアプリケーション25aに提供することができる。
By this, even when any of the plurality of combined
API処理機能部21は、DB21fと、判断部21d、変換部としての信号変換部21gと、送信部としての信号送信部21cとを備える構成とした。
DB21fは、API毎に繋がる機能に何らかの互換性が有る場合に、その互換性の有るAPI28b,28cの対応関係を示すAPI互換情報を記憶する。
The API
The
判断部21dは、アプリケーション25aから送信されるリクエスト情報を受信したイネーブラ27bからの返信レスポンス情報を受信した際に、当該受信レスポンス情報が予め定められた規定の内容に不適合の場合、又は、当該受信レスポンス情報が当該リクエスト情報の内容に不適合の場合、当該不適合のレスポンス情報を返信したイネーブラ27bに繋がるAPI28bに係る対応API28cが、DB21fのAPI互換情報に存在すれば、互換動作可能と判断する。
When the
信号変換部21gは、判断部21dで互換動作可能と判断された際に、不適合のレスポンス情報を返信したイネーブラ27bへの送信リクエスト情報を、対応API28cに繋がる対応イネーブラ27cへのリクエスト情報に変換し、この変換されたリクエスト情報を対応イネーブラ27cへ送信する。
信号送信部21cは、変換されたリクエスト情報を受信した対応イネーブラ27から返信されるレスポンス情報を、アプリケーション25aへ返信する。
The
The
この構成によれば、API28bやイネーブラ27b等が機能不全となった場合でも、API処理機能部21が機能不全となったAPI28bに係る対応API28c及び対応イネーブラ27cへ切り替える互換切替動作を行って、対応イネーブラ27cへの適合リクエスト情報を対応API28cを介して対応イネーブラ27cへ送信し、これにより対応イネーブラ27cから返信されるレスポンス情報をアプリケーション25aへ返信する。このため、アプリケーション25aを有するスマートフォン等の端末機において、所望のレスポンス情報を得ることができる。但し、API集約装置24に接続するイネーブラ27cに繋がるAPI28cが、接続される前からAPI集約装置24へ繋がるAPI28bのAPIポリシーと合致しない場合には、API集約装置24でAPI28cのパラメータ等の形式を置き換えている場合がある。そこで、その形式を置き換える場合は、置き換える形式の対応関係をAPI集約装置24で保持する。
According to this configuration, even when the
また、この構成の場合、後述するような、対応API28cのレスポンス情報を、元のAPI28bのレスポンス情報に合った形への変換処理を行わない。このため、実行速度のオーバーヘッドがかからないというメリットがある。レスポンス情報は、API集約装置24で提供しているAPI28cからレスポンスが返るため、互換性を考慮したAPI設計をAPI集約装置24で行うことで、レスポンス時の変換処理や互換動作を意識したアプリ開発を考慮せず互換動作を行うことができる。
Further, in the case of this configuration, conversion processing of response information of the corresponding
更に、この構成の場合、対応API28cを実行する際は、API集約装置24からAPI28cにリクエストを送る。このため、API集約装置24から提供するAPIの設計ポリシーを、リクエスト情報(メソッド・パラメータ等)に対する互換性を考慮した設計にしておく。この設計により、互換動作を行う際にリクエスト情報の複雑な変換処理をしなくても軽微の変更(リクエスト情報の宛先の変更等)で再送すればよいため、互換動作による実行速度のオーバーヘッドの削減を行うことが可能となる。また、互換動作のための変換処理をAPI集約装置24にて新規に実装する際に開発コストを削減することができる。
Furthermore, in the case of this configuration, when executing the corresponding
次に、API処理機能部21は、アプリケーション25aから送信されたリクエスト情報を蓄積する蓄積部21bを更に備える。この際に、判断部21dは、蓄積されたと同じリクエスト情報を受信したイネーブラ27bからの返信レスポンス情報が、所定時間内に受信できなかった場合にイネーブラ27b及びAPI28bを含む通信経路の機能不全と判断し、この機能不全と判断した通信経路に介在するAPI28bに係る対応API28cが、DB21fのAPI互換情報に存在する際に、互換動作可能と判断するようにした。
Next, the API
この構成によれば、次のような作用効果を得ることができる。アプリケーション25aへ送信されたリクエスト情報を蓄積部21bに一旦蓄積しておき、その後、アプリケーション25aからのリクエスト情報を受信したイネーブラ27bからの返信レスポンス情報を受信する。判断部21dが、その受信したレスポンス情報が、蓄積されたリクエスト情報の内容に不適合の場合に機能不全と判断することができるので、正確に機能不全と判断することができる。
According to this configuration, the following effects can be obtained. The request information transmitted to the
次に、判断部21dは、リクエスト情報を受信したイネーブラ27bからの返信レスポンス情報が、所定時間内に受信できなかった場合にイネーブラ27b及びAPI28bを含む通信経路の機能不全と判断し、この機能不全と判断した通信経路に介在するAPI28bに係る対応API28cが、DB21fのAPI互換情報に存在する際に、互換動作可能と判断するようにした。
Next, when the reply response information from the
この構成によれば、アプリケーション25aへ送信されたリクエスト情報を受信したイネーブラ27bからの返信レスポンス情報が、所定時間内に受信できなかった際に機能不全と判断するので、タイマを設けるだけ等の簡単な構成で正確に、機能不全を判断することができる。
According to this configuration, when the reply response information from the
次に、判断部21dは、リクエスト情報を受信したイネーブラ27bからの返信レスポンス情報がエラー情報である場合にイネーブラ27b及びAPI28bを含む通信経路の機能不全と判断し、この機能不全と判断した通信経路上のAPI28bに係る対応API28cが、DB21fのAPI互換情報に存在する際に、互換動作可能と判断するようにした。
Next, when the reply response information from the
この構成によれば、アプリケーション25aへ送信されたリクエスト情報を受信したイネーブラ27bからの返信レスポンス情報がエラー情報であることを検出するだけで機能不全と判断するので、簡単な構成で正確に、機能不全を判断することができる。
According to this configuration, it is determined that the function is malfunctioning only by detecting that the reply response information from the
次に、信号変換部21gは、判断部21dで互換動作可能と判断された際に、対応API28cに繋がる対応イネーブラ27cへのリクエスト情報の送信後に当該対応イネーブラ27cから返信されたレスポンス情報を、不適合のレスポンス情報を返信したイネーブラ27bから本来適正に出力されるレスポンス情報に整合するように変換する。更に、信号送信部21cは、その整合されたレスポンス情報をアプリケーション25aへ返信するようにした。
Next, when the
この構成によれば、API28bやイネーブラ27b等が機能不全となった場合でも、API処理機能部21が機能不全となったAPI28bに係る対応API28c及び対応イネーブラ27cへ切り替える互換切替動作を行う。この際、信号変換部21gは、対応イネーブラ27cから返信されたレスポンス情報を、機能不全のイネーブラ27bから本来適正に出力されるレスポンス情報としてアプリケーション25aへ返信する。このため、アプリケーション25aを有するスマートフォン等の端末機では、イネーブラ27等の機能不全による互換切替動作を意識することなく、所望の情報を見ることができる。つまり、アプリケーション25aの可用性向上によりユーザはサービスを継続して受けることができるようになる。
According to this configuration, even when the
また、この構成の場合、イネーブラ27cからのレスポンス情報によるレスポンスが、元のAPI28bの動作として動くため、アプリ25aは互換動作を意識せずアプリ開発を行うことができる。
Further, in the case of this configuration, since the response by the response information from the
次に、API集約装置24は、次のAPI互換方法を実行する。即ち、API集約装置24は、アプリケーション25aから所望のイネーブラ27へAPIを介してリクエスト情報を送信した際に、当該リクエスト情報の内容に適合したレスポンス情報が返信されない機能不全の場合に、当該機能不全のイネーブラ27に予め対応付けられた対応イネーブラ27からのレスポンス情報を、当該対応イネーブラ27に繋がる対応APIを介して当該アプリケーション25aへ返信するステップを実行する。
このAPI互換方法によれば、複数組み合わせたAPI28a〜28dの何れかが機能不全となった場合でも、その機能不全のAPI28bに係る機能の情報を、そのAPI28bに係る対応API28cを介してアプリケーション25aに提供することができる。
Next, the
According to this API compatible method, even if any of the plurality of combined
その他、具体的な構成について、本発明の主旨を逸脱しない範囲で適宜変更が可能である。 In addition, about a specific structure, it can change suitably in the range which does not deviate from the main point of this invention.
20 通信システム
21 API処理機能部
21a 信号受信部
21b 信号情報蓄積部(蓄積部)
21c 信号送信部
21d 互換動作実行判断部(判断部)
21e 互換動作実行部(実行部)
21f API互換情報DB(データベース)
21g 信号変換部
22 開発者ポータル機能部
23 保守運用機能部
24 API集約装置
25a〜25m アプリケーション
26a〜26j,28a〜28n API
27a〜27n イネーブラ
27a 位置情報取得機能(イネーブラ)
27b Aグルメ検索機能(イネーブラ)
27c Bグルメ検索機能(イネーブラ)
27d レコメンド機能(イネーブラ)
20
21c
21e compatible operation execution unit (execution unit)
21f API compatibility information database (database)
21g
27a to
27b A gourmet search function (enabler)
27c B gourmet search function (enabler)
27d Recommendation Function (Enabler)
Claims (5)
前記アプリケーションから所望のイネーブラへ前記APIを介して前記リクエスト情報を送信した際に、当該リクエスト情報の内容に適合したレスポンス情報が返信されない機能不全の場合、当該機能不全のイネーブラが返信するはずのレスポンス情報と互換性のあるレスポンス情報を含む対応イネーブラからのレスポンス情報を、当該対応イネーブラに繋がる対応APIを介して当該アプリケーションへ返信するAPI処理機能部を備え、
前記API処理機能部は、
前記API毎に繋がる機能に互換性が有る場合に、その互換性の有るAPIの対応関係を示すAPI互換情報を記憶するデータベースと、
前記アプリケーションから送信されるリクエスト情報を受信したイネーブラが返信するレスポンス情報を受信した際に、当該レスポンス情報が予め定められた規定の内容に不適合の場合、当該不適合のレスポンス情報を返信したイネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在すれば、互換動作可能と判断する判断部と、
前記互換動作可能と判断された際に、前記不適合のレスポンス情報を返信したイネーブラへのリクエスト情報を変換する際に、共通のパラメータを用いて設計された異なる前記対応APIに繋がる対応イネーブラへのリクエスト情報の宛先において、当該宛先であるドメイン名を共通化した共通ドメインを設け、当該共通ドメインの次のパスを前記対応イネーブラを示す宛先に変換し、この変換されたリクエスト情報を対応イネーブラへ送信する変換部と、
前記変換されたリクエスト情報を受信した対応イネーブラから返信されるレスポンス情報を、前記アプリケーションへ返信する送信部と、を備え、
前記変換部は、前記判断部で前記互換動作可能と判断された際に、前記対応APIに繋がる対応イネーブラへのリクエスト情報の送信後に当該対応イネーブラから返信されたレスポンス情報を、前記不適合のレスポンス情報を返信したイネーブラから本来適正に出力されるレスポンス情報に整合するように変換し、
前記送信部は、前記整合されたレスポンス情報を前記アプリケーションへ返信する
ことを特徴とするAPI集約装置。 An application combining a plurality of APIs linked to an enabler for performing at least a communication to realize a predetermined purpose transmits request information for acquiring desired information to the enabler via the API, and the transmitted request information In a communication system in which the enabler receives the response information according to the request information, and returns response information to the application via the API, an API aggregation connected between the application and the enabler at least via the API A device,
When the request information is transmitted from the application to the desired enabler via the API, the response that the enabler of the malfunction should reply in the case where the response information conforming to the contents of the request information is not sent back The API processing function unit for returning response information from the corresponding enabler including response information compatible with the information to the application via the corresponding API linked to the corresponding enabler,
The API processing function unit
A database that stores API compatibility information indicating the correspondence of the compatible APIs when the functions connected to each of the APIs are compatible;
When the response information received from the application receives the response information sent from the enabler, if the response information does not conform to the predetermined content in advance, it leads to the enabler that has sent the response information for the nonconformity. A determination unit that determines that compatible operation is possible if the corresponding API related to the API exists in API compatibility information of the database;
When it is determined that the compatible operation is possible, when converting request information to the enabler that has returned the nonconforming response information, a request to the corresponding enabler connected to the different corresponding API designed using a common parameter In the destination of the information , a common domain in which the domain name as the destination is shared is provided, the path following the common domain is converted to the destination indicating the corresponding enabler, and the converted request information is transmitted to the corresponding enabler. A converter,
A sending unit that sends response information returned from the corresponding enabler that has received the converted request information back to the application,
The conversion unit, when it is determined by the determination unit that the compatible operation is possible, the response information returned from the corresponding enabler after the transmission of the request information to the corresponding enabler connected to the corresponding API, the response information for the nonconformity Convert to match the response information that is originally properly output from the enabler that sent
The API aggregation device, wherein the transmission unit returns the matched response information to the application.
前記アプリケーションから送信されたリクエスト情報を蓄積する蓄積部を更に備え、
前記判断部は、前記アプリケーションから送信されるリクエスト情報を受信したイネーブラから返信されたレスポンス情報を受信した際に、当該受信したレスポンス情報が、前記蓄積されたリクエスト情報の内容に不適合の場合に、前記イネーブラ及び前記APIを含む通信経路の双方の機能不全と判断し、この機能不全と判断した通信経路上の当該イネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在すれば、互換動作可能と判断する
ことを特徴とする請求項1に記載のAPI集約装置。 The API processing function unit
The storage device further includes an accumulation unit that accumulates request information transmitted from the application,
When the determination unit receives the response information returned from the enabler that has received the request information transmitted from the application, the received response information does not conform to the contents of the stored request information. If there is the corresponding API associated with the API connected to the enabler on the communication path determined to be a malfunction on both of the enabler and the communication path including the API and the communication path determined to be this malfunction exists in the API compatibility information of the database The API aggregating apparatus according to claim 1, wherein it is determined that the compatible operation is possible.
ことを特徴とする請求項1に記載のAPI集約装置。 The determination unit determines that both the enabler and the communication path including the API fail if the response information from the enabler having received the request information can not be received within a predetermined time, and the function failure The API aggregating apparatus according to claim 1, wherein the corresponding API related to the API connected to the enabler of the communication path determined as is determined to be compatible when it exists in the API compatible information of the database. .
ことを特徴とする請求項1に記載のAPI集約装置。 The determination unit determines that both the enabler and the communication path including the API are malfunctioning when the reply response information from the enabler having received the request information is error information, and the communication path determined as the malfunction. The API aggregation device according to claim 1, wherein the corresponding API related to the API linked to the enabler is determined to be compatible when it exists in API compatibility information of the database.
前記API集約装置は、
前記API毎に繋がる機能に互換性が有る場合に、その互換性の有るAPIの対応関係を示すAPI互換情報を記憶するデータベースを備え、
前記アプリケーションから所望のイネーブラへ前記APIを介して前記リクエスト情報を送信した際に、当該リクエスト情報の内容に適合したレスポンス情報が返信されない機能不全の場合、当該機能不全のイネーブラが返信するはずのレスポンス情報と互換性のあるレスポンス情報を含む対応イネーブラからのレスポンス情報を、当該対応イネーブラに繋がる対応APIを介して当該アプリケーションへ返信するステップと、
前記アプリケーションから送信されるリクエスト情報を受信したイネーブラが返信するレスポンス情報を受信した際に、当該レスポンス情報が予め定められた規定の内容に不適合の場合、当該不適合のレスポンス情報を返信したイネーブラに繋がるAPIに係る前記対応APIが、前記データベースのAPI互換情報に存在すれば、互換動作可能と判断するステップと、
前記互換動作可能と判断された際に、前記不適合のレスポンス情報を返信したイネーブラへのリクエスト情報を変換する際に、共通のパラメータを用いて設計された異なる前記対応APIに繋がる対応イネーブラへのリクエスト情報の宛先において、当該宛先であるドメイン名を共通化した共通ドメインを設け、当該共通ドメインの次のパスを前記対応イネーブラを示す宛先に変換し、この変換されたリクエスト情報を対応イネーブラへ送信するステップと、
前記互換動作可能と判断された際に、前記対応APIに繋がる対応イネーブラへのリクエスト情報の送信後に当該対応イネーブラから返信されたレスポンス情報を、前記不適合のレスポンス情報を返信したイネーブラから本来適正に出力されるレスポンス情報に整合するように変換するステップと、
前記整合されたレスポンス情報を前記アプリケーションへ返信するステップと
を実行することを特徴とするAPI互換方法。 An application combining a plurality of APIs linked to an enabler for performing at least a communication to realize a predetermined purpose transmits request information for acquiring desired information to the enabler via the API, and the transmitted request information In a communication system in which the enabler receives the response information according to the request information, and returns response information to the application via the API, an API aggregation connected between the application and the enabler at least via the API API aggregation method by device, and
The API aggregation device is
When there is compatibility in the functions connected to each of the APIs, a database storing API compatibility information indicating the correspondence of the compatible APIs is provided,
When the request information is transmitted from the application to the desired enabler via the API, the response that the enabler of the malfunction should reply in the case where the response information conforming to the contents of the request information is not sent back Returning response information from a corresponding enabler including response information compatible with the information to the application via a corresponding API linked to the corresponding enabler;
When the response information received from the application receives the response information sent from the enabler, if the response information does not conform to the predetermined content in advance, it leads to the enabler that has sent the response information for the nonconformity. Determining that the compatible operation is possible if the corresponding API related to the API exists in the API compatible information of the database;
When it is determined that the compatible operation is possible, when converting request information to the enabler that has returned the nonconforming response information, a request to the corresponding enabler connected to the different corresponding API designed using a common parameter In the destination of the information , a common domain in which the domain name as the destination is shared is provided, the path following the common domain is converted to the destination indicating the corresponding enabler, and the converted request information is transmitted to the corresponding enabler. Step and
When it is determined that the compatible operation is possible, the response information returned from the corresponding enabler after the transmission of the request information to the corresponding enabler connected to the corresponding API is originally properly output from the enabler that has sent the response information of the nonconformity. Converting to match the response information to be
Returning the matched response information to the application.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015028802A JP6475037B2 (en) | 2015-02-17 | 2015-02-17 | API aggregation device and API compatible method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015028802A JP6475037B2 (en) | 2015-02-17 | 2015-02-17 | API aggregation device and API compatible method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016151881A JP2016151881A (en) | 2016-08-22 |
JP6475037B2 true JP6475037B2 (en) | 2019-02-27 |
Family
ID=56695392
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015028802A Active JP6475037B2 (en) | 2015-02-17 | 2015-02-17 | API aggregation device and API compatible method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6475037B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10387145B1 (en) * | 2018-02-02 | 2019-08-20 | Fujitsu Limited | Mapping API parameters |
JP2022095016A (en) * | 2020-12-16 | 2022-06-28 | 株式会社日立製作所 | Arithmetic device and common resource generation method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006195709A (en) * | 2005-01-13 | 2006-07-27 | Hitachi Ltd | Web service system |
-
2015
- 2015-02-17 JP JP2015028802A patent/JP6475037B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016151881A (en) | 2016-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9398081B2 (en) | Automating client development for network APIs | |
US11064325B2 (en) | Method of discovering services provided by a network repository function | |
US7925735B2 (en) | Network-based application late binding | |
US9832076B2 (en) | Resource change management in machine to machine network | |
US10382266B1 (en) | Interconnection platform with event-driven notification for a cloud exchange | |
CN104247333B (en) | System and method for the management of network service | |
US8527584B2 (en) | Method and apparatus for providing service mobility across service deployment boundaries | |
US9418168B2 (en) | Providing cloud-based, generic OData mashup services using an on-demand service | |
CN103095479A (en) | Method and device of business configuration | |
WO2020062582A1 (en) | Methods for information drainage, requesting transmission and communication acceleration, and drainage and node server | |
CN107431630A (en) | Highly expansible, fault-tolerant remote access framework and the method being attached thereto | |
Schmid et al. | An architecture for interoperable IoT Ecosystems | |
CN110519379A (en) | Request processing method and equipment based on micro services | |
JP6475037B2 (en) | API aggregation device and API compatible method | |
Vijayakumar | Practical API architecture and development with azure and AWS | |
Tan et al. | Unified IIoT cloud platform for smart factory | |
KR101585508B1 (en) | Military situation map processing device and data processing method thereof | |
Nakagawa et al. | Dripcast-architecture and implementation of server-less Java programming framework for billions of IoT devices | |
Jin et al. | Integrated service composition approach based on transparent access to heterogeneous IoT networks using multiple service providers | |
US20230022134A1 (en) | Framework for validating and troubleshooting network policy configurations | |
Trifa et al. | Leveraging the web for a distributed location-aware infrastructure for the real world | |
US20110320527A1 (en) | Method and system for managing a web-domain request | |
JP6278914B2 (en) | API aggregation device | |
US9756129B2 (en) | WSDL/WADL reference definition integration | |
Bhat et al. | Network service orchestration in heterogeneous 5G networks using an open marketplace |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170216 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171228 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180116 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180312 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180626 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180822 |
|
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: 20190129 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190131 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6475037 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |