JP6674039B2 - Stream data distribution processing method, stream data distribution processing system, and storage medium - Google Patents

Stream data distribution processing method, stream data distribution processing system, and storage medium Download PDF

Info

Publication number
JP6674039B2
JP6674039B2 JP2018550905A JP2018550905A JP6674039B2 JP 6674039 B2 JP6674039 B2 JP 6674039B2 JP 2018550905 A JP2018550905 A JP 2018550905A JP 2018550905 A JP2018550905 A JP 2018550905A JP 6674039 B2 JP6674039 B2 JP 6674039B2
Authority
JP
Japan
Prior art keywords
query
tuple
configuration change
change instruction
delay time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018550905A
Other languages
Japanese (ja)
Other versions
JPWO2018092199A1 (en
Inventor
常之 今木
常之 今木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Publication of JPWO2018092199A1 publication Critical patent/JPWO2018092199A1/en
Application granted granted Critical
Publication of JP6674039B2 publication Critical patent/JP6674039B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、ストリームデータ処理の分散処理方法に関する。   The present invention relates to a distributed processing method for stream data processing.

株取引の自動化や、交通情報処理の高度化や、ネットワークのマイクロバーストの検出や、IoT(Internet of Things)のセンサデータや、ソーシャルネットワークの解析といった、高いレートで継続的に発生する情報をリアルタイムで解析し、重要なイベントの発生に対して瞬時にアクションを起こす要求の高まりを背景に、高レートデータのリアルタイム処理を実現する、ストリームデータ処理(以下、ストリーム処理)が注目されている。   Real-time information generated continuously at high rates, such as automated stock trading, advanced traffic information processing, network microburst detection, IoT (Internet of Things) sensor data, and social network analysis In view of the growing demand for instantaneous actions to be taken upon occurrence of important events, stream data processing (hereinafter, stream processing) that realizes real-time processing of high-rate data has attracted attention.

ストリーム処理は、様々なデータ処理に適用可能な汎用ミドルウェア技術であるため、個別案件ごとにシステムを構築するのでは間に合わないようなビジネス環境の急激な変化にも応えつつ、実世界のデータをリアルタイムにビジネスに反映することを可能とする。   Stream processing is a general-purpose middleware technology that can be applied to various types of data processing, so real-time data can be processed in real-time while responding to sudden changes in the business environment that would not be possible by building a system for individual projects. That can be reflected in business.

ストリーム処理が対象とするストリームとは、タイムスタンプ付きのデータであるタプルが、連続(または断続的)して到来する時系列データである。ストリーム処理のユーザが、このストリームに対する監視ルールをクエリとして定義すると、ストリーム処理サーバのクエリ登録インタフェースが、クエリ定義をクエリグラフに変換する。   The stream targeted for the stream processing is time-series data in which tuples, which are data with a time stamp, arrive continuously (or intermittently). When the user of the stream processing defines a monitoring rule for this stream as a query, the query registration interface of the stream processing server converts the query definition into a query graph.

クエリグラフは、オペレータと呼ばれる処理単位をノードとし、同オペレータ間のタプルキューをエッジとする、有向グラフである。ストリーム処理では、入力ストリームを構成する個々のタプルについて、クエリグラフを通過させることで、データフロー的に処理を進める。   The query graph is a directed graph in which a processing unit called an operator is a node and a tuple queue between the operators is an edge. In stream processing, individual tuples constituting an input stream are processed in a data flow by passing through a query graph.

ストリーム処理は、データフロー型の処理であるため、クエリグラフを多段に分割し、複数の計算資源によってパイプライン的に分散処理することが可能である。また、株価の銘柄別のチャート分析のように、互いに独立した多数の系列の時系列データを集計するクエリについては、データを系列別に分割することで、並列的に分散処理することが可能である。このように、ストリーム処理では、クエリの処理に応じて適切に分散処理することで、スループットの向上に繋がる。   Since the stream processing is a data flow type processing, it is possible to divide a query graph into multiple stages and perform distributed processing in a pipeline manner by using a plurality of computational resources. Also, as in the case of a chart analysis of stock prices by brand, queries that aggregate time series data of a large number of independent series can be distributed in parallel by dividing the data by series. . As described above, in the stream processing, by appropriately performing the distributed processing according to the processing of the query, it is possible to improve the throughput.

また、IoTのセンサデータの分析に基づく工場の製造機器監視や制御、あるいは自動車の車両間通信に基づく衝突回避などのような、機械制御へのストリーム処理の適用においては、タプルのレイテンシの短縮が重要となる。特に、個別の製造機器にとどまらない、製造工程全体を俯瞰したセンサデータの分析、あるいは自動車の衝突回避のための複数車両による協調処理を実現するためには、複数のストリーム処理が連携する分散処理と、レイテンシの短縮とを両立する必要がある。   In addition, when stream processing is applied to machine control such as monitoring and controlling manufacturing equipment in a factory based on analysis of IoT sensor data, or collision avoidance based on inter-vehicle communication of an automobile, the latency of tuples is reduced. It becomes important. In particular, distributed processing in which multiple stream processes cooperate in order to analyze sensor data from a bird's eye view of the entire manufacturing process, or to cooperate with multiple vehicles to avoid automobile collisions, not limited to individual manufacturing equipment And a reduction in latency.

ストリーム処理の従来技術として、特許文献1が知られている。特許文献1には、ストリームデータ処理システムのストリームデータのクエリ処理に関するスループットを向上させる方法が開示されており、「本願明細書に記載されている技術は、データストリーム処理タスクの宣言的な記述から、高度に最適化された分散ストリーム処理アプリケーションを作成する、コード生成フレームワークを含む。本発明の一つ以上の実施例によれば、開発者は、分散システムに存在しがちな性能影響を気にすることなく、細粒度のストリーム演算子を用いて、アプリケーションを構築することができる。さらに、本願明細書に記載されている技術は、アプリケーション開発において、粗粒度の演算子を使用した場合に生じるような非柔軟性を回避する。本願明細書に記載されている典型的なコード生成フレームワークは、通信オーバヘッドを最小化するように、アプリケーションを適切なサイズの実行ユニットへ割り当てることができる。」と記載されている。   Patent Document 1 is known as a conventional technique of stream processing. Patent Literature 1 discloses a method for improving the throughput of a stream data processing system for query processing of stream data. “The technique described in this specification is based on a declarative description of a data stream processing task. And a code generation framework for creating highly optimized distributed stream processing applications.In accordance with one or more embodiments of the present invention, developers may be aware of performance impacts that are likely to be present in distributed systems. Applications can be built using fine-grained stream operators without having to use the techniques described in the present application. Avoid the inflexibility that arises.The typical code generation framework described herein Click so as to minimize the communication overhead can be assigned an application to execution units appropriate size. "Is described as.

また、ストリーム処理の従来技術として特許文献2が知られている。特許文献2には、ストリームデータ処理システムのストリームデータのクエリ処理に関するレイテンシを短縮する方法が開示されており、「ストリームデータ処理システムは、複数のクエリの実行木から単一のオペレータグラフを構築し、ストリーム化演算の実行が、入力から出力に向かって一方通行で進むように、オペレータの実行順序を決定し、システム外部のデータを入力する外部発火オペレータと時限的にデータを生成する内部発火オペレータの発火時刻を監視し、オペレータ実行制御部は、最も早い発火時刻のオペレータを起点として、決定したオペレータ実行順序に従って、当該時刻のオペレータグラフにおける処理を完結させる処理を繰り返す。」と記載されている。   Patent Document 2 is known as a conventional technique of stream processing. Patent Literature 2 discloses a method for reducing latency related to query processing of stream data in a stream data processing system. “A stream data processing system constructs a single operator graph from an execution tree of a plurality of queries. An external firing operator that inputs data outside the system and an internal firing operator that generates data in a timed manner so that the execution of the streaming operation proceeds in one way from the input to the output. And the operator execution control unit repeats the process of completing the processing in the operator graph at the time according to the determined operator execution order, starting from the operator at the earliest firing time. " .

また、特許文献2には、遅延演算を用いた再帰クエリの実行方法が開示されており、「ストリームタプルのタイムスタンプを未来にずらす、遅延オペレータである遅延演算を挿入した様子を示している。時刻の遅延が挟まることで、ストリーム化演算の出力は、自分自身の入力に時間がずれて戻ることになるため、時刻t1におけるリレーションの増減に対し、該ストリーム化演算自身の出力が影響を持つことは無くなる。このように、再帰クエリの途中に遅延演算を挟むことによって、ストリーム化演算のデッドロックを回避し、再帰クエリを実現することが可能となる。」と記載されている。   Further, Patent Literature 2 discloses a method of executing a recursive query using a delay operation, and illustrates a state in which a delay operation, which is a delay operator for shifting the time stamp of a stream tuple to the future, is inserted. Since the time delay causes the output of the streaming operation to return to its own input with a time lag, the output of the streaming operation itself has an effect on the increase or decrease in the relation at time t1. In this way, by interposing a delay operation in the middle of a recursive query, it is possible to avoid a deadlock of a streamed operation and realize a recursive query. "

米国特許出願公開第2012/0259910号明細書US Patent Application Publication No. 2012/0259910 特開2014−67456号公報JP 2014-67456 A

しかしながら、ストリーム処理は、スライディングウィンドウのように、留まることのないデータの流れから過去一定の範囲のデータセットを継続して切り出し、宣言的なクエリ言語による連続処理を可能とする。すなわち、時間軸方向の変化に対する処理を暗黙に含んでおり、複雑な制御を要するリアルタイムアプリケーションの開発工数を大幅に削減する。   However, stream processing, like a sliding window, continuously cuts out a data set within a certain range in the past from a continuous data flow, and enables continuous processing using a declarative query language. In other words, the process for the change in the time axis direction is implicitly included, and the man-hour for developing a real-time application requiring complicated control is greatly reduced.

ただし、このようなリアルタイムアプリケーションの開発においては、デバグのために、処理の再現性(すなわち、タイムスタンプまで含めて同一のタプル系列は、何回処理しても、その結果ストリームのタプル系列が不変であること)が確保されることが必須である。   However, in the development of such a real-time application, due to debugging, the reproducibility of processing (that is, even if the same tuple sequence including the time stamp is processed many times, the tuple sequence of the resulting stream remains unchanged Is essential.

処理の再現性を維持するために、分散処理では、互いに異なる計算機上で稼働する複数のストリーム処理プロセスが生成する結果ストリームを、時刻順を維持しながら、マージして処理を伝搬させていく必要がある。このようなマージ処理は、複数のストリーム処理プロセスから到来する結果ストリームの待ち合わせを伴うため、結果ストリームを多段にマージするケースなどでは、ストリーム処理の時間やプロセス間通信時間の累積に起因するレイテンシの増加が発生する。   In order to maintain the reproducibility of processing, distributed processing requires merging the result streams generated by multiple stream processing processes running on different computers while maintaining the time order, and propagating the processing. There is. Such a merge process involves queuing of result streams coming from a plurality of stream processing processes, and therefore, in a case where the result streams are merged in multiple stages, for example, the latency of the stream processing time and the accumulation of the inter-process communication time is reduced. An increase occurs.

また、複数のストリーム処理プロセス間の入出力関係が循環を含むようなケースでは、両プロセス間の相互依存関係により、クエリ処理の進行がハングアップする場合もある。例えば、自動車の衝突回避のような協調処理においては、入出力の循環を必然的に含むことになる。   Further, in a case where the input / output relationship between a plurality of stream processing processes includes a cycle, the progress of the query processing may hang due to the interdependency between the two processes. For example, in cooperative processing such as collision avoidance of a car, the input / output circulation is necessarily included.

さらに、従来のストリーム処理の分散実行技術では、ストリーム処理プロセス間の入出力関係に合せて、各プロセス上で稼働するクエリ同士の入出力関係が定まっている必要がある。従って、ユーザは各クエリを実行するプロセスの実行位置(実行する計算機)を意識して、クエリ同士の接続関係、即ちクエリグラフを設計する必要がある。クエリ同士の接続関係の制約は、ユーザによる分散クエリ定義の容易性を著しく悪化させる。   Furthermore, in the conventional distributed execution technology of stream processing, the input / output relationship between queries operating on each process needs to be determined according to the input / output relationship between stream processing processes. Therefore, it is necessary for the user to design the connection relationship between the queries, that is, the query graph, while being aware of the execution position (the computer to be executed) of the process for executing each query. The restriction on the connection relationship between queries significantly deteriorates the ease of user-defined distributed queries.

また、一旦分散実行を開始したクエリグラフについて、クエリ間の接続関係の一部を変更する場合でも、クエリグラフ全体を停止して、クエリグラフを定義し直して、同クエリグラフの処理を再開する必要がある。従って、その間の分析処理の停止を伴う。   In addition, even if a part of the connection relationship between queries is changed for the query graph that has started distributed execution, the entire query graph is stopped, the query graph is redefined, and the processing of the query graph is resumed. There is a need. Accordingly, the analysis process is stopped during that time.

特許文献1の技術では、クエリグラフの定義の中に、各クエリの実行位置の指定を含めることができる。但し、実行位置を意識したクエリグラフ定義、およびクエリグラフの変更に伴う処理の停止及び再起動が必要である、という問題があった。   In the technique of Patent Literature 1, specification of an execution position of each query can be included in the definition of the query graph. However, there is a problem in that it is necessary to define the query graph in consideration of the execution position and to stop and restart the processing accompanying the change of the query graph.

特許文献2の技術では、単一計算機上の単一プロセスの単一スレッドにおいて、クエリグラフの処理を低レイテンシで実行し、複数のクエリ間の循環、即ち再帰クエリを実行することができる。但し、単一スレッド実行が前提であるため、複数の計算機に跨るクエリグラフの分散実行においては、同様の効果を得ることができない、という問題があった。   In the technique of Patent Document 2, the processing of the query graph can be executed with low latency in a single thread of a single process on a single computer, and a recursive query among a plurality of queries can be executed. However, there is a problem in that the same effect cannot be obtained in distributed execution of a query graph across a plurality of computers because execution of a single thread is premised.

本発明は上記問題点に鑑みて成されたものであり、ストリーム処理の分散実行における、クエリ定義の容易化と、処理の停止を伴わずに動的なクエリ間の接続関係の変更を可能にすることを目的とする。   The present invention has been made in view of the above problems, and makes it possible to simplify a query definition and to dynamically change a connection relationship between queries without stopping processing in distributed execution of stream processing. The purpose is to do.

プロセッサとメモリを有する計算機でタイムスタンプが付与されたタプルを処理するストリームデータの分散処理方法であって、前記計算機が、入力されたタプルを処理するクエリと、当該クエリが出力するタプルに遅延時間を加算する可変遅延演算と、前記可変遅延演算の出力を前記クエリに再帰的に入力する再帰ループを含むクエリ定義を受け付ける第1のステップと、前記計算機が、前記タプルの入力先と、前記タプルの出力先と、遅延時間を含む構成変更命令を受け付ける第2のステップと、前記計算機が、前記再帰ループを解除して前記可変遅延演算の出力を前記構成変更命令の出力先に変更し、前記タプルの入力先を前記構成変更命令の入力先に変更し、前記構成変更命令の遅延時間を前記可変遅延演算に設定する第3のステップと、前記計算機が、前記入力先からタプルを受け付けて、前記クエリで所定の処理を行ったタプルを前記可変遅延演算に入力し、当該タプルのタイムスタンプに前記遅延時間を加算する第4のステップと、前記計算機が、前記出力先へ前記遅延時間を加算されたタプルを出力する第5のステップと、を含む。   What is claimed is: 1. A distributed data processing method for a stream data in which a computer having a processor and a memory processes time-stamped tuples, the computer comprising: a query for processing an input tuple; and a delay time for a tuple output by the query. A first step of receiving a query definition including a recursive loop for recursively inputting the output of the variable delay operation to the query, wherein the calculator comprises: an input destination of the tuple; And a second step of receiving a configuration change instruction including a delay time, and the computer releases the recursive loop to change the output of the variable delay operation to an output destination of the configuration change instruction, A third step of changing an input destination of the tuple to an input destination of the configuration change instruction and setting a delay time of the configuration change instruction to the variable delay operation; And a fourth step in which the computer receives the tuple from the input destination, inputs the tuple subjected to the predetermined processing in the query to the variable delay calculation, and adds the delay time to a time stamp of the tuple. And a fifth step in which the computer outputs a tuple to which the delay time has been added to the output destination.

上記本発明によれば、ストリーム処理の再現性を維持しながら、クエリ定義の容易化と、処理停止を伴わない動的なクエリ間の接続関係の変更が可能となる。   According to the present invention, it is possible to simplify the query definition and change the connection relationship between the queries dynamically without stopping the processing while maintaining the reproducibility of the stream processing.

本発明の実施例1を示し、ストリーム処理サーバが稼働する計算機システムの一例を示すブロック図である。FIG. 1 is a block diagram illustrating an example of a computer system in which a stream processing server operates according to a first embodiment of the present invention. 本発明の実施例1を示し、計算機システムを工場の生産ラインの監視処理に適用した例を示すブロック図である。1 is a block diagram illustrating a first embodiment of the present invention, in which a computer system is applied to monitoring processing of a production line in a factory. 本発明の実施例1を示し、計算機システムを自動車の車両間通信に適用した例を示すブロック図である。1 is a block diagram illustrating a first embodiment of the present invention, in which a computer system is applied to inter-vehicle communication of an automobile. 本発明の従来例を示し、工場の生産ラインを監視する継続クエリの一例を示すスクリプトである。4 is a script showing a conventional example of the present invention and showing an example of a continuous query for monitoring a production line of a factory. 従来例を示し、工場の生産ラインを監視する、継続クエリのクエリグラフの一例を示すブロック図である。It is a block diagram which shows the prior art example and which shows an example of the query graph of a continuous query which monitors the production line of a factory. 従来例を示し、工場の生産ラインを監視する、ストリーム処理プロセス間連携の一例を示すブロック図である。It is a block diagram which shows the conventional example and which shows an example of cooperation between stream processing processes which monitors the production line of a factory. 従来例を示し、自動車の車両間通信を実現する、ストリーム処理プロセス間連携の一例を示すブロック図である。It is a block diagram which shows the prior art example and which shows an example of cooperation between stream processing processes which implement | achieves the communication between vehicles of a motor vehicle. 本発明の実施例1を示し、可変遅延演算を挿入した再帰クエリを工場の生産ラインの監視処理に適用した例を示すブロック図である。FIG. 4 is a block diagram illustrating the first embodiment of the present invention, in which a recursive query into which a variable delay operation is inserted is applied to a process of monitoring a production line in a factory. 本発明の実施例1を示し、可変遅延演算を挿入した再帰クエリの一例を示すスクリプトである。6 is a script illustrating the example 1 of the present invention and illustrating an example of a recursive query into which a variable delay operation is inserted. 本発明の実施例1を示し、可変遅延演算を挿入した再帰クエリの一例を示すスクリプトである。6 is a script illustrating the example 1 of the present invention and illustrating an example of a recursive query into which a variable delay operation is inserted. 本発明の実施例1を示し、ストリーム処理プロセスの構成を示すブロック図である。FIG. 1 is a block diagram illustrating a stream processing process according to a first embodiment of the present invention. 本発明の実施例1を示し、構成変更命令の一例を示すブロック図である。FIG. 4 is a block diagram illustrating Example 1 of the present invention and illustrating an example of a configuration change instruction. 本発明の実施例1を示し、結果タプルキューの一例を示す図である。FIG. 7 illustrates the first embodiment of the present invention, and illustrates an example of a result tuple queue. 本発明の実施例1を示し、構成変更命令キューの一例を示す図である。FIG. 6 illustrates the first embodiment of the present invention, and illustrates an example of a configuration change instruction queue. 本発明の実施例1を示し、出力先別遅延時間管理表の一例を示す図である。FIG. 9 illustrates the first embodiment of the present invention, and illustrates an example of a delay time management table for each output destination. 本発明の実施例1を示し、可変遅延演算実行部の一例を示す図である。FIG. 3 illustrates the first embodiment of the present invention, and illustrates an example of a variable delay calculation execution unit. 本発明の実施例1を示し、可変遅延演算実行部で行われる処理の一例を示すフローチャートである。5 is a flowchart illustrating an example of a process performed by the variable delay calculation execution unit according to the first exemplary embodiment of the present invention. 本発明の実施例1を示し、工場の生産ラインを監視する、ストリーム処理プロセス間の、遅延演算を介した連携の一例を示すブロック図である。FIG. 4 is a block diagram illustrating Example 1 of the present invention and illustrating an example of cooperation via a delay operation between stream processing processes for monitoring a production line in a factory. 本発明の実施例1を示し、自動車の車両間通信を実現する、ストリーム処理プロセス間の、遅延演算を介した連携の一例を示すブロック図である。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram illustrating an example 1 of the present invention and illustrating an example of cooperation via a delay operation between stream processing processes for realizing inter-vehicle communication of an automobile. 本発明の実施例1を示し、自動車の車両間通信を実現する、ストリーム処理プロセス間の、遅延演算を介した連携の一例を示すブロック図である。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram illustrating an example 1 of the present invention and illustrating an example of cooperation via a delay operation between stream processing processes for realizing inter-vehicle communication of an automobile. 本発明の第2の実施例を示し、ストリーム処理プロセスの構成を示すブロック図である。FIG. 10 is a block diagram illustrating a stream processing process according to a second embodiment of the present invention.

以下、本発明の一実施形態について添付図面を用いて説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.

図1は、ストリーム処理サーバが稼働する計算機システム(ストリーム処理分散実行システム801)の一例を示すブロック図である。計算機システムは、複数のストリーム処理サーバ100−1〜100−nと、ストリーム処理サーバ100−1〜100−nにクエリ定義132を分配するストリーム処理分散実行管理サーバ1001と、クエリ定義132や構成変更命令815を発行するホスト計算機130と、タプル121を供給するデータソース120と、結果タプル141を受信するデータ受信機140と、各計算機を接続するネットワーク150と、を含む。   FIG. 1 is a block diagram illustrating an example of a computer system (stream processing distributed execution system 801) on which a stream processing server operates. The computer system includes a plurality of stream processing servers 100-1 to 100-n, a stream processing distributed execution management server 1001 that distributes a query definition 132 to the stream processing servers 100-1 to 100-n, a query definition 132, and a configuration change. It includes a host computer 130 that issues instructions 815, a data source 120 that supplies tuples 121, a data receiver 140 that receives result tuples 141, and a network 150 that connects each computer.

ストリーム処理サーバ100−1は、CPU101と、メモリ103と、ネットワークインタフェース105と、ストレージ106、およびそれらを結合するバス104によって構成される計算機である。なお、ストリーム処理サーバ100−1〜100−nの構成であるので、重複する説明は省略する。   The stream processing server 100-1 is a computer including a CPU 101, a memory 103, a network interface 105, a storage 106, and a bus 104 connecting these. Note that the configuration of the stream processing servers 100-1 to 100-n is omitted, and thus redundant description will be omitted.

メモリ103上には、ストリーム処理の論理的な手順を定義するストリーム処理プロセス110−1が配置される。ストリーム処理プロセス110−1は、CPU101によって実行可能な実行イメージ(プログラム等)である。   On the memory 103, a stream processing process 110-1 that defines a logical procedure of the stream processing is arranged. The stream processing process 110-1 is an execution image (a program or the like) executable by the CPU 101.

ストリーム処理サーバ100−1は、ネットワークインタフェース105を介してネットワーク150に接続される。ストリーム処理サーバ100−1は、ネットワーク150に接続されたストリーム処理分散実行管理サーバ1001からクエリ定義132と構成変更命令815を受け付ける。   The stream processing server 100-1 is connected to the network 150 via the network interface 105. The stream processing server 100-1 receives the query definition 132 and the configuration change command 815 from the stream processing distributed execution management server 1001 connected to the network 150.

ネットワーク150に接続されたホスト計算機130上では、クエリ登録インタフェース131によって、ユーザが指定したクエリ定義132を、ストリーム処理分散実行管理サーバ1001へ出力する。   On the host computer 130 connected to the network 150, the query registration interface 131 outputs the query definition 132 specified by the user to the stream processing distributed execution management server 1001.

ホスト計算機130は、CPU12とメモリ13及び表示装置とキーボードなどの入力装置を含む入出力装置133を有し、メモリ13にクエリ登録インタフェース131をロードして実行し、クエリ定義132や構成変更命令815等の編集やストリーム処理プロセスの割当てなどを行う。   The host computer 130 has a CPU 12 and a memory 13 and an input / output device 133 including an input device such as a display device and a keyboard. The host computer 130 loads and executes a query registration interface 131 in the memory 13, and executes a query definition 132 and a configuration change instruction 815. Edit, etc., and assign a stream processing process.

次に、ストリーム処理プロセス110−1は、上記クエリ定義132に従ってストリーム処理を実行可能なクエリグラフを構築する。この後、ネットワーク150に接続されたデータソース120から送信されるタプル121を、ストリーム処理サーバ100−1が受け取ると、ストリーム処理サーバ100−1は該クエリグラフに従って時系列のタプル121をクエリで処理し、結果タプル141を生成する。   Next, the stream processing process 110-1 constructs a query graph that can execute stream processing according to the query definition 132. Thereafter, when the stream processing server 100-1 receives the tuple 121 transmitted from the data source 120 connected to the network 150, the stream processing server 100-1 processes the time-series tuple 121 with a query according to the query graph. Then, a result tuple 141 is generated.

この結果タプル141は、ネットワーク150に接続されたデータ受信機140に送信される。ストレージ106は、ストリーム処理プロセス110−1の実行イメージの他、一度受け取った前記クエリ定義132のテキストファイルを保存する。ストリーム処理プロセス110−1は、起動時にストレージ106からこのクエリ定義132のファイルをロードし、クエリグラフを構築することも可能である。   As a result, the tuple 141 is transmitted to the data receiver 140 connected to the network 150. The storage 106 stores the text file of the query definition 132 once received, in addition to the execution image of the stream processing process 110-1. The stream processing process 110-1 can also load the file of the query definition 132 from the storage 106 at the time of startup and construct a query graph.

ネットワーク150には、複数のストリーム処理サーバ100−1〜100−nが接続される。ストリーム処理サーバ100−2〜100−nは、それぞれストリーム処理サーバ100−1と同様の構成要素を有し、それぞれが有するメモリ103上に、ストリーム処理プロセス110−1の実行イメージを保持すする。   A plurality of stream processing servers 100-1 to 100-n are connected to the network 150. Each of the stream processing servers 100-2 to 100-n has the same components as the stream processing server 100-1, and holds an execution image of the stream processing process 110-1 in the memory 103 included in each of them.

なお、以下の説明ではストリーム処理サーバのそれぞれを特定する際には"−"を含む符号100−1〜100−nを用い、ストリーム処理サーバの全体については"−"のない符号100で示す。他の構成要素の符号についても同様である。   In the following description, when specifying each of the stream processing servers, reference numerals 100-1 to 100-n including "-" are used, and the entire stream processing server is indicated by reference numeral 100 without "-". The same applies to reference numerals of other components.

図2は、計算機システムを工場の生産ラインの監視処理に適用した例を示すブロック図である。ストリーム処理サーバ101−1〜101−5は、製造機器に付帯して稼働する計算機であり、それぞれストリーム処理プロセス110−1〜110−5を実行する。ストリーム処理サーバ101−1〜101−4には、それぞれセンサ200−1〜200−4が接続されており、各センサが生成するセンサデータは、それぞれストリーム処理プロセス110−1〜110−4で分析される。   FIG. 2 is a block diagram illustrating an example in which the computer system is applied to monitoring of a production line in a factory. The stream processing servers 101-1 to 101-5 are computers that operate in addition to the manufacturing equipment, and execute stream processing processes 110-1 to 110-5, respectively. Sensors 200-1 to 200-4 are connected to the stream processing servers 101-1 to 101-4, respectively, and sensor data generated by each sensor is analyzed by stream processing processes 110-1 to 110-4, respectively. Is done.

センサ200−1と200−4は、ベルトコンベア210上を流れる製造物220、221のデータを取得しており、センサ200−2と200−3は、ベルトコンベア211上を流れる製造物222、223、224のデータを取得している。   The sensors 200-1 and 200-4 have acquired data of the products 220 and 221 flowing on the belt conveyor 210, and the sensors 200-2 and 200-3 have data of the products 222 and 223 flowing on the belt conveyor 211. , 224 of the data.

製造物220は、まずセンサ200−1でデータを取得されてから、数秒後に、センサ200−4でデータを取得される。製造物221についても同様である。また、製造物222は、まずセンサ200−2でデータを取得されてから、数秒後に、センサ200−3でデータを取得される。製造物223、224についても同様である。   In the manufactured product 220, data is first acquired by the sensor 200-1 and then several seconds later, data is acquired by the sensor 200-4. The same applies to the product 221. Further, the product 222 is obtained by the sensor 200-2 several seconds after the data is first obtained by the sensor 200-2. The same applies to the products 223 and 224.

ストリーム処理プロセス110−1〜110−5は、それぞれセンサデータの平均値、最大値、最小値などの、データ分析値を算出し、相互に連携して、生産ライン全体の分析値を集計する。   The stream processing processes 110-1 to 110-5 calculate data analysis values such as an average value, a maximum value, and a minimum value of the sensor data, and collectively collect analysis values of the entire production line in cooperation with each other.

生産ラインの上流に位置するストリーム処理プロセス110−1、110−2から、下流に位置するストリーム処理プロセス110−5に向かって、分析値を順次集約する。また、各ストリーム処理プロセス110は、不良品の発生に繋がるような異常データの発生を監視する。複数の製造機器を跨ったデータ分析の必要性を鑑みて、ストリーム処理プロセス110同士の接続関係は、生産ラインの流れに沿って定義される。製造物が変更されて、生産ラインの流れや、異常データの発生を検出する分析手法などが変更になる場合は、ストリーム処理プロセス110同士の接続関係も変更される。この接続関係の変更は、後述する構成変更命令815で行うことができる。   The analysis values are sequentially aggregated from the stream processing processes 110-1 and 110-2 located upstream of the production line to the stream processing process 110-5 located downstream. Further, each stream processing process 110 monitors the occurrence of abnormal data that may lead to the occurrence of defective products. In view of the necessity of data analysis across a plurality of manufacturing devices, the connection relationship between the stream processing processes 110 is defined according to the flow of the production line. When the product is changed and the flow of the production line or the analysis method for detecting occurrence of abnormal data is changed, the connection relationship between the stream processing processes 110 is also changed. This connection relationship can be changed by a configuration change command 815 described later.

図3は、図1の計算機システムを自動車の車両間通信に適用した例を示すブロック図である。各車両300−1〜300−4が有するストリーム処理サーバ101−1〜101−4は、例えば、車載マイクロコンピュータであり、それぞれストリーム処理プロセス110−1〜110−4を実行する。ストリーム処理プロセス同士は相互に連携し、GPS230や各車両300が有する各種センサから位置情報などのデータを取得し、互いの位置情報や、速度などの情報を交換し合って、車両300毎の走行予定の経路を決定する。車両同士の接続関係は、相互の位置関係に従って随時変更される。   FIG. 3 is a block diagram showing an example in which the computer system of FIG. 1 is applied to inter-vehicle communication of an automobile. The stream processing servers 101-1 to 101-4 included in each of the vehicles 300-1 to 300-4 are, for example, in-vehicle microcomputers, and execute stream processing processes 110-1 to 110-4, respectively. The stream processing processes cooperate with each other, acquire data such as position information from the GPS 230 and various sensors included in each vehicle 300, and exchange information such as position information and speed with each other to run each vehicle 300. Determine the planned route. The connection relationship between the vehicles is changed at any time according to the mutual positional relationship.

図4は、従来例を示し、工場の生産ラインを監視する、継続クエリの一例を示すスクリプトである。生産ライン全体の分析を定義するクエリ400を示しており、冒頭は、センサ200−1〜200−4が取得するデータを入力ストリームとして定義する、図中S1〜S4のregister stream句が列挙されている。   FIG. 4 is a script showing a conventional example, and showing an example of a continuous query for monitoring a production line in a factory. A query 400 that defines the analysis of the entire production line is shown. At the beginning, register stream clauses S1 to S4 in the figure that define data acquired by the sensors 200-1 to 200-4 as an input stream are listed. I have.

クエリQ3(query Q3)は、ストリーム処理プロセス110−3で実行される分析クエリを表しており、from句によって、ストリーム処理プロセス110−2で稼働する分析クエリQ2(query Q2)の結果と、センサ200−3の入力ストリームS3を突き合わせて、分析することを意味している。   The query Q3 (query Q3) indicates an analysis query executed in the stream processing process 110-3, and the result of the analysis query Q2 (query Q2) operating in the stream processing process 110-2 and the sensor This means that the input stream S3 of 200-3 is matched and analyzed.

クエリQ12(query Q12)は、ストリーム処理プロセス110−1で稼働する分析クエリQ1の結果と、分析クエリQ2の結果をマージする。クエリQ4は、ストリーム処理プロセス110−4で稼働する分析クエリを表しており、from句によって、クエリQ12の出力と、センサ200−4の入力ストリームS4を突き合わせて、分析することを意味している。   The query Q12 (query Q12) merges the result of the analysis query Q1 operated in the stream processing process 110-1 and the result of the analysis query Q2. The query Q4 represents an analysis query that operates in the stream processing process 110-4, and means that the output of the query Q12 and the input stream S4 of the sensor 200-4 are matched and analyzed by the from clause. .

クエリの途中に挿入されているアノテーション「exec_on」は、各クエリを実行するストリーム処理サーバ(および、そこで稼働するストリーム処理プロセス)の識別子を定義する、実行ノード指定アノテーションである。クエリQ3はストリーム処理プロセス110−3で、クエリQ12とQ4はストリーム処理プロセス110−4で、それぞれ実行されることを意味している。   The annotation “exec_on” inserted in the middle of the query is an execution node designation annotation that defines the identifier of the stream processing server that executes each query (and the stream processing process that runs there). The query Q3 is executed by the stream processing process 110-3, and the queries Q12 and Q4 are executed by the stream processing process 110-4.

本実施例1では記載を省略しているが、他のストリーム処理プロセス110−1、110−2、110−5で稼働するクエリの定義についても同様に定義される。   Although the description is omitted in the first embodiment, the definitions of the queries that operate in the other stream processing processes 110-1, 110-2, and 110-5 are similarly defined.

図5は、工場の生産ラインを監視する、継続クエリのクエリグラフの一例を示すブロック図である。図4に示したクエリ400中の、各ストリーム処理プロセスで稼働する分析クエリの定義に従って、入力ストリーム501〜503や分析クエリ511〜515間の入出力関係が定まる。   FIG. 5 is a block diagram showing an example of a query graph of a continuous query for monitoring a production line of a factory. The input / output relationship between the input streams 501 to 503 and the analysis queries 511 to 515 is determined according to the definition of the analysis query that operates in each stream processing process in the query 400 illustrated in FIG.

入力ストリーム501〜504は、図4のクエリ400のストリームS1〜S4に対応する。分析クエリ511〜515は、クエリ400のアノテーションによって、それぞれストリーム処理プロセス110−1〜110−5で稼働すると定義されるクエリを表す。   The input streams 501 to 504 correspond to the streams S1 to S4 of the query 400 in FIG. The analysis queries 511 to 515 represent queries defined to operate in the stream processing processes 110-1 to 110-5, respectively, by the annotation of the query 400.

例えば、分析クエリ513はQ3、分析クエリ514はQ12とQ4を表す。実行ノード指定アノテーション520の構成要素であるアノテーション521〜525は、それぞれ分析クエリ511〜515の実行プロセス(ストリーム処理プロセス110−1〜110−5)に対応する。   For example, the analysis query 513 indicates Q3, and the analysis query 514 indicates Q12 and Q4. The annotations 521 to 525, which are components of the execution node designation annotation 520, correspond to the execution processes (stream processing processes 110-1 to 110-5) of the analysis queries 511 to 515, respectively.

図6は、従来例を示し、場の生産ラインを監視する処理を、ストリーム処理プロセス間で連携する一例を示すブロック図である。   FIG. 6 is a block diagram showing a conventional example, in which processing for monitoring a production line at a site is linked between stream processing processes.

ストリーム処理サーバ100−1、100−2、100−3上で、それぞれストリーム処理プロセス110−1、110−2、110−3が稼働し、それぞれのストリーム処理サーバ100が有するセンサ200−1、200−2、200−3のデータを分析する。各センサ200は、データの取得時刻を表すタイムスタンプと、検出した製造物のセンサ値の組合せを、ストリームタプル631〜639として生成し、ストリーム処理プロセス110−1、110−2、110−3に入力する。   The stream processing processes 110-1, 110-2, and 110-3 operate on the stream processing servers 100-1, 100-2, and 100-3, respectively, and the sensors 200-1 and 200 included in the stream processing servers 100 respectively. -2 and 200-3 are analyzed. Each sensor 200 generates, as stream tuples 631 to 639, a combination of a time stamp indicating the data acquisition time and the sensor value of the detected product, and sends the combination to the stream processing processes 110-1, 110-2, and 110-3. input.

ストリーム処理プロセス110−1、110−2、110−3は、センサデータを分析して、それぞれ分析結果タプル641、642、643を生成し、自身の下流に位置するストリーム処理プロセス110に送信する。   The stream processing processes 110-1, 110-2, and 110-3 analyze the sensor data, generate analysis result tuples 641, 642, and 643, respectively, and transmit them to the stream processing process 110 located downstream thereof.

分析結果タプル641、642、643は、センサデータのタイムスタンプと、分析結果の組合せである。このとき、各ストリーム処理プロセス110は、センサデータのみならず、自身の上流に位置するストリーム処理プロセス110の分析結果タプルと付き合わせて分析する。また、上流プロセスより受信した過去の分析結果タプルは、この付き合わせ対象として必要な分だけ確保しておく。分析結果タプル644〜647は、このために確保されたタプルである。   The analysis result tuples 641, 642, and 643 are combinations of the time stamp of the sensor data and the analysis result. At this time, each stream processing process 110 analyzes not only the sensor data but also the analysis result tuple of the stream processing process 110 located upstream of itself. In addition, the past analysis result tuples received from the upstream process are secured in an amount necessary for the matching. The analysis result tuples 644 to 647 are tuples reserved for this purpose.

センサ200−1、200−2、200−3は、生産ライン650を流れる製造物651〜655のデータを取得する。センサ200−1でデータを取得してから、センサ200−2でデータを取得するまでの時間差は3秒であり、センサ200−2でデータを取得してから、センサ200−3でデータを取得するまでの時間差は2秒である。   The sensors 200-1, 200-2, and 200-3 acquire data of products 651 to 655 flowing through the production line 650. The time difference between when the data is acquired by the sensor 200-1 and when the data is acquired by the sensor 200-2 is 3 seconds. After the data is acquired by the sensor 200-2, the data is acquired by the sensor 200-3. The time difference before the execution is 2 seconds.

例えば、センサ200−1が、製造物651のデータを取得した時刻は9:05:05で、その際にストリームタプル635を生成している。その後、センサ200−2が、該製造物651のデータを取得した時刻は9:05:08で、その際にストリームタプル638を生成している。その後、センサ200−3が、該製造物651のデータを取得した時刻は9:05:10で、その際にストリームタプル639を生成している。   For example, the time when the sensor 200-1 acquires the data of the product 651 is 9:05:05, and at that time, a stream tuple 635 is generated. After that, the time when the sensor 200-2 acquires the data of the product 651 is 9:05:08, and at that time, a stream tuple 638 is generated. Thereafter, the time when the sensor 200-3 acquires the data of the product 651 is 9:05:10, and at that time, a stream tuple 639 is generated.

時刻9:05:10において、センサ200−1、200−2、200−3が、それぞれ製造物655、653、651のデータを取得し、それぞれストリームタプル631、636、639を生成している。各ストリームタプルに付帯する四角が示す値は、実時間を表す。例えば、各センサ200は、小数点以下第二位までの精度で正秒のタイミングでデータを取得する。   At time 9:05:10, sensors 200-1, 200-2, and 200-3 acquire data of manufactured products 655, 653, and 651, respectively, and generate stream tuples 631, 636, and 639, respectively. The value indicated by the square attached to each stream tuple represents real time. For example, each sensor 200 acquires data at a timing of a second with an accuracy up to the second decimal place.

各ストリームタプルが、ストリーム処理プロセス110で分析されてから、次のストリーム処理プロセスに分析結果が到達するまで、実時間で約0.3秒の時間が掛るとする。例えば、9:05:10.00にセンサ200−1が生成したストリームタプル631が、ストリーム処理プロセス110−1で分析され、その結果である分析結果タプル641が、ストリーム処理プロセス110−2に到達した時刻は、9:05:10.32となる。この例では、0.32秒がストリーム処理サーバ100−1の処理に要した時間となる。   It is assumed that it takes about 0.3 seconds in real time after each stream tuple is analyzed by the stream processing process 110 until the analysis result reaches the next stream processing process. For example, the stream tuple 631 generated by the sensor 200-1 at 9: 05: 10.00 is analyzed by the stream processing process 110-1, and the analysis result tuple 641 as a result reaches the stream processing process 110-2. The time when it was performed is 9: 05: 10.32. In this example, 0.32 seconds is the time required for the processing of the stream processing server 100-1.

ここで、ストリーム処理プロセス110−2では、9:05:10.00にセンサ200−2が生成したストリームタプル636の分析を、9:05:10.00から開始することはできない。なぜならば、ストリームタプル636のタイムスタンプ9:05:10以降のタイムスタンプを含む、ストリーム処理プロセス110−1からの分析結果タプルを、9:05:10.00の時点では受取っていないためである。   Here, in the stream processing process 110-2, the analysis of the stream tuple 636 generated by the sensor 200-2 at 9: 05: 10.00 cannot be started from 9: 05: 10.00. This is because the analysis result tuple from the stream processing process 110-1 including the time stamp 9:05:10 or later of the stream tuple 636 has not been received at 9: 05: 10.00. .

ストリーム処理プロセス110−2がストリーム処理プロセス110−1より直近に受取った分析結果タプルは645であり、そのタイムスタンプは9:05:09である。そのため、ストリーム処理プロセス110−1からは、9:05:09〜9:05:10のタイムスタンプを含む分析結果タプルが到来する可能性があり、ストリームタプル636を、その分析結果タプルよりも先に処理することを禁止する必要がある。時刻順に従った、厳密に再現性のあるストリーム処理を実現するためには、このような実行制御が必要になる。   The analysis result tuple received by the stream processing process 110-2 most recently from the stream processing process 110-1 is 645, and its time stamp is 9:05:09. Therefore, there is a possibility that an analysis result tuple including a time stamp of 9:05:09 to 9:05:10 may arrive from the stream processing process 110-1, and the stream tuple 636 is placed before the analysis result tuple. Must be banned. In order to realize strictly reproducible stream processing according to the time order, such execution control is required.

ストリーム処理サーバ100−2で、9:05:10の分析を開始するタイミングは、分析結果タプル641が到来する9:05:10.32まで保留されるため、9:05:10の分析結果タプル642がストリーム処理プロセス110−2から110−3に到達するタイミングは、さらに約0.3秒あとの9:05:10.61になる。同様にストリーム処理プロセス110−3による9:05:10の分析結果タプル643が、後段のストリーム処理プロセスに110−4到達するタイミングは、更に約0.3秒あとの9:05:10.93になる。このように、生産ラインが長くなる程、分析結果が出力されるタイミングは遅れることになる。   The timing at which the stream processing server 100-2 starts the analysis at 9:05:10 is held until 9: 05: 10.32 when the analysis result tuple 641 arrives, so the analysis result tuple at 9:05:10 The timing when the 642 reaches the stream processing processes 110-2 to 110-3 is 9: 05: 10.61, which is about 0.3 seconds later. Similarly, the timing at which the analysis result tuple 643 of 9:05:10 by the stream processing process 110-3 reaches the subsequent stream processing process at 110-4 is 9: 05: 10.93, which is about 0.3 seconds later. become. As described above, as the production line becomes longer, the timing at which the analysis result is output is delayed.

図7は、自動車の車両間通信を実現する、従来のストリーム処理プロセス間連携の一例を示すブロック図である。この従来例では、車載マイクロコンピュータであるストリーム処理サーバ100−1、100−2上で、それぞれストリーム処理プロセス110−1、110−2が本実施例と同様に稼働し、それぞれのストリーム処理サーバ100が搭載されている車両の、各種センサで取得した位置情報や、速度の情報を表す位置・速度タプル731、732を分析して、数秒後の未来の自車の予測位置を表す予測位置タプル770、771を算出し、他車に転送する。このとき、各ストリーム処理プロセス110は、位置・速度タプル731、732のみならず、他車の予測位置タプル770、771と付き合わせて分析する。   FIG. 7 is a block diagram showing an example of a conventional stream processing inter-process cooperation for realizing inter-vehicle communication of an automobile. In this conventional example, stream processing processes 110-1 and 110-2 operate on stream processing servers 100-1 and 100-2, which are vehicle-mounted microcomputers, respectively, in the same manner as in the present embodiment. The position and speed tuples 731 and 732 representing the position information and speed information obtained by various sensors of the vehicle on which the is mounted are analyzed, and the predicted position tuple 770 representing the predicted position of the own vehicle in a few seconds later is analyzed. , 771 and transfer them to another vehicle. At this time, each stream processing process 110 analyzes not only the position / speed tuples 731 and 732 but also the predicted position tuples 770 and 771 of other vehicles.

位置・速度タプル731、732は正秒毎に取得され、取得時のタイムスタンプが付与されてストリーム処理プロセス110に入力される。また、予測位置タプル770、771にも、予測の元となった位置・速度タプル731、732と同じ値のタイムスタンプが付与される。   The position / velocity tuples 731 and 732 are acquired every second, a time stamp at the time of acquisition is given, and the acquired time stamp is input to the stream processing process 110. Also, the time stamps having the same values as the position / velocity tuples 731 and 732 from which the predictions are made are given to the predicted position tuples 770 and 771.

ここで、ストリーム処理プロセス110−1は、9:05:10.00に取得した、9:05:10のタイムスタンプを含む位置・速度タプル731と、ストリーム処理プロセス110−2から到来する、同じく9:05:10のタイムスタンプを含む予測位置タプル770とを突き合わせて、予測位置タプルを生成し、ストリーム処理プロセス110−2に送付する。   Here, the stream processing process 110-1 includes a position / velocity tuple 731 acquired at 9: 05: 10.00 and including a time stamp of 9:05:10, and a stream processing process 110-2. A predicted position tuple 770 including a time stamp of 9:05:10 is matched to generate a predicted position tuple, which is sent to the stream processing process 110-2.

従って、この処理は、予測位置タプル770がストリーム処理プロセス110−2から110−1に到来するまで保留されることになる。一方、ストリーム処理プロセス110−2においても、ストリーム処理プロセス110−1から予測位置タプル771が到来するまで、位置・速度タプル732の処理が保留されるため、予測位置タプル770の生成が保留される。   Therefore, this processing is suspended until the predicted position tuple 770 arrives at the stream processing processes 110-2 to 110-1. On the other hand, also in the stream processing process 110-2, the processing of the position / velocity tuple 732 is suspended until the predicted position tuple 771 arrives from the stream processing process 110-1. Therefore, the generation of the predicted position tuple 770 is suspended. .

このように、従来例のストリーム処理プロセス110−1とストリーム処理プロセス110−2は、9:05:10の分析処理を進めるにあたって、お互いに9:05:10の分析結果を必要とする、という相互依存関係を含んでいるため、ハングアップ(またはデッドロック)する、という問題があった。   As described above, the stream processing process 110-1 and the stream processing process 110-2 of the conventional example need each other's analysis results of 9:05:10 to perform the analysis processing of 9:05:10. There is a problem that hang-up (or deadlock) occurs due to the interdependency.

図8は、可変遅延演算を挿入した再帰クエリを工場の生産ラインの監視処理に適用した例を示すブロック図である。ストリーム処理分散実行システム801は、ストリーム処理サーバ100−1〜100−5を管理しており、各ストリーム処理サーバ100では、それぞれストリーム処理プロセス110−1〜110−5が稼働する。   FIG. 8 is a block diagram showing an example in which a recursive query into which a variable delay operation has been inserted is applied to monitoring processing of a production line in a factory. The stream processing distributed execution system 801 manages the stream processing servers 100-1 to 100-5. In each stream processing server 100, stream processing processes 110-1 to 110-5 operate, respectively.

ストリーム処理分散実行システム801が受け付けるクエリ定義132は、クエリ定義132を含むファイルで定義されるクエリグラフが、入力ストリーム811と、分析クエリ812と、および可変遅延演算813を含んでいる。そして、クエリ定義132は、分析クエリ812の出力が、可変遅延演算813を介して、再び分析クエリ812自身への入力となる、再帰クエリ(再帰ループ820)を構成している必要がある。   The query definition 132 received by the stream processing distributed execution system 801 includes a query graph defined by a file including the query definition 132, including an input stream 811, an analysis query 812, and a variable delay operation 813. Then, the query definition 132 needs to form a recursive query (recursive loop 820) in which the output of the analysis query 812 becomes the input to the analysis query 812 again via the variable delay operation 813.

ストリーム処理分散実行システム801は、例えば、ストリーム処理分散実行管理サーバ1001がクエリ定義132を受取ると、クエリ分配部1002が、ストリーム処理プロセス110−1〜110−5に分配する。この時点では、各ストリーム処理プロセス110上のクエリグラフはそれぞれ独立して稼働する。   In the stream processing distributed execution system 801, for example, when the stream processing distributed execution management server 1001 receives the query definition 132, the query distribution unit 1002 distributes the stream processing to the stream processing processes 110-1 to 110-5. At this point, the query graphs on each stream processing process 110 operate independently.

この状態において、入力側サーバ識別子(または、データソースの識別子)、出力側サーバ識別子(またはデータ受信機140の識別子)、遅延時間、およびタイムスタンプ(実行開始時刻)から構成される構成変更命令815が、例えば、ホスト計算機130よりストリーム処理分散実行システム801に投入されると、ストリーム処理サーバ100ではクエリグラフの再設定が行われる。   In this state, the configuration change instruction 815 including the input server identifier (or data source identifier), output server identifier (or data receiver 140 identifier), delay time, and time stamp (execution start time). For example, when the stream processing server 100 is input from the host computer 130 to the stream processing distributed execution system 801, the query graph is reset in the stream processing server 100.

すなわち、ストリーム処理プロセス110が構成変更命令815を受信すると、クエリグラフの再帰ループ820は切断され、入力ストリーム811と、分析クエリ812と、可変遅延演算813が一方通行で並ぶ形となる。そして、可変遅延演算813の出力は、下流のクエリグラフの分析クエリ812へ入力される。   That is, when the stream processing process 110 receives the configuration change instruction 815, the recursive loop 820 of the query graph is disconnected, and the input stream 811, the analysis query 812, and the variable delay operation 813 are arranged in one way. Then, the output of the variable delay operation 813 is input to the analysis query 812 of the downstream query graph.

入力側サーバ識別子で示されたストリーム処理サーバ100上で稼働するストリーム処理プロセス110から、出力側サーバ識別子で示されたストリーム処理サーバ100上で稼働するストリーム処理プロセス110へと、タプルの送信経路が設定される。   The tuple transmission path is from the stream processing process 110 running on the stream processing server 100 indicated by the input server identifier to the stream processing process 110 running on the stream processing server 100 indicated by the output server identifier. Is set.

入力側のストリーム処理プロセス110が生成した分析結果タプルを、出力側のストリーム処理プロセス110へ送信する際には、該タプルのタイムスタンプを、該遅延時間の値を加算したタイムスタンプに変更する。なお、可変遅延演算の効果は、図6、図7の従来例との対比について後述する。   When transmitting the analysis result tuple generated by the stream processing process 110 on the input side to the stream processing process 110 on the output side, the time stamp of the tuple is changed to a time stamp obtained by adding the value of the delay time. The effect of the variable delay calculation will be described later in comparison with the conventional example shown in FIGS.

図5に示したクエリグラフと等価な分析を実行するクエリグラフを、クエリ定義132によって定義することができる。この定義は、各分析クエリ812が、入力ストリームと、他の分析クエリ812の結果タプルを処理して、分析結果を生成し、他の分析クエリ812(下流の分析クエリ)に出力することを表現している。分析クエリ812間の接続関係は、構成変更命令815によって動的に定義または変更することが可能である。   A query graph that performs an analysis equivalent to the query graph shown in FIG. 5 can be defined by the query definition 132. This definition states that each analytics query 812 processes the input stream and the result tuple of another analytics query 812 to generate an analytic result and outputs it to another analytics query 812 (downstream analytics query). doing. The connection relationship between the analysis queries 812 can be dynamically defined or changed by the configuration change instruction 815.

以上のように、再帰クエリを含むクエリ定義132を各ストリーム処理プロセス110に配布しておき、構成変更命令815を与えることで分析クエリ812に与える入力ストリーム811と、可変遅延演算813の出力先を決定することが可能となる。   As described above, the query definition 132 including the recursive query is distributed to each stream processing process 110, and the input stream 811 given to the analysis query 812 by giving the configuration change instruction 815 and the output destination of the variable delay operation 813 are It is possible to decide.

これにより、ストリーム処理プロセス110を停止させることなく、分析クエリ812の入出力関係と遅延時間を動的に変更することが可能となり、ストリーム処理システムの可用性を向上させることができる。そして、構成変更命令815によって、多数のストリーム処理プロセス110の分析クエリ812の入出力関係と遅延時間を随時変更することが可能となるため、生産設備の変更や製品の変更などに容易に対処することが可能となる。   Accordingly, the input / output relationship and the delay time of the analysis query 812 can be dynamically changed without stopping the stream processing process 110, and the availability of the stream processing system can be improved. The configuration change instruction 815 makes it possible to change the input / output relationship and the delay time of the analysis queries 812 of many stream processing processes 110 at any time, so that it is possible to easily deal with changes in production equipment and products. It becomes possible.

さらに、各ストリーム処理プロセス110に配布するクエリ定義132は少なくとも一つあれば良いので、リアルタイム分析アプリケーションの開発を容易に行うことができる。   Further, since it is sufficient that at least one query definition 132 is distributed to each stream processing process 110, real-time analysis application can be easily developed.

なお、構成変更命令815の入力側サーバ識別子は、他のストリーム処理サーバ100やセンサ200やデータソース120等、1以上の計算機やデバイスを指定することができる。構成変更命令815の出力側サーバ識別子は、タプルを送信するストリーム処理サーバ100やデータ受信機140など1以上の計算機を指定することができる。なお、データソース120は、計算機やセンサネットワークなどタプルを出力する装置で構成すればよい。   Note that the input-side server identifier of the configuration change instruction 815 can specify one or more computers or devices such as another stream processing server 100, sensor 200, or data source 120. The output server identifier of the configuration change instruction 815 can specify one or more computers such as the stream processing server 100 and the data receiver 140 that transmit tuples. The data source 120 may be configured by a device that outputs tuples such as a computer and a sensor network.

図9A、図9Bは、可変遅延演算を挿入した再帰クエリの一例を示すスクリプトである。図9Aのクエリ900の冒頭は、センサ200−1〜200−4が取得するデータを入力ストリームとして定義する、SXのregister stream句が記載されている。   9A and 9B are scripts illustrating an example of a recursive query into which a variable delay operation has been inserted. The beginning of the query 900 in FIG. 9A describes an SX register stream clause that defines data acquired by the sensors 200-1 to 200-4 as an input stream.

クエリQXは、ストリーム処理プロセス110−1〜110−5で稼働する分析クエリを定義する。クエリQXDは、クエリQXの結果に対して可変遅延演算を付加する処理を定義しており、<variable>という記述が、固定された遅延時間の定義を持たない、可変遅延演算の操作を定義している。   The query QX defines an analysis query that operates in the stream processing processes 110-1 to 110-5. The query QXD defines a process of adding a variable delay operation to the result of the query QX, and the description <variable> defines a variable delay operation that does not have a fixed delay time definition. ing.

クエリQXは、クエリQXDの結果、即ちクエリQX自身の結果を遅延させたストリームと、ストリームSXの両者を入力として、分析処理を生成し、クエリQXDを介して再びクエリQX自身の入力としている、という再帰的な処理を定義している。クエリ400と等価な分析を実行するクエリを、クエリ900によって定義することができる。   The query QX receives the result of the query QXD, that is, both the stream in which the result of the query QX itself is delayed and the stream SX as input, generates an analysis process, and again uses the query QXD as the input of the query QX itself. Recursive processing is defined. A query that performs an analysis that is equivalent to query 400 can be defined by query 900.

図9Bのクエリ901は、分析クエリが多数のregister query句で構成される例を示している。クエリQAからクエリQXまでの一連のクエリによって分析クエリが構成され、最後のクエリQXの結果が、クエリQXDで遅延されて、再びクエリQAの結果として入力されている。このようなクエリも、クエリ定義132として、ストリーム処理分散実行システム801に投入することが可能である。   The query 901 of FIG. 9B shows an example in which the analysis query is composed of many register query clauses. An analysis query is formed by a series of queries from the query QA to the query QX, and the result of the last query QX is delayed by the query QXD and input again as the result of the query QA. Such a query can also be input to the stream processing distributed execution system 801 as the query definition 132.

図10は、ストリーム処理プロセス110の構成を示すブロック図である。ストリーム処理分散実行システム801は、ストリーム処理分散実行管理サーバ1001と、ストリーム処理プロセスを実行する複数のストリーム処理サーバ100を有する。ストリーム処理分散実行管理サーバ1001は、クエリ登録インタフェース131などを介して、例えば、ホスト計算機130からクエリ定義132を受取り、ストリーム処理プロセス110に分配するクエリ分配部1002、および、例えば、ホスト計算機130から構成変更命令815を受信し、各ストリーム処理プロセス110に分配する構成変更命令分配部1003と、ストリーム処理サーバ100の識別子とアドレスを予め設定したサーバテーブル1004とを含む。   FIG. 10 is a block diagram showing a configuration of the stream processing process 110. The stream processing distributed execution system 801 includes a stream processing distributed execution management server 1001 and a plurality of stream processing servers 100 that execute a stream processing process. The stream processing distributed execution management server 1001 receives, for example, the query definition 132 from the host computer 130 via the query registration interface 131 and the like, and distributes the query definition 132 to the stream processing process 110, and, for example, from the host computer 130. It includes a configuration change command distribution unit 1003 that receives the configuration change command 815 and distributes it to each stream processing process 110, and a server table 1004 in which an identifier and an address of the stream processing server 100 are set in advance.

構成変更命令815の入力側サーバ識別子、および出力側サーバ識別子において、それぞれストリーム処理サーバ100−1、およびストリーム処理サーバ100−2が指定されている場合を想定する。   It is assumed that the stream processing server 100-1 and the stream processing server 100-2 are specified in the input server identifier and the output server identifier of the configuration change instruction 815, respectively.

ストリーム処理プロセス110−1、110−2は、それぞれ、クエリ処理エンジン(クエリ処理部)1011、1031と、クエリ解析部1012、1032と、タプルの入力アダプタ1016、1036と、および構成変更命令受信部1022、1041とを有する。   The stream processing processes 110-1 and 110-2 are respectively composed of query processing engines (query processing units) 1011 and 1031, query analysis units 1012 and 1032, tuple input adapters 1016 and 1036, and a configuration change instruction receiving unit. 1022, 1041.

クエリ処理エンジン1011、1031は、それぞれ、クエリグラフ1013、1033と、クエリグラフの結果タプルを保存する結果タプルキュー1014、1034、およびクエリグラフの実行時間を管理する、実行時刻管理部1015、1035を有する。   Each of the query processing engines 1011 and 1031 has query graphs 1013 and 1033, result tuple queues 1014 and 1034 for storing the result tuples of the query graph, and execution time management units 1015 and 1035 for managing the execution time of the query graph. .

クエリ解析部1012、1032は、クエリ分配部1002からクエリ定義132に記載されたクエリ定義を受取り、該クエリ定義をパースしてクエリグラフを構築し、それぞれ、クエリ処理エンジン1011、1031の中に、クエリグラフ1013、1033として投入する。   The query analysis units 1012 and 1032 receive the query definition described in the query definition 132 from the query distribution unit 1002, parse the query definition and construct a query graph, and generate a query graph in the query processing engines 1011 and 1031 respectively. Input as query graphs 1013 and 1033.

構成変更命令受信部1022、1041は、入力側のストリーム処理プロセス110−1に位置する構成変更命令受信部1022と、出力側のストリーム処理プロセス110−2に位置する構成変更命令受信部1041とで処理内容が異なる。   The configuration change instruction receiving units 1022 and 1041 are composed of a configuration change instruction receiving unit 1022 located in the input stream processing process 110-1 and a configuration change instruction receiving unit 1041 located in the output stream processing process 110-2. Processing contents are different.

出力側のストリーム処理プロセス110−2の構成変更命令受信部1041は、入力側サーバ識別子にて指定されたサーバ100−1が出力するタプルを受け付けるように、入力アダプタ1036と出力アダプタ1017との間の通信接続を確立する。一方、入力側のストリーム処理プロセス110−1の構成変更命令受信部1022も、出力側サーバ識別子にて指定されたサーバ100−2に対してタプルを出力するように、入力アダプタ1036と出力アダプタ1017との間の通信接続を確立する。   The configuration change instruction receiving unit 1041 of the output-side stream processing process 110-2 operates between the input adapter 1036 and the output adapter 1017 so as to receive the tuple output by the server 100-1 specified by the input-side server identifier. Establish a communication connection. On the other hand, the configuration change instruction receiving unit 1022 of the input-side stream processing process 110-1 also outputs the tuple to the server 100-2 specified by the output-side server identifier, so that the tuple is output to the server 100-2. Establish a communication connection with

また、入力側のストリーム処理プロセス110−1は、構成変更命令受信部1022が受信した構成変更命令815をタイムスタンプ順に保存する、構成変更命令キュー1023と、結果タプルキュー1014に保存されている結果タプルのタイムスタンプをシフトさせて、出力アダプタ1017に他サーバへの送信を依頼する、可変遅延演算実行部1024、および出力先別に異なる遅延時間幅を保存する、出力先別遅延時間管理表1025とを有する。なお、可変遅延演算実行部1024は、図8のクエリ定義132に示した可変遅延演算813に対応する。   The stream processing process 110-1 on the input side stores the configuration change commands 815 received by the configuration change command receiving unit 1022 in the order of time stamps, and the configuration tuple queue 1023 and the result tuple stored in the result tuple queue 1014. , A variable delay calculation execution unit 1024 that requests the output adapter 1017 to transmit to another server, and a delay time management table 1025 that stores different delay time widths for each output destination. Have. Note that the variable delay calculation execution unit 1024 corresponds to the variable delay calculation 813 shown in the query definition 132 in FIG.

なお、出力アダプタ1017と入力アダプタ1016、1036の設定は、サーバテーブル1004を参照してサーバ識別子に対応するアドレスを取得すれば良い。サーバテーブル1004は、サーバ識別子とIPアドレスを一つのエントリとして構成すれば良い。また、ストリーム処理分散実行管理サーバ1001は、各ストリーム処理サーバ100にサーバテーブル1004を配布して、各ストリーム処理プロセス110がサーバテーブル1004を参照するようにしてもよい。   The settings of the output adapter 1017 and the input adapters 1016 and 1036 may be obtained by referring to the server table 1004 and acquiring the address corresponding to the server identifier. The server table 1004 may be configured with the server identifier and the IP address as one entry. Also, the stream processing distributed execution management server 1001 may distribute the server table 1004 to each stream processing server 100 so that each stream processing process 110 refers to the server table 1004.

さらに、ストリーム処理プロセス110は、例えば、ホスト計算機130から投入される構成変更命令815を受信するのではなく、分析対象の変化などに追従して自律的に構成変更を決定する、構成変更自律決定部1021を有する。   Further, the stream processing process 110 does not receive, for example, a configuration change command 815 input from the host computer 130, but autonomously determines a configuration change following a change in an analysis target. A portion 1021.

構成変更自律決定部1021は、決定した構成変更を構成変更命令815として生成し、入力側と出力側の双方に備わる構成変更命令受信部1022、1041に向けて送信する。構成変更自律決定部1021は、入力側と出力側のどちらのストリーム処理プロセス110に配置されても構わない。   The configuration change autonomous determination unit 1021 generates the determined configuration change as the configuration change command 815, and transmits it to the configuration change command receiving units 1022 and 1041 provided on both the input side and the output side. The configuration change autonomous determination unit 1021 may be arranged in any of the stream processing processes 110 on the input side and the output side.

構成変更自律決定部1021が構成変更を決定するために用いるアルゴリズムは、特定の手順には固定されておらず、分析対象に合せて交換可能とする。そのため、構成変更自律決定部1021は、構成変更決定アルゴリズム向けのAPIを有しており、該APIに従って実装された所定のアルゴリズムを組込み可能とする。   The algorithm used by the configuration change autonomous determination unit 1021 to determine the configuration change is not fixed to a specific procedure, and can be exchanged according to the analysis target. Therefore, the configuration change autonomous determination unit 1021 has an API for a configuration change determination algorithm, and can incorporate a predetermined algorithm implemented according to the API.

以上の構成により、ストリーム処理サーバ100−1は、受け付けた入力ストリームを分析クエリで処理し、さらに、遅延演算を行ったタプルを結果タプル141としてストリーム処理サーバ100−2へ出力する。ストリーム処理サーバ100−2は、入力ストリームに加えてストリーム処理サーバ100−1からの結果タプル141を受け付けて分析クエリで処理を行い、結果タプル141を出力する。   With the above configuration, the stream processing server 100-1 processes the received input stream with the analysis query, and outputs the tuple on which the delay operation has been performed to the stream processing server 100-2 as the result tuple 141. The stream processing server 100-2 receives the result tuple 141 from the stream processing server 100-1 in addition to the input stream, performs processing using the analysis query, and outputs the result tuple 141.

なお、図示の例では、ストリーム処理サーバ100−2の遅延演算実行部と出力アダプタ等は機能しないため図示されていない。しかし、ストリーム処理サーバ100−2の下流で、さらに分析クエリを実行する場合には、可変遅延演算実行部と出力アダプタ等が有効化される。   In the illustrated example, the delay calculation execution unit and the output adapter of the stream processing server 100-2 do not function and are not illustrated. However, when an analysis query is further executed downstream of the stream processing server 100-2, the variable delay calculation execution unit and the output adapter are enabled.

また、ストリーム処理プロセス110のクエリ解析部1012と、構成変更自律決定部1021と、構成変更命令受信部1022と、可変遅延演算実行部1024と、クエリ処理エンジン1026の各機能部はプログラムとしてメモリ103にロードされる。   Each functional unit of the query analysis unit 1012, the configuration change autonomous determination unit 1021, the configuration change instruction receiving unit 1022, the variable delay calculation execution unit 1024, and the query processing engine 1026 of the stream processing process 110 is a memory 103 as a program. Is loaded.

CPU101は、各機能部のプログラムに従って処理することによって、所定の機能を提供する機能部として稼働する。例えば、CPU101は、クエリ解析プログラムに従って処理することでデバイス選択クエリ解析部1012として機能する。他のプログラムについても同様である。さらに、CPU101は、各プログラムが実行する複数の処理のそれぞれの機能を提供する機能部としても稼働する。計算機及び計算機システムは、これらの機能部を含む装置及びシステムである。   The CPU 101 operates as a functional unit that provides a predetermined function by performing processing according to a program of each functional unit. For example, the CPU 101 functions as a device selection query analysis unit 1012 by performing processing according to a query analysis program. The same applies to other programs. Further, the CPU 101 also operates as a functional unit that provides each function of a plurality of processes executed by each program. The computer and the computer system are devices and systems including these functional units.

図11は、構成変更命令815の一例を示すブロック図である。構成変更命令815には、当該命令が9:05:10以降のタイムスタンプを含む結果タプルに対して適用開始となること、入力側サーバ、出力側サーバがそれぞれ100−1、100−2であること、および遅延時間が3秒であることが示されている。   FIG. 11 is a block diagram illustrating an example of the configuration change instruction 815. The configuration change instruction 815 indicates that the instruction is to be applied to a result tuple including a time stamp after 9:05:10, and that the input side server and the output side server are 100-1 and 100-2, respectively. And a delay time of 3 seconds.

ストリーム処理分散実行管理サーバ1001の構成変更命令分配部1003は、構成変更命令815を、入力側のストリーム処理サーバ100−1の構成変更命令受信部1022に配送する入力側構成変更命令1101と、出力側のストリーム処理サーバ100−2の構成変更命令受信部1041に配送する出力側構成変更命令1102に分解する。   The configuration change instruction distribution unit 1003 of the stream processing distributed execution management server 1001 includes an input side configuration change instruction 1101 for delivering the configuration change instruction 815 to the configuration change instruction reception unit 1022 of the input side stream processing server 100-1; Is decomposed into an output-side configuration change instruction 1102 to be delivered to the configuration change instruction receiving unit 1041 of the stream processing server 100-2 on the side.

ストリーム処理サーバ100−1、100−2では、構成変更命令815を受け付けると、指定された時刻に入出力の関係と遅延時間を動的に切り替えることが可能となる。   Upon receiving the configuration change instruction 815, the stream processing servers 100-1 and 100-2 can dynamically switch the input / output relationship and the delay time at the designated time.

図12A〜図12Dは、可変遅延演算実行部で処理するデータの一例を示す図である。図12Aは、結果タプルキュー1014の一例を示す図である。結果タプルキュー1014には、結果タプル1211、1212、1213、1214が格納されている状態を示す。   12A to 12D are diagrams illustrating an example of data processed by the variable delay calculation execution unit. FIG. 12A is a diagram illustrating an example of the result tuple queue 1014. The result tuple queue 1014 indicates a state in which the result tuples 1211, 1212, 1213, and 1214 are stored.

図12Bは、構成変更命令キュー1023の一例を示す図である。構成変更命令キュー1023には、入力側構成変更命令1101、1231が格納された例を示す。図示の例では、9:05:10で出力側がストリーム処理サーバ100−2へ切り替えられて遅延時間が3秒に設定され、9:05:20で出力側がストリーム処理サーバ100−3へ切り替えられて遅延時間が4秒に変更される例を示している。   FIG. 12B is a diagram illustrating an example of the configuration change instruction queue 1023. The example in which the input side configuration change instructions 1101 and 1231 are stored in the configuration change instruction queue 1023 is shown. In the illustrated example, the output side is switched to the stream processing server 100-2 at 9:05:10, the delay time is set to 3 seconds, and the output side is switched to the stream processing server 100-3 at 9:05:20. An example in which the delay time is changed to 4 seconds is shown.

図12Cは、出力先別遅延時間管理表1025の一例を示す図である。出力先別遅延時間管理表1025には、二つのエントリが存在し、出力先1201、および遅延時間1202の値が、それぞれ図の状態となっている。   FIG. 12C is a diagram illustrating an example of the delay time management table 1025 for each output destination. The output destination-specific delay time management table 1025 has two entries, and the values of the output destination 1201 and the delay time 1202 are as shown in the figure.

図12Dは、可変遅延演算実行部1024の状態を示す図である。可変遅延演算実行部1024は、結果タプルキュー1014の先頭タプル1211を取出して、出力先別遅延時間管理表1025の遅延時間1202のカラムの値に合せて、タプル1211のタイムスタンプに、それぞれ3秒と5秒を加えた2つのタプル1221、1222を生成し、出力先1201のカラムが示すストリーム処理サーバ100−3、100−4(図中サーバ3、サーバ4)に、それぞれ送付する。   FIG. 12D is a diagram illustrating a state of the variable delay calculation execution unit 1024. The variable delay calculation execution unit 1024 takes out the first tuple 1211 of the result tuple queue 1014 and sets the time stamp of the tuple 1211 to 3 seconds in accordance with the value of the column of the delay time 1202 of the output destination-specific delay time management table 1025. Two tuples 1221 and 1222 with 5 seconds added are generated and sent to the stream processing servers 100-3 and 100-4 (server 3 and server 4 in the figure) indicated by the column of the output destination 1201 respectively.

ここで、可変遅延演算実行部1024は、構成変更命令キュー1023の先頭に位置する、構成変更命令1101のタイムスタンプ9:05:10と、結果タプル1211のタイムスタンプ9:05:09を比較し、前者の方が未来であったため、構成変更命令1101はキューに保留される。この後、可変遅延演算実行部1024は、結果タプル1212を処理する際には、当該タプルのタイムスタンプ9:05:10が、構成変更命令1101のタイムスタンプ9:05:10以降であるため、構成変更命令1101の内容を、出力先別遅延時間管理表1025に格納するため、出力先としてサーバ2(ストリーム処理サーバ100−2)のエントリを加え、3エントリとする。その結果として、タプル1212を3つのストリーム処理サーバ100−2〜100−4に送付する。   Here, the variable delay calculation execution unit 1024 compares the time stamp 9:05:10 of the configuration change instruction 1101 and the time stamp 9:05:09 of the result tuple 1211 located at the head of the configuration change instruction queue 1023. Since the former is the future, the configuration change instruction 1101 is held in the queue. Thereafter, when the variable delay calculation execution unit 1024 processes the result tuple 1212, the time stamp 9:05:10 of the tuple is after the time stamp 9:05:10 of the configuration change instruction 1101, In order to store the contents of the configuration change instruction 1101 in the output destination-specific delay time management table 1025, an entry of the server 2 (stream processing server 100-2) is added as an output destination, and the number is made three. As a result, the tuple 1212 is sent to the three stream processing servers 100-2 to 100-4.

図13は、可変遅延演算実行部1024で行われる処理の一例を示すフローチャートである。図13の処理は、ストリーム処理サーバ100−1の可変遅延演算実行部1024における、一つのタプルの処理の流れを示しており、ステップ1300から開始して、ステップ1311で終了する。この処理は、タプルが到着する度に実行される。   FIG. 13 is a flowchart illustrating an example of a process performed by the variable delay calculation execution unit 1024. The processing of FIG. 13 shows the flow of processing of one tuple in the variable delay calculation execution unit 1024 of the stream processing server 100-1, starting from step 1300 and ending with step 1311. This process is executed each time a tuple arrives.

まず、ステップ1301にて、可変遅延演算実行部1024は、結果タプルキュー1014から先頭タプルを取得する。続くステップ1302にて、可変遅延演算実行部1024は、構成変更命令キュー1023に構成変更命令815が存在するか否かを判定する。
構成変更命令815が存在しない場合にはステップ1307に進む。
First, in step 1301, the variable delay calculation execution unit 1024 acquires a head tuple from the result tuple queue 1014. In subsequent step 1302, variable delay calculation execution section 1024 determines whether or not configuration change instruction 815 exists in configuration change instruction queue 1023.
If there is no configuration change instruction 815, the process proceeds to step 1307.

一方、構成変更命令815が存在する場合には、可変遅延演算実行部1024がステップ1303にて、上記ステップ1301で結果タプルキュー1014から取得したタプルのタイムスタンプと、構成変更命令キュー1023の先頭に位置する構成変更命令のタイムスタンプを比較する。前者の方が過去である場合は、ステップ1307に進む。   On the other hand, if the configuration change instruction 815 exists, the variable delay calculation execution unit 1024 determines in step 1303 the timestamp of the tuple acquired from the result tuple queue 1014 in step 1301 and the position at the top of the configuration change instruction queue 1023. Compare the time stamps of the configuration change instructions. If the former is in the past, the process proceeds to step 1307.

それ以外の場合は、ステップ1304にて、可変遅延演算実行部1024は、当該構成変更命令の出力側のサーバ識別子にマッチするエントリが、出力先別遅延時間管理表1025に存在するか否かを判定し、存在する場合には、ステップ1305に進む。一方、出力側のサーバ識別子にマッチするエントリが、出力先別遅延時間管理表1025に存在しない場合には、ステップ1306へ進む。   In other cases, in step 1304, the variable delay calculation execution unit 1024 determines whether an entry matching the server identifier on the output side of the configuration change instruction exists in the output destination-specific delay time management table 1025. It is determined, and if it exists, the process proceeds to step 1305. On the other hand, if the entry matching the server identifier on the output side does not exist in the output destination-specific delay time management table 1025, the process proceeds to step 1306.

ステップ1305では、可変遅延演算実行部1024が、当該エントリを、当該構成変更命令の内容に更新する。一方、ステップ1306の、存在しない場合には、可変遅延演算実行部1024が当該構成変更命令の内容を、出力先別遅延時間管理表1025に、新規エントリとして登録する。そして、ステップ1305、1306の処理が完了すると、ステップ1302に戻って上記処理を繰り返す。   In step 1305, the variable delay calculation execution unit 1024 updates the entry with the contents of the configuration change instruction. On the other hand, if it does not exist in step 1306, the variable delay calculation execution unit 1024 registers the contents of the configuration change instruction as a new entry in the output destination-specific delay time management table 1025. When the processing of steps 1305 and 1306 is completed, the process returns to step 1302 and the above processing is repeated.

ステップ1307からステップ1310の処理は、可変遅延演算実行部1024が出力先別遅延時間管理表1025に存在するエントリの数だけ繰り返す。まず、ステップ1308にて、可変遅延演算実行部1024が上記ステップ1301で結果タプルキュー1014から取得したタプルのコピーを生成し、当該エントリの遅延時間1202の分だけ、タイムスタンプをシフトさせる。   The processing from step 1307 to step 1310 is repeated by the variable delay calculation execution unit 1024 by the number of entries existing in the output destination-specific delay time management table 1025. First, in step 1308, the variable delay calculation execution unit 1024 generates a copy of the tuple obtained from the result tuple queue 1014 in step 1301, and shifts the time stamp by the delay time 1202 of the entry.

そして、ステップ処理1309にて、可変遅延演算実行部1024は当該エントリの出力先1201に、前記でコピーしたタプルを送信する。ステップ1307からステップ1310のループを抜けると、可変遅延演算実行部1024はステップ1311に到達して処理を終了する。   Then, in step 1309, the variable delay calculation execution unit 1024 transmits the tuple copied above to the output destination 1201 of the entry. After exiting the loop from step 1307 to step 1310, the variable delay calculation execution unit 1024 reaches step 1311 and ends the processing.

上記処理によって、結果タプルキュー1014の結果タプル141のタイムスタンプが、構成変更命令キュー1023の構成変更命令のタイムスタンプであれば、可変遅延演算実行部1024は構成変更命令の出力先を加えて、結果タプル141を送信する。これにより、ストリーム処理プロセス110を停止することなく、入出力の関係を動的に変更することが可能となるのである。   According to the above processing, if the time stamp of the result tuple 141 of the result tuple queue 1014 is the time stamp of the configuration change instruction in the configuration change instruction queue 1023, the variable delay calculation execution unit 1024 adds the output destination of the configuration change instruction, and The tuple 141 is transmitted. As a result, the input / output relationship can be dynamically changed without stopping the stream processing process 110.

図14は、工場の生産ラインを監視する、ストリーム処理プロセス110間の、遅延演算を介した連携の一例を示すブロック図である。前記従来例の図6に対して、ストリーム処理プロセス110−1、110−2に、それぞれ遅延演算1401、1402が挿入されている。   FIG. 14 is a block diagram illustrating an example of cooperation between the stream processing processes 110 for monitoring a production line of a factory via delay calculation. In FIG. 6 of the conventional example, delay operations 1401 and 1402 are inserted in stream processing processes 110-1 and 110-2, respectively.

それぞれの遅延演算に設定されている遅延時間3秒、および2秒は、センサ200−1でデータを取得してからセンサ200−2でデータを取得するまでの時間差、および、センサ200−2でデータを取得してからセンサ200−3でデータ取得するまでの時間差に合せて決められている。   The delay time of 3 seconds and 2 seconds set for each delay calculation is the time difference between when the data is acquired by the sensor 200-1 and when the data is acquired by the sensor 200-2, and by the sensor 200-2. It is determined according to the time difference from when the data is obtained to when the data is obtained by the sensor 200-3.

9:05:07にセンサ200−1が生成したタプル633は、ストリーム処理プロセス110−1で分析され、結果タプル644として出力される。このとき、分析結果タプル644のタイムスタンプは、遅延演算によって、9:05:07から3秒後の9:05:10と定まる。同タプル644は、実時間において9:05:07.00から約0.3秒経過した9:05:07.33に、ストリーム処理プロセス110−2に到達する。   The tuple 633 generated by the sensor 200-1 at 9:05:07 is analyzed by the stream processing process 110-1 and output as a result tuple 644. At this time, the time stamp of the analysis result tuple 644 is determined to be 9:05:10 three seconds after 9:05:07 due to the delay operation. The tuple 644 reaches the stream processing process 110-2 at 9: 05: 07.33, which is about 0.3 seconds after 9: 05: 07.00 in real time.

その後、9:05:10.00に、センサ200−2がストリームタプル636を生成した際には、9:05:10のタイムスタンプを含む、分析結果タプル644と、ストリームタプル636の両方が揃っているため、ストリーム処理プロセス110−2は、9:05:10.00の即時に分析を開始することが可能である。従って、この分析結果タプル642は、その約0.3秒後の9:05:10.31に、ストリーム処理プロセス110−3に到達することができる。   Thereafter, at 9: 05: 10.00, when the sensor 200-2 generates the stream tuple 636, both the analysis result tuple 644 including the time stamp of 9:05:10 and the stream tuple 636 are aligned. Therefore, the stream processing process 110-2 can immediately start the analysis at 9: 05: 10.00. Accordingly, this analysis result tuple 642 can reach the stream processing process 110-3 at approximately 9: 05: 10.31, approximately 0.3 seconds later.

また、遅延演算1401の遅延時間を、ストリーム処理プロセス110間のデータ取得の時間差である3秒に合せたことで、同一の製造物c(653)について、ストリーム処理プロセス110−1での分析結果とセンサデータが揃うため、ストリーム処理プロセス110−2では、9:05:10の分析結果タプル642を出力した後は、タプル644を保持しておく必要はなくなる。   In addition, by adjusting the delay time of the delay calculation 1401 to 3 seconds, which is the time difference of data acquisition between the stream processing processes 110, the analysis result of the same product c (653) in the stream processing process 110-1 Since the stream processing process 110-2 outputs the 9:05:10 analysis result tuple 642, the stream processing process 110-2 does not need to hold the tuple 644.

ストリーム処理プロセス110−2の遅延演算1402によって、ストリーム処理プロセス110−3での分析処理においても同様の効果があるため、分析結果タプル643も、ストリームタプル639が生成された9:05:10.00の約0.3秒後である9:05:10.30に、ストリーム処理プロセス110−3の後段のプロセスに到達することができる。   Since the delay calculation 1402 of the stream processing process 110-2 has the same effect in the analysis processing of the stream processing process 110-3, the analysis result tuple 643 also has the stream tuple 639 generated at 9:05:10. At about 9: 05: 10.30, about 0.3 seconds after 00, the downstream process of stream processing process 110-3 can be reached.

このように、本実施例によれば、生産ラインが長くなって同一の物体を検出する時間差が増大した場合でも、分析結果の出力タイミングの遅れが増加することは回避できる。そして、遅延時間を付加した場合でもタプルの時刻順を維持することが可能となって、ストリーム処理の一貫性の保証と、レイテンシの削減を両立させることができるのである。   Thus, according to the present embodiment, even when the production line becomes longer and the time difference for detecting the same object increases, it is possible to avoid an increase in the delay in the output timing of the analysis result. Then, even when a delay time is added, the time order of tuples can be maintained, so that it is possible to ensure both consistency of stream processing and reduction of latency.

図15、図16は、自動車の車両間通信を実現する、ストリーム処理プロセス110間の、遅延演算を介した連携の一例を示すブロック図である。前記従来例の図7に対して、図15、図16では、ストリーム処理プロセス110−1、110−2に、それぞれ遅延演算1501、1502が挿入されている。図15で設定されている遅延時間2秒は、図16では車両間の距離が縮まるため1秒に更新されている。   FIG. 15 and FIG. 16 are block diagrams showing an example of cooperation between the stream processing processes 110 for realizing the inter-vehicle communication of the automobile through delay calculation. 15 and 16, delay operations 1501 and 1502 are inserted into the stream processing processes 110-1 and 110-2, respectively, in contrast to FIG. The delay time of 2 seconds set in FIG. 15 is updated to 1 second in FIG. 16 because the distance between the vehicles is reduced.

ストリーム処理プロセス110−1には、自車の位置・速度タプル720、721、722が、それぞれ9:05:06.00、9:05:07.00、9:05:08.00のタイミングで入力される。また、ストリーム処理プロセス110−2からは、他車の時刻t0、t0、t1における予測位置を示す、予測位置タプル743、744、745が、それぞれ9:05:06.21、9:05:07.24、9:08.22のタイミングで到来する(ストリーム処理プロセス110−2において位置・速度タプルが生成されてから分析し、ストリーム処理プロセス110−1に到達するまで約0.2秒かかる)。また、遅延演算1502によって、それぞれのタイムスタンプは、9:05:08、9:05:09、9:05:10に変更されている。   In the stream processing process 110-1, the position / speed tuples 720, 721, and 722 of the own vehicle are respectively set at timings of 9: 05: 06.00, 9: 05: 07.00, and 9: 05: 08.00. Is entered. From the stream processing process 110-2, predicted position tuples 743, 744, and 745 indicating the predicted positions of the other vehicles at times t0, t0, and t1, respectively, are 9: 05: 06.21 and 9:05:07. .24, 9: 08.22 (it takes about 0.2 seconds until the position / velocity tuple is generated and analyzed in the stream processing process 110-2 and reaches the stream processing process 110-1) . The time stamps are changed to 9:05:08, 9:05:09, and 9:05:10 by the delay operation 1502.

ここで、ストリーム処理プロセス110−1にて、タイムスタンプ9:05:08の位置・速度タプル722が生成された9:05:08.00のタイミングには、同じタイムスタンプ9:05:08を含む、ストリーム処理プロセス110−2からの予測位置タプル743が既に到達している。したがってストリーム処理プロセス110−1では、タイムスタンプ9:05:08の分析処理として両タプルから時刻t1の予測位置を算出し、遅延演算1501によりタイムスタンプを9:05:10にシフトさせて、予測位置タプル742として、ストリーム処理プロセス110−2に対して送付することが可能となる。ここで予測位置を割り出す時刻t1が、遅延後のタイムスタンプ9:05:10を起点として、より未来であるほど、予測値としての価値が高いことになる。   Here, the same time stamp 9:05:08 is set at the timing of 9: 05: 08.00 when the position / velocity tuple 722 of the time stamp 9:05:08 is generated in the stream processing process 110-1. The predicted position tuple 743 from the stream processing process 110-2 has already arrived. Therefore, the stream processing process 110-1 calculates the predicted position at the time t1 from both tuples as the analysis processing of the time stamp 9:05:08, shifts the time stamp to 9:05:10 by the delay operation 1501, and It can be sent as a position tuple 742 to the stream processing process 110-2. Here, the more future the time t1 at which the predicted position is determined from the time stamp 9:05:10 after the delay, the higher the value as the predicted value.

ストリーム処理プロセス110−2側での分析においても同様の効果があるため、図7に示した従来例のようにハングアップを起こさずに、処理を進めることが可能となる。車両300同士が接近した場合は、予測の効果を損なわないように、予測時刻txと、予測位置タプルに付与される遅延後のタイムスタンプの時間差を保つために、遅延時間を短縮する必要がある。   Since the same effect is obtained in the analysis on the stream processing process 110-2 side, the processing can be performed without causing a hang-up as in the conventional example shown in FIG. When the vehicles 300 approach each other, it is necessary to reduce the delay time in order to keep the time difference between the predicted time tx and the time stamp after the delay added to the predicted position tuple so as not to impair the effect of the prediction. .

図16の例では、遅延時間を2秒から1秒に短縮し、タイムスタンプ9:05:09の位置・速度タプル726から、タイムスタンプ9:05:10の予測位置タプル746を生成している。即ち、先に出力した予測位置タプル742と、タイムスタンプが重複することになるが、分析クエリの中で予測値の修正として扱うことができるので、この重複は特に問題にはならない。   In the example of FIG. 16, the delay time is reduced from 2 seconds to 1 second, and a predicted position tuple 746 with a time stamp 9:05:10 is generated from a position / velocity tuple 726 with a time stamp 9:05:09. . That is, although the time stamp overlaps with the previously output predicted position tuple 742, the duplication does not pose a particular problem because it can be handled as a correction of the predicted value in the analysis query.

以上のように、本実施例1によれば、ストリーム処理の再現性を維持しながら、クエリ定義を容易に行うことが可能となって、処理の停止を伴わない動的なクエリ間の接続関係の変更を実現できる。さらに、位置に応じて取得されたセンサデータが利用される時刻を見込んで遅延時間を設定することにより、レイテンシ増加の抑制および相互依存関係を含むクエリを実現することができる。   As described above, according to the first embodiment, the query definition can be easily performed while maintaining the reproducibility of the stream processing, and the connection relation between the dynamic queries without stopping the processing can be achieved. Can be changed. Furthermore, by setting the delay time in anticipation of the time at which the acquired sensor data is used according to the position, it is possible to realize a query including suppression of an increase in latency and interdependency.

図17は、本発明の実施例2を示し、ストリーム処理分散実行システム801のブロック図である。実施例2では、前記実施例1のストリーム処理分散実行管理サーバ1001の機能をストリーム処理サーバ100−1に組み込んだもので、その他の構成は前記実施例1と同様である。   FIG. 17 is a block diagram of the stream processing distributed execution system 801 according to the second embodiment of the present invention. In the second embodiment, the function of the stream processing distributed execution management server 1001 of the first embodiment is incorporated in the stream processing server 100-1, and the other configuration is the same as that of the first embodiment.

ストリーム処理サーバ100−1では、ストリーム処理プロセス110−1に加えて、クエリ分配部1002と、構成変更命令分配部1003と、サーバテーブル1004が稼働する。   In the stream processing server 100-1, a query distribution unit 1002, a configuration change command distribution unit 1003, and a server table 1004 operate in addition to the stream processing process 110-1.

クエリ分配部1002は、前記実施例1と同様に、ホスト計算機130からクエリ定義132を受け付けると内容に応じて他のストリーム処理プロセス110にクエリを分配する。また、構成変更命令分配部1003も前記実施例1と同様に、ホスト計算機130から構成変更命令815を受け付けると、サーバテーブル1004を参照して指定されたストリーム処理サーバ100−1に構成変更命令815を分配する。   The query distribution unit 1002 distributes a query to another stream processing process 110 according to the content upon receiving the query definition 132 from the host computer 130, as in the first embodiment. Also, similarly to the first embodiment, when the configuration change command distribution unit 1003 receives the configuration change command 815 from the host computer 130, the configuration change command distribution unit 815 sends the configuration change command 815 to the specified stream processing server 100-1 with reference to the server table 1004. Distribute.

<まとめ>
以上のように、本実施例1、2では、分散処理において、ストリーム処理の再現性を維持しながら、クエリ定義の容易化と、処理停止を伴わない動的なクエリ間の接続関係の変更と、レイテンシ増加の抑制、および相互依存関係を含むクエリの実現を可能とする。
<Summary>
As described above, in the first and second embodiments, in the distributed processing, it is possible to simplify the query definition while maintaining the reproducibility of the stream processing and to change the connection relationship between the dynamic queries without stopping the processing. , Suppressing latency increase, and realizing queries including interdependencies.

従って、IoTのセンサデータ分析に基づく機器の監視や制御、移動体間の協調処理などのように、エッジ(ストリーム処理サーバ100)間での分析処理の分散実行にも適用可能な、ストリーム処理の一貫性の保証と、低レイテンシ処理を両立する、リアルタイム分析アプリケーションの開発を容易に行うことができる。また、分散処理の最適な構成を実行時に変更可能とするように、クエリの分散実行における位置の透過性を保証し、アプリケーションの開発とSI(System Integration)作業の工程を分離し、アプリケーションの可搬性(または汎用性)を向上させることができる。   Accordingly, stream processing, which can be applied to distributed execution of analysis processing between edges (stream processing servers 100), such as monitoring and control of devices based on IoT sensor data analysis and cooperative processing between moving objects, etc. It is easy to develop a real-time analytics application that ensures both consistency and low-latency processing. Also, in order to make it possible to change the optimal configuration of the distributed processing at the time of execution, the transparency of the position in the distributed execution of the query is guaranteed, the process of the application development and the SI (System Integration) work are separated, and the application Portability (or versatility) can be improved.

以上、本発明の実施例について説明したが、これらは本発明を説明するための例示であり、本発明の適応範囲を例示した形態のみに限定するものではない。また、前述した実施形態のいかなる組み合わせも本発明の実施形態となり得る。   The embodiments of the present invention have been described above. However, these are exemplifications for explaining the present invention, and the application range of the present invention is not limited to only the exemplified form. Also, any combination of the above-described embodiments can be an embodiment of the present invention.

なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に記載したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加、削除、又は置換のいずれもが、単独で、又は組み合わせても適用可能である。   Note that the present invention is not limited to the above-described embodiment, and includes various modifications. For example, the above-described embodiments have been described in detail in order to explain the present invention in an easy-to-understand manner, and are not necessarily limited to those having all the configurations described above. Further, a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of one embodiment can be added to the configuration of another embodiment. In addition, for a part of the configuration of each embodiment, addition, deletion, or replacement of another configuration can be applied alone or in combination.

また、上記の各構成、機能、処理部、及び処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、及び機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。   In addition, each of the above-described configurations, functions, processing units, processing units, and the like may be realized by hardware, for example, by designing a part or all of them using, for example, an integrated circuit. In addition, the above-described configurations, functions, and the like may be implemented by software by a processor interpreting and executing a program that implements each function. Information such as a program, a table, and a file for realizing each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.

また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。   In addition, control lines and information lines are shown as necessary for the description, and do not necessarily indicate all control lines and information lines on a product. In fact, it can be considered that almost all components are connected to each other.

Claims (12)

プロセッサとメモリを有する計算機でタイムスタンプが付与されたタプルを処理するストリームデータの分散処理方法であって、
前記計算機が、入力されたタプルを処理するクエリと、当該クエリが出力するタプルに遅延時間を加算する可変遅延演算と、前記可変遅延演算の出力を前記クエリに再帰的に入力する再帰ループを含むクエリ定義を受け付ける第1のステップと、
前記計算機が、前記タプルの入力先と、前記タプルの出力先と、遅延時間を含む構成変更命令を受け付ける第2のステップと、
前記計算機が、前記再帰ループを解除して前記可変遅延演算の出力を前記構成変更命令の出力先に変更し、前記タプルの入力先を前記構成変更命令の入力先に変更し、前記構成変更命令の遅延時間を前記可変遅延演算に設定する第3のステップと、
前記計算機が、前記入力先からタプルを受け付けて、前記クエリで所定の処理を行ったタプルを前記可変遅延演算に入力し、当該タプルのタイムスタンプに前記遅延時間を加算する第4のステップと、
前記計算機が、前記出力先へ前記遅延時間を加算されたタプルを出力する第5のステップと、
を含むことを特徴とするストリームデータの分散処理方法。
A distributed processing method of stream data for processing a tuple to which a time stamp is added by a computer having a processor and a memory,
The computer includes a query that processes an input tuple, a variable delay operation that adds a delay time to a tuple output by the query, and a recursive loop that recursively inputs an output of the variable delay operation to the query. A first step of accepting a query definition;
A second step in which the computer receives an input destination of the tuple, an output destination of the tuple, and a configuration change instruction including a delay time;
The computer cancels the recursive loop, changes the output of the variable delay operation to the output destination of the configuration change instruction, changes the input destination of the tuple to the input destination of the configuration change instruction, and changes the configuration change instruction. A third step of setting the delay time of
A fourth step in which the computer receives the tuple from the input destination, inputs the tuple obtained by performing a predetermined process in the query to the variable delay operation, and adds the delay time to a time stamp of the tuple;
A fifth step in which the calculator outputs a tuple to which the delay time has been added to the output destination;
A distributed processing method for stream data.
請求項1に記載のストリームデータの分散処理方法であって、
前記第2のステップは、
前記出力先と前記遅延時間の関係を出力先別遅延時間管理情報に格納し、
前記第3のステップは、
前記出力先毎に遅延時間を格納した出力先別遅延時間管理情報から出力先に応じた遅延時間を前記タイムスタンプに加算することを特徴とするストリームデータの分散処理方法。
The stream data distributed processing method according to claim 1, wherein
The second step is
The relationship between the output destination and the delay time is stored in output destination-specific delay time management information,
The third step is
A stream data distribution processing method, wherein a delay time corresponding to an output destination is added to the time stamp from output destination-specific delay time management information in which a delay time is stored for each output destination.
請求項1に記載のストリームデータの分散処理方法であって、
前記構成変更命令は、当該構成変更命令の実行開始時刻を含み、
前記第2のステップは、
前記構成変更命令を、構成変更命令キューに格納し、
前記第3のステップは、
入力された前記タプルのタイムスタンプが前記構成変更命令キューの先頭の構成変更命令の前記実行開始時刻を経過していれば、前記入力先と前記出力先及び前記遅延時間の設定を実施することを特徴とするストリームデータの分散処理方法。
The stream data distributed processing method according to claim 1, wherein
The configuration change instruction includes an execution start time of the configuration change instruction,
The second step is
Storing the configuration change instruction in a configuration change instruction queue;
The third step is
If the input timestamp of the tuple has passed the execution start time of the configuration change instruction at the head of the configuration change instruction queue, setting the input destination, the output destination, and the delay time is performed. Characterized stream data distribution processing method.
請求項1に記載のストリームデータの分散処理方法であって、
前記クエリ定義は、前記可変遅延演算の遅延時間を変数で定義したことを特徴とするストリームデータの分散処理方法。
The stream data distributed processing method according to claim 1, wherein
The distributed query processing method of stream data, wherein the query definition defines a delay time of the variable delay operation as a variable.
プロセッサとメモリを有する計算機と、
複数の前記計算機を管理する管理計算機と、
タイムスタンプが付与されたタプルを前記複数の計算機へ供給するデータソースと、を含むストリームデータの分散処理システムであって、
前記管理計算機は、
入力されたタプルを処理するクエリと、当該クエリが出力するタプルに遅延時間を加算する可変遅延演算と、前記可変遅延演算の出力を前記クエリに再帰的に入力する再帰ループを含むクエリ定義を前記複数の計算機へ分配するクエリ分配部と、
前記タプルの入力先と、前記タプルの出力先と、遅延時間を含む構成変更命令を前記複数の計算機へ分配する構成変更命令分配部と、を有し、
前記計算機は、
前記クエリ定義を受け付けてから、前記構成変更命令を受け付けると、前記再帰ループを解除して前記可変遅延演算の出力を前記構成変更命令の出力先に変更し、前記タプルの入力先を前記構成変更命令の入力先に変更するクエリ処理部と、
前記構成変更命令の遅延時間を加算する可変遅延演算実行部と、を有し、
前記クエリ処理部が、前記入力先からタプルを受け付けて、前記クエリで所定の処理を行ったタプルを前記可変遅延演算に入力し、
前記可変遅延演算実行部が、前記タプルのタイムスタンプに前記遅延時間を加算して、前記出力先へ出力することを特徴とするストリームデータの分散処理システム。
A computer having a processor and a memory;
A management computer that manages a plurality of the computers,
A data source that supplies a tuple with a time stamp to the plurality of computers, and a distributed processing system for stream data,
The management computer,
A query that includes a query that processes an input tuple, a variable delay operation that adds a delay time to a tuple output by the query, and a recursive loop that recursively inputs the output of the variable delay operation to the query. A query distribution unit for distributing to a plurality of computers;
An input destination of the tuple, an output destination of the tuple, and a configuration change instruction distribution unit that distributes a configuration change instruction including a delay time to the plurality of computers,
The calculator is:
After accepting the query definition, accepting the configuration change instruction, canceling the recursive loop, changing the output of the variable delay operation to the output destination of the configuration change instruction, and changing the input destination of the tuple to the configuration change A query processing unit for changing to an instruction input destination,
A variable delay calculation execution unit that adds the delay time of the configuration change instruction,
The query processing unit receives a tuple from the input destination, inputs a tuple that has been subjected to predetermined processing in the query to the variable delay operation,
The stream data distributed processing system, wherein the variable delay calculation execution unit adds the delay time to a time stamp of the tuple and outputs the result to the output destination.
請求項5に記載のストリームデータの分散処理システムであって、
前記計算機は、
前記出力先と前記遅延時間の関係を出力先別遅延時間管理情報に格納し、
前記可変遅延演算実行部は、
前記出力先毎に遅延時間を格納した出力先別遅延時間管理情報から出力先に応じた遅延時間を前記タイムスタンプに加算することを特徴とするストリームデータの分散処理システム。
The stream data distributed processing system according to claim 5, wherein
The calculator is:
The relationship between the output destination and the delay time is stored in output destination-specific delay time management information,
The variable delay calculation execution unit,
A distributed processing system for stream data, wherein a delay time corresponding to an output destination is added to the time stamp from delay time management information for each output destination in which a delay time is stored for each output destination.
請求項5に記載のストリームデータの分散処理システムであって、
前記構成変更命令は、当該構成変更命令の実行開始時刻を含み、
前記計算機は、
前記構成変更命令を、構成変更命令キューに格納し、
前記クエリ処理部は、
入力された前記タプルのタイムスタンプが前記構成変更命令キューの先頭の構成変更命令の実行開始時刻を経過していれば、前記入力先と前記出力先及び前記遅延時間の設定を実施することを特徴とするストリームデータの分散処理システム。
The stream data distributed processing system according to claim 5, wherein
The configuration change instruction includes an execution start time of the configuration change instruction,
The calculator is:
Storing the configuration change instruction in a configuration change instruction queue;
The query processing unit,
If the input time stamp of the tuple has passed the execution start time of the configuration change instruction at the head of the configuration change instruction queue, the input destination, the output destination, and the delay time are set. Stream data distributed processing system.
請求項5に記載のストリームデータの分散処理システムであって、
前記クエリ定義は、前記可変遅延演算の遅延時間を変数で定義したことを特徴とするストリームデータの分散処理システム。
The stream data distributed processing system according to claim 5, wherein
The distributed query processing system for stream data, wherein the query definition defines a delay time of the variable delay operation as a variable.
プロセッサとメモリを有する計算機を制御するプログラムを格納した記憶媒体であって、
入力されたタプルを処理するクエリと、当該クエリが出力するタプルに遅延時間を加算する可変遅延演算と、前記可変遅延演算の出力を前記クエリに再帰的に入力する再帰ループを含むクエリ定義を受け付ける第1のステップと、
前記タプルの入力先と、前記タプルの出力先と、遅延時間を含む構成変更命令を受け付ける第2のステップと、
前記再帰ループを解除して前記可変遅延演算の出力を前記構成変更命令の出力先に変更し、前記タプルの入力先を前記構成変更命令の入力先に変更し、前記構成変更命令の遅延時間を前記可変遅延演算に設定する第3のステップと、
前記入力先からタプルを受け付けて、前記クエリで所定の処理を行ったタプルを前記可変遅延演算に入力し、当該タプルのタイムスタンプに前記遅延時間を加算する第4のステップと、
前記出力先へ前記遅延時間を加算されたタプルを出力する第5のステップと、
を前記計算機に実行させるプログラムを格納した非一時的な計算機読み取り可能な記憶媒体。
A storage medium storing a program for controlling a computer having a processor and a memory,
A query that includes a query that processes the input tuple, a variable delay operation that adds a delay time to a tuple output by the query, and a recursive loop that recursively inputs the output of the variable delay operation to the query A first step;
An input destination of the tuple, an output destination of the tuple, and a second step of receiving a configuration change instruction including a delay time;
Release the recursive loop, change the output of the variable delay operation to the output destination of the configuration change instruction, change the input destination of the tuple to the input destination of the configuration change instruction, and change the delay time of the configuration change instruction. A third step of setting the variable delay operation;
A fourth step of receiving a tuple from the input destination, inputting a tuple obtained by performing a predetermined process in the query to the variable delay operation, and adding the delay time to a time stamp of the tuple;
A fifth step of outputting a tuple to which the delay time has been added to the output destination;
A non-temporary computer-readable storage medium storing a program for causing the computer to execute the program.
請求項9に記載の記憶媒体であって、
前記第2のステップは、
前記出力先と前記遅延時間の関係を出力先別遅延時間管理情報に格納し、
前記第3のステップは、
前記出力先毎に遅延時間を格納した出力先別遅延時間管理情報から出力先に応じた遅延時間を前記タイムスタンプに加算することを特徴とする記憶媒体。
The storage medium according to claim 9, wherein
The second step is
The relationship between the output destination and the delay time is stored in output destination-specific delay time management information,
The third step is
A storage medium characterized by adding a delay time corresponding to an output destination to the time stamp from output destination-specific delay time management information storing a delay time for each output destination.
請求項9に記載の記憶媒体であって、
前記構成変更命令は、当該構成変更命令の実行開始時刻を含み、
前記第2のステップは、
前記構成変更命令を、構成変更命令キューに格納し、
前記第3のステップは、
入力された前記タプルのタイムスタンプが前記構成変更命令キューの先頭の構成変更命令の実行開始時刻を経過していれば、前記入力先と前記出力先及び前記遅延時間の設定を実施することを特徴とする記憶媒体。
The storage medium according to claim 9, wherein
The configuration change instruction includes an execution start time of the configuration change instruction,
The second step is
Storing the configuration change instruction in a configuration change instruction queue;
The third step is
If the input time stamp of the tuple has passed the execution start time of the configuration change instruction at the head of the configuration change instruction queue, the input destination, the output destination, and the delay time are set. Storage medium.
請求項9に記載の記憶媒体であって、
前記クエリ定義は、前記可変遅延演算の遅延時間を変数で定義したことを特徴とする記憶媒体。
The storage medium according to claim 9, wherein
The storage medium, wherein the query definition defines a delay time of the variable delay operation by using a variable.
JP2018550905A 2016-11-16 2016-11-16 Stream data distribution processing method, stream data distribution processing system, and storage medium Active JP6674039B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/083899 WO2018092199A1 (en) 2016-11-16 2016-11-16 Stream data distributed processing method, stream data distributed processing system, and storage medium

Publications (2)

Publication Number Publication Date
JPWO2018092199A1 JPWO2018092199A1 (en) 2019-06-24
JP6674039B2 true JP6674039B2 (en) 2020-04-01

Family

ID=62146380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018550905A Active JP6674039B2 (en) 2016-11-16 2016-11-16 Stream data distribution processing method, stream data distribution processing system, and storage medium

Country Status (2)

Country Link
JP (1) JP6674039B2 (en)
WO (1) WO2018092199A1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291006B2 (en) * 2008-05-30 2012-10-16 International Business Machines Corporation Method for generating a distributed stream processing application
JP5465413B2 (en) * 2008-10-29 2014-04-09 株式会社日立製作所 Stream data processing method and system

Also Published As

Publication number Publication date
JPWO2018092199A1 (en) 2019-06-24
WO2018092199A1 (en) 2018-05-24

Similar Documents

Publication Publication Date Title
US11119821B2 (en) FPGA acceleration for serverless computing
JP6452629B2 (en) Parallel execution of continuous event processing (CEP) queries
JP6793900B2 (en) Data stream processing language for analyzing software with embedded instrumentation
US20200186422A1 (en) Using a container orchestration service for dynamic routing
WO2016062087A1 (en) Streaming application update method, master node, and stream computing system
JP6083687B2 (en) Distributed calculation method, program, host computer, and distributed calculation system (distributed parallel calculation using accelerator device)
US20130159477A1 (en) Method for configuring a distributed avionics control system
CN110399271B (en) Log processing device, method, electronic device, and computer-readable storage medium
US20120254881A1 (en) Parallel computer system and program
CN109117252B (en) Method and system for task processing based on container and container cluster management system
JP6369170B2 (en) Execution time estimation apparatus and method
US20100125360A1 (en) Methods for performing data management for a recipe-and-component control module
US10498817B1 (en) Performance tuning in distributed computing systems
CN108989390B (en) User request forwarding method and device, reverse proxy server and computer readable storage medium
US9104486B2 (en) Apparatuses, systems, and methods for distributed workload serialization
US10868881B1 (en) Loading web resources using remote resource pushing
US20120110581A1 (en) Task cancellation grace periods
JP2016504696A (en) Distributed computing architecture
KR102247371B1 (en) Application function recovery through application action request analysis
Bédard et al. Message flow analysis with complex causal links for distributed ROS 2 systems
Mershad et al. A study of the performance of a cloud datacenter server
JP6326062B2 (en) Transparent routing of job submissions between different environments
JP6674039B2 (en) Stream data distribution processing method, stream data distribution processing system, and storage medium
US11106395B2 (en) Application execution apparatus and application execution method
US10621163B2 (en) Tracking and reusing function results

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190212

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200305

R150 Certificate of patent or registration of utility model

Ref document number: 6674039

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150