JP2014225111A - Data processing device, method, and program - Google Patents

Data processing device, method, and program Download PDF

Info

Publication number
JP2014225111A
JP2014225111A JP2013103735A JP2013103735A JP2014225111A JP 2014225111 A JP2014225111 A JP 2014225111A JP 2013103735 A JP2013103735 A JP 2013103735A JP 2013103735 A JP2013103735 A JP 2013103735A JP 2014225111 A JP2014225111 A JP 2014225111A
Authority
JP
Japan
Prior art keywords
buffer device
data processing
congestion
buffer
data
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.)
Pending
Application number
JP2013103735A
Other languages
Japanese (ja)
Inventor
嘉典 松尾
Yoshinori Matsuo
嘉典 松尾
浩樹 赤間
Hiroki Akama
浩樹 赤間
尚也 小谷
Naoya Kotani
尚也 小谷
聖司 松村
Seiji Matsumura
聖司 松村
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2013103735A priority Critical patent/JP2014225111A/en
Publication of JP2014225111A publication Critical patent/JP2014225111A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent all data processing programs from automatically concentrating on a buffer device in which a congestion state occurs.SOLUTION: When congestion occurs in a buffer device, a data processing device inhibits all data processing programs from concentrating on the buffer device in which the congestion occurs by mixing data processing programs that operates according to a rule to preferentially select the buffer device in which the congestion occurs and data processing programs that operates according to a rule to select buffer devices in the same order as before even when congestion occurs.

Description

本発明は、データ処理装置及び方法及びプログラムに係り、特に、ストリーム処理システムにおけるバッファ装置に蓄積されたデータを自律的に処理するデータ処理を最適化するためのデータ処理装置及び方法及びプログラムに関する。   The present invention relates to a data processing apparatus, method, and program, and more particularly, to a data processing apparatus, method, and program for optimizing data processing for autonomously processing data stored in a buffer device in a stream processing system.

複数のバッファ装置に蓄積されたストリームデータを、複数のデータ処理プログラムが並列に処理するシステムが存在する。   There is a system in which a plurality of data processing programs process stream data stored in a plurality of buffer devices in parallel.

それぞれのデータ処理プログラムは、並列にデータ処理を行うために、どのバッファ装置からデータを取得するかを決定する必要がある。データ処理プログラムが、どのバッファ装置を選択してデータを取得、処理するかを決定するルール(以下、「PULL戦略」と記す)には、全てのバッファ装置を順番に選択を行う方法や、ランダムにバッファ装置を選択する方法が考えられる。   Each data processing program needs to determine from which buffer device data is acquired in order to perform data processing in parallel. The rules for determining which buffer device to select to acquire and process data (hereinafter referred to as “PULL strategy”) are used by the data processing program to select all buffer devices in order, A method of selecting a buffer device can be considered.

バッファ装置に蓄積されるデータ量に対して、それを処理するデータ処理プログラムの処理能力が十分な場合には、これら単純なPULL戦略も有効に動作し、並列処理を問題なく実行できる。   If the processing capacity of the data processing program that processes the data amount stored in the buffer device is sufficient, these simple pull strategies also operate effectively, and parallel processing can be executed without any problems.

また、一部のバッファ装置へのデータ入力が多く、輻輳した状態が発生している場合には、自律分散されたデータ処理装置は、バッファ装置の破綻を防ぐために輻輳したバッファ装置に蓄積されたデータを集中的に処理して輻輳を解消する必要がある。データ処理装置はシステム内の状態を監視して、輻輳が発生している場合には、該当のバッファ装置を集中的に処理するよう内部状態を切り替えることでこれを実現している(例えば、特許文献1参照)。   In addition, when there is a lot of data input to some buffer devices and a congested state occurs, the autonomously distributed data processing device is stored in the congested buffer device to prevent the buffer device from failing. Data needs to be processed intensively to eliminate congestion. The data processing device monitors the state in the system, and when congestion occurs, this is realized by switching the internal state so that the corresponding buffer device is processed intensively (for example, patents). Reference 1).

図1は、従来技術におけるデータ処理プログラムの動作のフローチャートである。   FIG. 1 is a flowchart of the operation of a data processing program in the prior art.

データ処理プログラムは、輻輳が発生しているか否かを判定し(ステップ10)、輻輳が発生していない場合(図2)には、規定の手順により取得先バッファ装置を決定し(ステップ11)、バッファ装置からデータを取得して(ステップ13)、データ処理を行う(ステップ14)。輻輳が発生している場合(図3)には、輻輳したバッファ装置を取得先バッファ装置に決定し(ステップ12)、当該バッファ装置からデータを取得し(ステップ13)、データ処理を行う(ステップ14)。   The data processing program determines whether or not congestion has occurred (step 10). If no congestion has occurred (FIG. 2), the acquisition buffer device is determined by a prescribed procedure (step 11). Then, data is acquired from the buffer device (step 13), and data processing is performed (step 14). When congestion occurs (FIG. 3), the congested buffer device is determined as the acquisition buffer device (step 12), data is acquired from the buffer device (step 13), and data processing is performed (step 13). 14).

図3に示すように、バッファ装置Aで輻輳が発生している場合、バッファ装置Aは、データ処理装置に輻輳を通知し、データ処理装置では輻輳をできるだけ早く解消するためにバッファ装置Aのデータを優先的に取得、処理しようとする。このときPULL戦略次第では、バッファ装置Aの輻輳が解消するまでバッファ装置Bの処理は行われない場合がある。   As shown in FIG. 3, when congestion occurs in the buffer device A, the buffer device A notifies the data processing device of the congestion, and the data processing device uses the data in the buffer device A to eliminate the congestion as soon as possible. Is to be obtained and processed with priority. At this time, depending on the PULL strategy, the processing of the buffer device B may not be performed until the congestion of the buffer device A is resolved.

このようなPULL戦略としてはさまざまなものが考えられるが、その一例を以下に示す。   Various PULL strategies can be considered, and an example is shown below.

・PULL_RR:ラウンドロビンのPULL戦略であり、当該戦略を指定した場合は、複数あるバッファ装置から順にデータ取得を試みる。   PULL_RR: Round-robin PULL strategy. When this strategy is specified, data acquisition is attempted in order from a plurality of buffer devices.

・PULL_RAND:当該戦略を指定した場合は、複数あるバッファ装置を選択する際に、疑似乱数Rを生成し、疑似乱数Rをバッファ装置の数nで割った余り(R%n等)に基づいてどのバッファ装置からデータ取得を試みるかを決定する。   -PULL_RAND: When this strategy is specified, when selecting a plurality of buffer devices, a pseudo random number R is generated, and the pseudo random number R is divided by the number n of buffer devices (R% n, etc.). Determine from which buffer device to try to get data.

・PULL_RR_JAM:輻輳が発生していない場合はPULL_RRと同様の動作をするが、輻輳が発生した場合は輻輳しているバッファ装置から優先してデータを試みるPULL戦略である。   PULL_RR_JAM: This is a PULL strategy that performs the same operation as PULL_RR when congestion does not occur, but tries data preferentially from the congested buffer device when congestion occurs.

・PULL_BIAS_RR:各バッファ装置を指定した割合で取得するラウンドロビンのPULL戦略であり、別途、どのバッファ装置をどの割合で取得するかを設定する。   PULL_BIAS_RR: A round-robin PULL strategy that acquires each buffer device at a specified rate, and separately sets which buffer device is acquired at which rate.

PULL戦略の選択は、ストリーム処理のさまざまな要件に応じて選択する必要がある。要件の例として、データ処理完了までのレイテンシがあげられる。レイテンシをできるだけ低く抑えたいようなケースでは、データ処理プログラムが不足することのないように十分な数を確保することが最も重要である。   The choice of PULL strategy should be chosen according to the various requirements of stream processing. An example of the requirement is latency until data processing is completed. In the case where the latency is to be kept as low as possible, it is most important to secure a sufficient number so that the data processing program does not run out.

しかし、データ処理プログラム自体は不足していなくても、バッファ装置の数が大量に存在する時は、データ処理プログラムがバッファ装置を選択(巡回)するタイミングが遅れレイテンシが増大するなどの影響を与える。   However, even if the data processing program itself is not insufficient, when there are a large number of buffer devices, the timing at which the data processing program selects (circulates) the buffer device is delayed, and latency is increased. .

バッファ装置に追記されると確実に一定期間内に処理をする必要がある場合に、PULL_RANDのようなPULL戦略を使用した場合、特定のバッファ装置が確率的にいつまでも選択されない危険性がある。また輻輳に対応したPULL_RR_JAMのようなPULL戦略を選択した場合には、別のバッファ装置が輻輳している場合に当該バッファ装置が選択されない危険性がある。   When it is necessary to perform processing within a certain period when it is added to the buffer device, there is a risk that a specific buffer device will not be selected indefinitely if a PULL strategy such as PULL_RAND is used. When a PULL strategy such as PULL_RR_JAM corresponding to congestion is selected, there is a risk that the buffer device is not selected when another buffer device is congested.

このような場合には、確実にすべてのバッファ装置を巡回するPULL_RRのようなPULL戦略のほうが適している。   In such a case, a PULL strategy such as PULL_RR that reliably cycles through all buffer devices is more suitable.

また別のケースとして、普段は入力が少ないが、定期的、不定期などで一時的に大量のデータが到達するようなバッファ装置が存在して、このバッファ装置は優先的に処理をする必要があるといった要件がある。   As another case, there is a buffer device that usually receives a small amount of data, but a large amount of data arrives at regular or irregular intervals, and this buffer device must be preferentially processed. There is such a requirement.

この場合、各バッファ装置に対して、一定の割合でデータ取得を試みるPULL_RANDやPULL_RRのようなPULL戦略では、大量データが到達したバッファ装置のデータを処理しきるまでに時間がかかってしまう危険性がある。   In this case, with the PULL strategy such as PULL_RAND or PULL_RR that tries to acquire data at a certain rate for each buffer device, there is a risk that it will take time to process the data of the buffer device that a large amount of data has reached. is there.

このような場合には、PULL_RR_JAMのように輻輳に対応したPULL戦略を使用すると、大量にデータが追記されたバッファ装置を効率的に選択し、輻輳の解消までの時間を短くすることが可能である。   In such cases, using a PULL strategy that supports congestion, such as PULL_RR_JAM, can efficiently select a buffer device with a large amount of additional data, and shorten the time until congestion is eliminated. is there.

逆のケースとして、常に入力されているバッファ装置のデータの処理は性能を維持する必要があるが、普段は入力が少なくて、定期的、不定期などで一時的に大量のデータが到達するようなバッファ装置が存在して、このバッファ装置はベストエフォートで処理を行うというケースも存在する。   In the opposite case, it is necessary to maintain the performance of the buffer device data that is always input, but usually there are few inputs, so that a large amount of data arrives temporarily at regular or irregular intervals. In some cases, there is a buffer device that performs processing on a best effort basis.

このような場合は、PULL_RR_JAMのように輻輳に対応したPULL戦略のみを使用すると、データ処理プログラムが輻輳したバッファ装置の処理への対応に占有され、常に入力されているバッファ装置が選択されず、データ処理が遅れてしまう危険性がある。
このような場合には、すべてのバッファ装置を選択対象とするPULL_RRやPULL_RANDのようなPULL戦略のほうが適している。
In such a case, if only the PULL strategy corresponding to congestion is used, such as PULL_RR_JAM, the data processing program is occupied by the response to the processing of the congested buffer device, and the buffer device that is always input is not selected, There is a risk that data processing will be delayed.
In such a case, a PULL strategy such as PULL_RR or PULL_RAND that selects all buffer devices is more suitable.

上述のように、一つのPULL戦略のみでデータ処理を実施しようとした場合には、状況によって要件が満たせなくなることがわかる。また、複数の入力特性や処理までのレイテンシの要件が混在するシステムでは、常に要件を満たせないことがわかる。   As described above, it can be understood that the requirement cannot be satisfied depending on the situation when data processing is performed with only one PULL strategy. Further, it can be seen that a system in which a plurality of input characteristics and latency requirements up to processing are mixed cannot always satisfy the requirements.

特許第4764300号公報Japanese Patent No. 4764300

しかしながら、上記の従来技術においては、各データ処理プログラムが自律分散しているため、各データ処理プログラムが輻輳したバッファ装置に集中する。その結果、輻輳していないバッファ装置の処理を実施するデータ処理プログラムが大幅に減少して処理が遅れるという最適化が過剰な状態が発生する。   However, in the above prior art, since each data processing program is autonomously distributed, each data processing program concentrates on a congested buffer device. As a result, an excessively optimized state occurs in which the number of data processing programs that execute processing of the buffer device that is not congested is greatly reduced and processing is delayed.

図4に沿って従来の課題を説明する。   A conventional problem will be described with reference to FIG.

データ入力の集中(輻輳)が発生すると、バッファ装置Aは、バッファ溢れを防ぐために、データ入力の集中をデータ処理装置に対して通知する(図4(a))。   When data input concentration (congestion) occurs, the buffer device A notifies the data processing device of the data input concentration in order to prevent buffer overflow (FIG. 4A).

通知を受けたデータ処理装置のデータ処理プログラムがデータ入力の集中したバッファ装置から優先的にデータを取得してデータ処理を実行する(図4(b))。   Upon receiving the notification, the data processing program of the data processing device preferentially acquires data from the buffer device where data input is concentrated and executes the data processing (FIG. 4B).

上記のような輻輳時の対応は、輻輳を短時間で解消するために必要な機能であるが、過度にデータ処理プログラムからのアクセスが集中してしまい、データ入力の集中したバッファ装置以外のバッファ装置のデータが処理できないためレイテンシが上昇する。   The above-mentioned response to congestion is a function necessary for eliminating congestion in a short time. However, accesses from data processing programs are excessively concentrated, and buffers other than the buffer device where data input is concentrated Latency increases because device data cannot be processed.

本発明は、上記の点に鑑みなされたもので、複数のバッファ装置に蓄積されたストリームデータを複数の自律分散したデータ処理プログラムによって並列に処理するシステムにおいて、輻輳状態が発生した時に、自律的に全てのデータ処理プログラムが輻輳したバッファ装置に集中してしまうのを防ぐことが可能なデータ処理装置及び方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above points, and in a system that processes stream data stored in a plurality of buffer devices in parallel by a plurality of autonomously distributed data processing programs, when a congestion state occurs, the present invention Another object of the present invention is to provide a data processing apparatus, method and program capable of preventing all data processing programs from concentrating on a congested buffer device.

上記の課題を解決するため、本発明の一態様によれば、ストリーム処理システムにおいて、データソースからの入力データを一時的に保持する複数のバッファ装置に蓄積されたデータを自律的に処理する複数のデータ処理プログラムを有するデータ処理装置であって、
前記バッファ装置に輻輳が発生すると、輻輳が発生しているバッファ装置を優先的に選択するルールで動作するデータ処理プログラムと、輻輳が発生しても、該輻輳が発生する前と同じ順序でバッファ装置の選択を行うルールで動作するデータ処理プログラムの両方を制御する手段を有するデータ処理装置が提供される。
In order to solve the above problem, according to one aspect of the present invention, in a stream processing system, a plurality of autonomously processing data accumulated in a plurality of buffer devices that temporarily hold input data from a data source A data processing apparatus having the data processing program of
When congestion occurs in the buffer device, a data processing program that operates according to a rule that preferentially selects a buffer device in which congestion has occurred, and even if congestion occurs, the buffer is processed in the same order as before the congestion occurs There is provided a data processing apparatus having means for controlling both of data processing programs that operate according to a rule for selecting an apparatus.

上記のように、本発明は、自律分散したデータ処理プログラムに対して、状態管理情報を保持し、かつ、予めバッファ装置の輻輳状態に対応する条件を設定しておく。この条件の設定によって、バッファ装置における輻輳状態に対して、輻輳したバッファ装置に集中するデータ処理プログラムだけでなく、輻輳状態が発生してもバッファ装置に集中しないデータ処理プログラムを混在させ、輻輳していないバッファ装置の処理が行われなくなるのを防ぐことで、輻輳状態が発生した時に、自律的に全てのデータ処理プログラムが輻輳したバッファ装置に集中してしまうのを防ぐことが可能となる。   As described above, the present invention retains state management information and sets a condition corresponding to the congestion state of the buffer device in advance for the autonomously distributed data processing program. By setting this condition, not only the data processing program that concentrates on the congested buffer device but also the data processing program that does not concentrate on the buffer device even if a congested state occurs is mixed with the congested state in the buffer device. It is possible to prevent all data processing programs from autonomously concentrating on the congested buffer device when a congested state occurs by preventing the processing of the buffer device that has not been performed.

従来技術のデータ処理プログラムの動作のフローチャートである。It is a flowchart of operation | movement of the data processing program of a prior art. 従来技術における輻輳が発生していない状態を示す図である。It is a figure which shows the state in which the congestion in the prior art has not generate | occur | produced. 従来技術における輻輳が発生した状態を示す図である。It is a figure which shows the state which congestion generate | occur | produced in a prior art. 従来技術の課題を説明するための図である。It is a figure for demonstrating the subject of a prior art. 本発明の前提とするシステム構成例である。It is a system configuration example on the premise of the present invention. 本発明の第1の実施の形態におけるシステム構成図である。It is a system configuration figure in a 1st embodiment of the present invention. 本発明の第1の実施の形態におけるバッファ装置におけるデータ受信とデータ処理装置への輻輳状態の通知処理のフローチャートである。It is a flowchart of the data reception in the buffer apparatus in the 1st Embodiment of this invention, and the notification process of the congestion state to a data processor. 本発明の第1の実施の形態におけるデータ処理でのデータ処理全体のフローチャートである。It is a flowchart of the whole data processing in the data processing in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ処理装置でのデータ処理のフローチャートである。It is a flowchart of the data processing in the data processor in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ処理装置でのバッファ装置選択のフローチャートである。It is a flowchart of the buffer apparatus selection in the data processor in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ処理装置及びバッファ装置でのデータ取得処理のフローチャートである。It is a flowchart of the data acquisition process in the data processor and buffer apparatus in the 1st Embodiment of this invention. 本発明の第2の実施の形態におけるシステム構成図である。It is a system block diagram in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるバッファ装置におけるデータ受信とデータ処理装置への輻輳状態の通知処理のフローチャートである。It is a flowchart of the data reception in the buffer apparatus in the 2nd Embodiment of this invention, and the notification process of the congestion state to a data processor. 本発明の第2の実施の形態におけるデータ処理装置でのデータ処理全体のデータ処理のフローチャートである。It is a flowchart of the data processing of the whole data processing in the data processing apparatus in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるデータ処理装置でのデータ処理のフローチャートである。It is a flowchart of the data processing in the data processor in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるデータ処理装置でのバッファ装置選択のフローチャートである。It is a flowchart of the buffer apparatus selection in the data processor in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるデータ処理装置でのデータ取得処理のフローチャートである。It is a flowchart of the data acquisition process in the data processor in the 2nd Embodiment of this invention.

以下、図面と共に本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

本発明の実施の形態を説明する前に、本発明の前提とするシステムについて説明する。   Before describing the embodiment of the present invention, a system on which the present invention is based will be described.

図5は、本発明の前提とするシステム構成例である。   FIG. 5 is a system configuration example on the premise of the present invention.

本発明は、PULL型のストリーム分散処理システムであり、データソース20からの入力データを一時的に保持する部分(バッファ装置10)とデータ処理装置100が分離されていてかつ、バッファ装置10、データ処理装置100が複数のハードウェア上に存在する。   The present invention is a PULL-type stream distributed processing system in which a portion (buffer device 10) that temporarily holds input data from a data source 20 and a data processing device 100 are separated, and the buffer device 10, data The processing apparatus 100 exists on a plurality of hardware.

また、一つのデータ処理装置100のハードウェア上には、複数のデータ処理プログラムがプロセスまたはスレッドの形態で存在する(以下、プロセスまたはスレッドの形態で存在するデータ処理装置のプログラムを「データ処理プログラム」と呼ぶ)。当該データ処理プログラムは、バッファ装置を一定の順序(PULL戦略)で自律的にポーリングして、データが保持されていれば、これを取得して処理を行う。   In addition, a plurality of data processing programs exist in the form of processes or threads on the hardware of one data processing apparatus 100 (hereinafter, the data processing program existing in the form of a process or thread is referred to as a “data processing program”). "). The data processing program autonomously polls the buffer device in a certain order (PULL strategy), and if data is held, acquires it and performs processing.

データソース20からのデータ入力レートが一定とは限らないため、データ入力が輻輳した場合は、輻輳している旨をシステム内で共有することで、データ処理プログラムは、輻輳したバッファ装置のデータ処理を優先して行う。   Since the data input rate from the data source 20 is not always constant, when the data input is congested, the data processing program can share the fact that the data is congested in the system so that the data processing program of the congested buffer device performs data processing. Is given priority.

本発明は、上記の処理を行うことにより、PULL型のストリーム処理システムにおいて、複数のデータソースが処理されるまでのレイテンシを悪化させることなく処理する。   According to the present invention, the above processing is performed in the PULL-type stream processing system without deteriorating the latency until a plurality of data sources are processed.

[第1の実施の形態]
本実施の形態では、データ処理装置内のデータ処理プログラムが、選択したPULL戦略に基づいて処理の度にバッファ装置の選択を行う。本実施の形態では、PULL戦略は、データ処理装置内のデータ処理プログラムの起動時に決定される。
[First embodiment]
In the present embodiment, the data processing program in the data processing device selects a buffer device for each processing based on the selected PULL strategy. In the present embodiment, the PULL strategy is determined when the data processing program in the data processing apparatus is activated.

図6は、本発明の第1の実施の形態におけるシステム構成を示す。   FIG. 6 shows a system configuration in the first embodiment of the present invention.

同図に示すシステムは、バッファ装置10A、10B、データソース20、データ処理装置100、100を有する。 The system shown in the figure includes buffer devices 10A and 10B, a data source 20, and data processing devices 100 1 and 100 2 .

各バッファ装置10は、蓄積部11、閾値情報12、通信部13を具備し、各データ処理装置100は、通信部110、PULL戦略構成設定部120、バッファ装置選択部130、状態管理部140、データ処理プログラム150を有する。バッファ装置選択部130は、内部に保持するPULL戦略に基づいてバッファ装置10を選択する。   Each buffer device 10 includes a storage unit 11, threshold information 12, and a communication unit 13, and each data processing device 100 includes a communication unit 110, a PULL strategy configuration setting unit 120, a buffer device selection unit 130, a state management unit 140, A data processing program 150 is included. The buffer device selection unit 130 selects the buffer device 10 based on the PULL strategy held inside.

状態管理部140には、バッファ装置のリスト(バッファ装置識別情報)と輻輳バッファ装置のリスト(輻輳バッファ装置識別情報)を有する。   The state management unit 140 has a list of buffer devices (buffer device identification information) and a list of congestion buffer devices (congestion buffer device identification information).

また、バッファ装置10の前段には、データソース20で発生したデータをバッファ装置10に追記するプログラム(以下、追記クライアント21)が存在することを前提とする。   Further, it is assumed that a program (hereinafter referred to as an additional recording client 21) for additionally writing data generated in the data source 20 to the buffer device 10 exists in the preceding stage of the buffer device 10.

各データ処理プログラム150は、選択したPULL戦略に基づいて、処理の度にデータを取得(フェッチ)するバッファ装置10を選択して、データを取得する。本実施の形態におけるPULL戦略は、輻輳が発生したら輻輳したバッファ装置を取得先に設定するものと、輻輳が発生しても全バッファ装置を対象とするものの両方を用いる。   Each data processing program 150 selects the buffer device 10 that acquires (fetches) data for each processing based on the selected pull strategy, and acquires data. The PULL strategy in this embodiment uses both a method that sets a congested buffer device as an acquisition destination when congestion occurs and a method that targets all buffer devices even when congestion occurs.

以下、図7〜図11のフローチャートに沿って、本実施の形態の動作を説明する。   Hereinafter, the operation of the present embodiment will be described with reference to the flowcharts of FIGS.

まず、バッファ装置10は、外部の追記プログラム等から各データDが追記され、輻輳している場合には、データ処理装置100に通知する。この動作の流れを図7のフローチャートに示す。   First, the buffer device 10 notifies the data processing device 100 when each data D is additionally recorded from an external additional recording program or the like and is congested. The flow of this operation is shown in the flowchart of FIG.

図7は、本発明の第1の実施の形態におけるバッファ装置におけるデータ受信とデータ処理装置への輻輳状態の通知処理のフローチャートである。   FIG. 7 is a flowchart of data reception in the buffer device and notification processing of the congestion state to the data processing device according to the first embodiment of the present invention.

図7のフローチャートの開始は、前述の追記クライアントが通信部13へデータ送信した時点からを記述してある。データDは、データソース20で発生したストリーム処理の対象データであり、ある時刻tのデータDをDtと表す。   The start of the flowchart of FIG. 7 is described from the time when the above-described additional recording client transmits data to the communication unit 13. Data D is the target data of the stream processing generated at the data source 20, and data D at a certain time t is represented as Dt.

バッファ装置10は、Dtを通信部13で受信する(ステップ101)。通信部13は、任意の通信プロトコルで受信可能であるが、通常はIPプロトコルが使用される。通信部13が受信したDtは、一旦このバッファ装置10の蓄積部11にデータ保存されて(ステップ102)、データ処理装置100によって処理されるのを待つ。当該データDtが到着する以前のデータDt-1や以後のデータDt+1と同様に受信したデータは、バッファ装置10の蓄積部11に保存される。このとき、蓄積部11は、閾値情報12を参照し(ステップ103)、その時点で蓄積部に蓄積されているデータの量が閾値情報を超えている場合は、輻輳通知としてデータ処理装置へ通知を行う(ステップ104,105)。   The buffer device 10 receives Dt by the communication unit 13 (step 101). The communication unit 13 can receive with an arbitrary communication protocol, but normally the IP protocol is used. The Dt received by the communication unit 13 is temporarily stored in the storage unit 11 of the buffer device 10 (step 102) and waits for processing by the data processing device 100. The received data is stored in the storage unit 11 of the buffer device 10 in the same manner as the data Dt-1 before the arrival of the data Dt and the subsequent data Dt + 1. At this time, the storage unit 11 refers to the threshold information 12 (step 103), and if the amount of data stored in the storage unit at that time exceeds the threshold information, notifies the data processing device as a congestion notification. (Steps 104 and 105).

閾値情報の指定方法としては、追記されたデータDの数やデータDの容量の合計値などが利用可能である。   As a method for specifying threshold information, the number of data D added or the total capacity of data D can be used.

ステップ105の輻輳通知は、任意のプロトコルが使用可能であるが、通常はIPプロトコルが使用される。さらに、輻輳通知は、バッファ装置10のどの蓄積部11が閾値を超えているかを一意に特定するための情報を含んでいる必要がある。   Although any protocol can be used for the congestion notification in step 105, the IP protocol is usually used. Furthermore, the congestion notification needs to include information for uniquely specifying which storage unit 11 of the buffer device 10 exceeds the threshold.

例として、IPプロトコルを利用した実装においては、輻輳通知には、輻輳しているバッファ装置のIPアドレス、通信ポート番号を含んでいるため、データ処理装置100は、どのバッファ装置10が輻輳しているかを知ることができる。   As an example, in the implementation using the IP protocol, the congestion notification includes the IP address and communication port number of the congested buffer device. I can know.

また、別の例として、本システム内で、各バッファ装置10を識別可能なバッファ装置ID情報とバッファ装置が動作しているIPアドレス、通信ポート番号との対応表を管理していて、バッファ装置ID情報のみを含め、各データ処理装置100側でバッファ装置ID情報からIPアドレスと通信ポートを特定することでも、データ処理装置100は、どのバッファ装置が輻輳しているかを知ることができる。   As another example, in this system, a correspondence table between buffer device ID information that can identify each buffer device 10 and the IP address and communication port number on which the buffer device operates is managed. The data processing device 100 can also know which buffer device is congested by specifying the IP address and communication port from the buffer device ID information on each data processing device 100 side including only ID information.

データ処理装置100は、輻輳通知を受信すると(ステップ106)、一旦輻輳しているバッファ装置10の情報を状態管理部140に保存する(ステップ107)。   When the data processing apparatus 100 receives the congestion notification (step 106), the data processing apparatus 100 stores information on the buffer apparatus 10 once congested in the state management unit 140 (step 107).

データ処理装置100は、状態管理部140およびPULL戦略構成設定部120の内容に応じてバッファ装置10からデータを取得してデータ処理を行う。この時のデータ処理装置におけるデータ処理順序制御を図8のフローチャートに示す。   The data processing device 100 acquires data from the buffer device 10 according to the contents of the state management unit 140 and the PULL strategy configuration setting unit 120 and performs data processing. The data processing sequence control in the data processing apparatus at this time is shown in the flowchart of FIG.

図8は、本発明の第1の実施の形態におけるデータ処理装置でのデータ処理全体のフローチャートである。   FIG. 8 is a flowchart of the entire data processing in the data processing apparatus according to the first embodiment of the present invention.

図8のフローチャートの開始は、データ処理プログラム150の開始した時点から記述してある。データ処理プログラムの開始時にはPULL戦略構成の取得を行う。   The start of the flowchart of FIG. 8 is described from the time when the data processing program 150 is started. The PULL strategy configuration is acquired at the start of the data processing program.

データ処理プログラム150が起動されると(ステップ201)、PULL戦略構成設定部120では、バッファ装置10の数および状態管理部140の状態に応じて、当該データ処理プログラム150がどのような順序でバッファ装置10のデータを取得するか(PULL戦略)を記述し、メモリ(図示せず)に保持する(ステップ202)。   When the data processing program 150 is activated (step 201), the PULL strategy configuration setting unit 120 buffers the data processing program 150 in any order according to the number of buffer devices 10 and the state of the state management unit 140. Whether to acquire the data of the device 10 (PULL strategy) is described and held in a memory (not shown) (step 202).

以下にPULL戦略の例を示す。   The following is an example of a PULL strategy.

(1) PULL戦略の例として、ラウンドロビンのPULL戦略(以下、PULL_RR)がある。PULL_RRを指定した場合は、複数あるバッファ装置から順にデータを取得する。バッファ装置10の識別子をBUFF_1、BUFF_2 ...BUFF_nとした場合、データ処理プログラムは、BUFF_1、BUFF_2 ...BUFF_nの順にデータ取得を試みる。   (1) As an example of the PULL strategy, there is a round-robin PULL strategy (hereinafter, PULL_RR). When PULL_RR is specified, data is acquired sequentially from a plurality of buffer devices. When the identifiers of the buffer devices 10 are BUFF_1, BUFF_2... BUFF_n, the data processing program tries to acquire data in the order of BUFF_1, BUFF_2.

(2)ランダムのPULL戦略(以下、PULL_RAND)がある。PULL_RANDを指定した場合は、複数あるバッファ装置10を選択する際に、データ処理プログラム150は、疑似乱数Rを生成し、疑似乱数Rをバッファ装置の数nで割った余り(R % n等)でどのバッファ装置からデータ取得を試みるかを決定する。バッファ装置のバッファ装置の識別子をBUFF_1、BUFF_2 ... BUFF_nとしてa = R % nであった場合は、BUFF_aが選択されデータ取得を試みる。   (2) There is a random PULL strategy (hereinafter, PULL_RAND). When PULL_RAND is specified, when selecting a plurality of buffer devices 10, the data processing program 150 generates a pseudo random number R, and the remainder obtained by dividing the pseudo random number R by the number n of buffer devices (R% n, etc.) To determine from which buffer device the data acquisition is to be attempted. If the buffer device identifiers of the buffer devices are BUFF_1, BUFF_2... BUFF_n, and a = R% n, BUFF_a is selected and data acquisition is attempted.

(3)各バッファ装置10を指定した割合で取得するラウンドロビンのPULL戦略(以下、PULL_BIAS_RR)がある。PULL_BIAS_RRを指定した場合は、別途、どのバッファ装置10をどの割合で取得するかを設定する必要がある。例として、バッファ装置BUFF_1とバッファ装置BUFF_2をそれぞれ1:2で取得するよう設定した場合は、データ処理プログラム150が3回バッファ装置を選択してデータ取得を試みる間に、1回はBUFF_1を選択してデータ取得を試み、また、2回はBUFF_2を選択してデータ取得を試みる。   (3) There is a round robin PULL strategy (hereinafter, PULL_BIAS_RR) for acquiring each buffer device 10 at a specified rate. When PULL_BIAS_RR is designated, it is necessary to separately set which buffer device 10 is to be acquired at which rate. As an example, if the buffer device BUFF_1 and the buffer device BUFF_2 are set to acquire 1: 2, respectively, the data processing program 150 selects the buffer device three times and tries to acquire the data once. Attempt to acquire data, and twice, select BUFF_2 and try to acquire data.

(4)状態管理部140に輻輳しているバッファ装置10を表す情報が存在しない時はラウンドロビンのPULL戦略(PULL_RR)と同じ動作をするが、状態管理部140に輻輳しているバッファ装置が存在していることを表す情報が保存されている場合には、輻輳しているバッファ装置から優先してデータ取得を試みるPULL戦略(以下、PULL_RR_JAM)がある。PULL_RR_JAMを指定されていて、バッファ装置のバッファ装置の識別子をBUFF_1、BUFF_2 ... BUFF_j ... BUFF_nとしてBUFF_jが輻輳していることを表す情報が状態管理部140に存在している場合、データ処理プログラム150はバッファ装置BUFF_jからのみデータ取得を試みる。   (4) When there is no information indicating the buffer device 10 that is congested in the state management unit 140, the same operation as the round-robin PULL strategy (PULL_RR) is performed, but the buffer device that is congested in the state management unit 140 In the case where information indicating the existence is stored, there is a PULL strategy (hereinafter referred to as PULL_RR_JAM) in which data acquisition is preferentially performed from a congested buffer device. If PULL_RR_JAM is specified and the buffer manager identifier is BUFF_1, BUFF_2 ... BUFF_j ... BUFF_n, and information indicating that BUFF_j is congested exists in the state management unit 140, data The processing program 150 tries to acquire data only from the buffer device BUFF_j.

データ処理プログラム150は、データ処理装置100上に1つ以上存在し、かつ、データ処理装置100もシステム全体で1つ以上存在し、それぞれのデータ処理プログラム150がバッファ装置10のデータを取得して処理を試みる。   One or more data processing programs 150 exist on the data processing apparatus 100, and one or more data processing apparatuses 100 exist in the entire system, and each data processing program 150 acquires the data of the buffer device 10 and Attempt processing.

本発明のシステムでは、PULL戦略の指定として複数のPULL戦略を指定することが可能である。たとえば、1つのデータ処理装置に2つのデータ処理プログラム(データ処理プログラムPG_Aとデータ処理プログラムPG_B)を起動し、PG_AにはPULL_RR、PG_BにはPULL_RANDといった個別の指定をすることが可能である。   In the system of the present invention, it is possible to specify a plurality of PULL strategies as PULL strategies. For example, two data processing programs (a data processing program PG_A and a data processing program PG_B) can be activated in one data processing apparatus, and individual designations such as PULL_RR for PG_A and PULL_RAND for PG_B can be performed.

PULL戦略が決定すると、データ処理プログラム150の起動が完了して(ステップ204)、データ処理フローのループ(図9)を開始する(ステップ205)。   When the PULL strategy is determined, the activation of the data processing program 150 is completed (step 204), and the data processing flow loop (FIG. 9) is started (step 205).

図9は、本発明の第1の実施の形態におけるデータ処理装置でのデータ処理のフローチャートである。   FIG. 9 is a flowchart of data processing in the data processing device according to the first embodiment of the present invention.

データ処理プログラム150は、バッファ装置選択部130にバッファ装置の選択要求を行う(ステップ301)。バッファ装置選択部130は図10に示す処理によりバッファ装置を選択し、データ処理プログラム150に返却する(ステップ302)。データ処理プログラム150は、バッファ装置選択結果を取得し(ステップ303)、図11に示す処理を行なう(ステップ304)。   The data processing program 150 makes a buffer device selection request to the buffer device selection unit 130 (step 301). The buffer device selection unit 130 selects a buffer device by the processing shown in FIG. 10, and returns it to the data processing program 150 (step 302). The data processing program 150 acquires the buffer device selection result (step 303), and performs the processing shown in FIG. 11 (step 304).

データ処理フローのループの中では、図9で示したように、バッファ装置選択部130がバッファ装置選択フロー(図10)を行い、データ処理プログラム150がデータ取得と処理フロー(図11)を順に実施する。   In the loop of the data processing flow, as shown in FIG. 9, the buffer device selection unit 130 performs the buffer device selection flow (FIG. 10), and the data processing program 150 sequentially performs the data acquisition and processing flow (FIG. 11). carry out.

図10は、本発明の第1の実施の形態におけるデータ処理装置でのバッファ装置選択のフローチャートである。   FIG. 10 is a flowchart of buffer device selection in the data processing device according to the first embodiment of the present invention.

図10で示したバッファ装置選択フローでは、バッファ装置選択部130がPULL戦略構成設定部120で取得したPULL戦略に応じて分岐を行う。例として、異なるPULL戦略で動作する2つのデータ処理プログラムPG_AとPG_Bが動作している例を示す。PG_Aには状態管理部がもつ情報に応じて動作を変更するPULL戦略1としてPULL_RR_JAMを指定する。PULL戦略2には状態管理部がもつ情報に関係なく動作するPULL_RANDを指定してする。それぞれのデータ処理プログラムは、指定されたPULL戦略で動作が分岐する(ステップ401)。   In the buffer device selection flow shown in FIG. 10, the buffer device selection unit 130 branches according to the PULL strategy acquired by the PULL strategy configuration setting unit 120. As an example, an example is shown in which two data processing programs PG_A and PG_B operating with different PULL strategies are operating. In PG_A, PULL_RR_JAM is specified as PULL strategy 1 whose operation is changed according to information held by the state management unit. PULL strategy 2 specifies PULL_RAND that operates regardless of the information held by the state management unit. Each data processing program branches according to the designated PULL strategy (step 401).

データ処理プログラムPG_Aは、PULL戦略1で動作することが指定されているため、バッファ装置選択が開始されると(ステップ402)、輻輳しているバッファ装置の存在を状態管理部140に確認して、バッファ装置リストを取得する(ステップ403)。バッファ装置リスト中に輻輳が発生しているバッファ装置の情報が存在していないことが分かると(ステップ404,No)、すべてのバッファ装置を対象にPULL_RRの手順でバッファ装置のうち1つをデータ取得先バッファ装置に選択する(ステップ405)。また輻輳が発生していることが分かると(ステップ404,Yes)輻輳しているバッファ装置のリストの中からデータ取得先バッファ装置を選択する(ステップ406)。   Since the data processing program PG_A is specified to operate in the PULL strategy 1, when the buffer device selection is started (step 402), the presence of the congested buffer device is confirmed with the state management unit 140. The buffer device list is acquired (step 403). If it is found that there is no information on the buffer device in which congestion has occurred in the buffer device list (step 404, No), one of the buffer devices is stored in the PULL_RR procedure for all buffer devices. The acquisition buffer device is selected (step 405). If it is found that congestion has occurred (step 404, Yes), the data acquisition destination buffer device is selected from the list of congested buffer devices (step 406).

PG_Bは、PULL戦略2で動作することが指定されているため(ステップ401,407)、すべてのバッファ装置を対象にPULL_RRの手順でバッファ装置のうち1つをデータ取得先バッファ装置として選択する(ステップ408)。   Since PG_B is specified to operate in PULL strategy 2 (steps 401 and 407), one of the buffer devices is selected as a data acquisition destination buffer device in the PULL_RR procedure for all buffer devices (steps 401 and 407). Step 408).

バッファ装置選択部130は、バッファ装置選択結果をデータ処理プログラム150に返却する(ステップ409)。   The buffer device selection unit 130 returns the buffer device selection result to the data processing program 150 (step 409).

図11は、本発明の第1の実施の形態におけるデータ処理装置及びバッファ装置でのデータ取得処理のフローチャートである。   FIG. 11 is a flowchart of data acquisition processing in the data processing device and the buffer device according to the first embodiment of the present invention.

図11のフローチャートでは、図10に示す処理ですでにデータ取得先バッファ装置として選択したバッファ装置10に対して、通信部110がデータ取得要求を行う(ステップ501)。バッファ装置10は、返却するデータが存在する場合はデータを返却し(ステップ502,503)、データが存在しない場合は、データが存在しない旨の応答を返す(ステップ502,504)。データが返却され場合のみデータ処理プログラムはデータ処理を実行する(ステップ505,506)。データ処理については、システムの用途に応じて動作が異なるが、ここでは特に規定しない。   In the flowchart of FIG. 11, the communication unit 110 makes a data acquisition request to the buffer device 10 that has already been selected as the data acquisition destination buffer device in the process shown in FIG. 10 (step 501). If there is data to be returned, the buffer device 10 returns the data (steps 502 and 503). If the data does not exist, the buffer device 10 returns a response indicating that the data does not exist (steps 502 and 504). Only when data is returned, the data processing program executes data processing (steps 505 and 506). Data processing differs depending on the application of the system, but is not specified here.

[第2の実施の形態]
本実施の形態では、明確にPULL戦略を分離していないが、バッファ装置選択部の中で条件分岐を行い、複数のPULL戦略が混在している状態の実装例を示す。
[Second Embodiment]
In the present embodiment, although the PULL strategy is not clearly separated, a conditional example is shown in which a conditional branch is performed in the buffer device selection unit and a plurality of PULL strategies are mixed.

本実施の形態におけるデータ処理プログラムでは、輻輳が発生していない場合は、複数あるバッファ装置を決められたPULL戦略(例えば、ランダム、バッファ装置の識別子の値順など)で巡回しながらバッファ装置からデータを取得して処理を行う。一方、輻輳が発生している場合は、データ処理プログラムは、一つのシステム内の処理キャパシティのうち、αの割合で輻輳に対応する(0≦α≦1)。例えば、一つの具体例として、輻輳継続時間に基づいてアルファの値を大きくして段階的に輻輳対応のデータ処理プログラムを増やす方法や、また、輻輳レベル(例えば、輻輳しているバッファ装置の数)に基づいてαの値を大きくして、段階的に輻輳対応のデータ処理プログラムを増やすといった方法が適用可能である。   In the data processing program according to the present embodiment, when there is no congestion, a plurality of buffer devices are searched from the buffer device while circulating through a determined PULL strategy (for example, random, order of identifier values of the buffer device). Acquire data and process it. On the other hand, if congestion occurs, the data processing program corresponds to congestion at a rate of α in the processing capacity in one system (0 ≦ α ≦ 1). For example, as one specific example, a method of increasing the data processing program corresponding to the congestion by increasing the alpha value based on the congestion duration time, or the congestion level (for example, the number of congested buffer devices) The value of α is increased based on (1) to increase the data processing programs corresponding to congestion step by step.

図12は、本発明の第2の実施の形態におけるシステム構成を示す。   FIG. 12 shows a system configuration in the second embodiment of the present invention.

同図のシステムにおいて、バッファ装置10は、第1の実施の形態と同様に、蓄積部11、閾値情報12、通信部13を具備し、データ処理装置200は、通信部210、バッファ装置選択部230、輻輳対応設定部220、状態管理部240、データ処理プログラム250からなる。またバッファ装置10の前段には、データソース20で発生したデータをバッファ装置10に追記するプログラム(以下、追記クライアント21)が存在することを前提とする。   In the system shown in the figure, the buffer device 10 includes a storage unit 11, threshold information 12, and a communication unit 13 as in the first embodiment, and the data processing device 200 includes a communication unit 210, a buffer device selection unit, and the like. 230, a congestion handling setting unit 220, a state management unit 240, and a data processing program 250. Further, it is assumed that a program (hereinafter referred to as an additional recording client 21) for additionally writing data generated by the data source 20 to the buffer device 10 exists in the preceding stage of the buffer device 10.

各データ処理プログラムは、選択したPULL戦略に基づいて処理の度に、データを取得(フェッチ)するバッファ装置を選択して、データを取得する。この動作の流れを図13〜図17を用いて示す。   Each data processing program selects a buffer device from which data is acquired (fetched) and acquires data each time processing is performed based on the selected pull strategy. The flow of this operation will be described with reference to FIGS.

図13は、本発明の第2の実施の形態におけるバッファ装置におけるデータ受信とデータ処理装置への輻輳状態の通知処理のフローチャートである。   FIG. 13 is a flowchart of data reception in the buffer device and notification processing of the congestion state to the data processing device according to the second embodiment of the present invention.

バッファ装置10は、外部の追記プログラム等から各データDが追記され、輻輳している場合には、データ処理装置200に通知する。   The buffer device 10 notifies the data processing device 200 when each data D is additionally recorded from an external additional recording program or the like and is congested.

図13の開始は、前述の追記クライアントが通信部13へデータ送信した時点からを記述してある。データDは、データソース20で発生したストリーム処理の対象データであり、ある時刻tのデータDをDtと表す。   The start of FIG. 13 is described from the time when the above-described additional recording client transmits data to the communication unit 13. Data D is the target data of the stream processing generated at the data source 20, and data D at a certain time t is represented as Dt.

バッファ装置10は、Dtを通信部13で受信する(ステップ601)。通信部13は、任意の通信プロトコルで受信可能であるが、通常はIPプロトコルが使用される。通信部13が受信したDtは、一旦このバッファ装置10の蓄積部11にデータ保存されて、データ処理装置200によって処理されるのを待つ(ステップ602,603)。当該データDtが到着する以前のデータDt-1や以後のデータDt+1と同様に受信したデータは、バッファ装置10の蓄積部11に保存される。このとき、蓄積部11は、閾値情報を参照し(ステップ604)、その時点で蓄積部11に蓄積されているデータの量が閾値情報を超えている場合は、輻輳通知としてデータ処理装置200へ通知を行う(ステップ605,606)。   The buffer device 10 receives Dt by the communication unit 13 (step 601). The communication unit 13 can receive with an arbitrary communication protocol, but normally the IP protocol is used. The Dt received by the communication unit 13 is temporarily stored in the storage unit 11 of the buffer device 10 and waits to be processed by the data processing device 200 (steps 602 and 603). The received data is stored in the storage unit 11 of the buffer device 10 in the same manner as the data Dt-1 before the arrival of the data Dt and the subsequent data Dt + 1. At this time, the storage unit 11 refers to the threshold information (step 604), and if the amount of data stored in the storage unit 11 at that time exceeds the threshold information, the storage unit 11 sends a congestion notification to the data processing device 200. Notification is performed (steps 605 and 606).

閾値情報の指定方法としては、追記されたデータDの数やデータDの容量の合計値などが利用可能である。   As a method for specifying threshold information, the number of data D added or the total capacity of data D can be used.

輻輳通知は、任意のプロトコルが使用可能であるが、通常はIPプロトコルが使用される。   Any protocol can be used for the congestion notification, but the IP protocol is usually used.

さらに、輻輳通知は、バッファ装置10のどの蓄積部11が閾値を超えているかを一意に特定するための情報を含んでいる必要がある。例として、IPプロトコルを利用した実装においては、輻輳通知には、輻輳しているバッファ装置10のIPアドレス、通信ポート番号を含んでいるため、データ処理装置200は、どのバッファ装置が輻輳しているかを知ることができる。   Furthermore, the congestion notification needs to include information for uniquely specifying which storage unit 11 of the buffer device 10 exceeds the threshold. As an example, in the implementation using the IP protocol, the congestion notification includes the IP address and the communication port number of the buffer device 10 that is congested. I can know.

また、別の例として、本システム内で、各バッファ装置10を識別可能なバッファ装置ID情報とバッファ装置が動作しているIPアドレス、通信ポート番号との対応表を管理していて、バッファ装置ID情報のみを含め、各データ処理装置200側でバッファ装置ID情報からIPアドレスと通信ポートを特定することでも、データ処理装置200は、どのバッファ装置が輻輳しているかを知ることができる。   As another example, in this system, a correspondence table between buffer device ID information that can identify each buffer device 10 and the IP address and communication port number on which the buffer device operates is managed. The data processing device 200 can know which buffer device is congested also by specifying the IP address and the communication port from the buffer device ID information on each data processing device 200 side including only the ID information.

データ処理装置200は、輻輳通知を受信すると、一旦輻輳しているバッファ装置の情報を状態管理部240に保存する。   When receiving the congestion notification, the data processing device 200 stores information on the buffer device once congested in the state management unit 240.

データ処理装置200は、状態管理部240および輻輳対応設定の内容に応じてバッファ装置10からデータを取得してデータ処理を行う。この時のデータ処理装置200におけるデータ処理を図14〜図17を用いて説明する。   The data processing device 200 performs data processing by acquiring data from the buffer device 10 according to the contents of the state management unit 240 and the congestion handling setting. Data processing in the data processing apparatus 200 at this time will be described with reference to FIGS.

図14は、本発明の第2の実施の形態におけるデータ処理装置でのデータ処理全体のデータ処理のフローチャートである。   FIG. 14 is a flowchart of data processing for the entire data processing in the data processing apparatus according to the second embodiment of the present invention.

図14の開始は、データ処理プログラム250の開始した時点から記述してある。データ処理プログラムが起動すると(ステップ701)(データ処理フローのループ(図15のフロー)を開始する(ステップ702)。   The start of FIG. 14 is described from the start of the data processing program 250. When the data processing program is activated (step 701), a data processing flow loop (the flow of FIG. 15) is started (step 702).

データ処理フローのループの中では、図15で示したように、データ処理プログラム250が、バッファ装置選択フロー(図16)とデータ取得と処理フロー(図17)を順に実施する。   In the loop of the data processing flow, as shown in FIG. 15, the data processing program 250 sequentially executes a buffer device selection flow (FIG. 16), data acquisition, and processing flow (FIG. 17).

図16は、本発明の第2の実施の形態におけるデータ処理装置でのバッファ装置選択のフローチャートである。   FIG. 16 is a flowchart of buffer device selection in the data processing device according to the second embodiment of the present invention.

バッファ装置選択部230では、状態管理部240からバッファ装置10のリストを取得し(ステップ801)、この結果から輻輳が発生しているかどうか、および輻輳が発生しているバッファ装置を知ることができ、図16で示したバッファ装置選択フローでは、この結果、輻輳が発生していない場合において、データ処理プログラム250は全バッファ装置を対象にデータ取得先バッファ装置を選択する。この時に実施するPULL戦略としては、上述したPULL_RANDやPULL_RRなど任意のPULL戦略を設定可能である。またバッファ装置10において輻輳が発生している場合には(ステップ802、Yes)、さらに輻輳対応設定を取得し(ステップ803)、当該データ処理プログラムが輻輳に対応するべきかどうかを判断する(ステップ804)。この時、どの程度の割合で輻輳に対応すべきかを表すα値を調整する必要がある(ステップ805)。   The buffer device selection unit 230 obtains a list of the buffer devices 10 from the state management unit 240 (step 801), and from this result, it is possible to know whether congestion has occurred and the buffer device in which congestion has occurred. In the buffer device selection flow shown in FIG. 16, as a result, when there is no congestion, the data processing program 250 selects the data acquisition destination buffer device for all the buffer devices. As the PULL strategy to be executed at this time, any PULL strategy such as the above-described PULL_RAND and PULL_RR can be set. If congestion occurs in the buffer device 10 (step 802, Yes), further congestion correspondence setting is acquired (step 803), and it is determined whether the data processing program should cope with the congestion (step 803). 804). At this time, it is necessary to adjust the α value indicating how much congestion should be handled (step 805).

調整方法の例としては、全体のバッファ装置数SUM_buffおよび、輻輳しているバッファ装置数SUM_jamからα=SUM_jam/SUM_buffから求めるというものである。   As an example of the adjustment method, the total number of buffer devices SUM_buff and the number of congested buffer devices SUM_jam are obtained from α = SUM_jam / SUM_buff.

このαにより乱数判定では0〜1の間の乱数を発生し(ステップ806)、乱数が0以上α未満の場合は、データ処理プログラムは、輻輳状態のバッファ装置を対象にバッファ装置の選択を行う(ステップ807)。また、乱数がα以上1以下の場合は、データ処理プログラム250は、バッファ装置全体を対象にバッファ装置の選択を行う(ステップ808)。バッファ選択の結果をデータ処理プログラム250に出力する(ステップ809)。   In this random number determination, a random number between 0 and 1 is generated by this α (step 806). If the random number is 0 or more and less than α, the data processing program selects a buffer device for a buffer device in a congested state. (Step 807). If the random number is not less than α and not more than 1, the data processing program 250 selects a buffer device for the entire buffer device (step 808). The buffer selection result is output to the data processing program 250 (step 809).

バッファ装置選択手順により、明示的に複数のPULL戦略を混在させなくても、状態管理部の状態に応じて輻輳に対応するPULL戦略と、輻輳に対応しないPULL戦略を混在させた状態と同様の機能を実現することができる。   The buffer device selection procedure is the same as the state where the PULL strategy corresponding to congestion and the PULL strategy not corresponding to congestion are mixed according to the state of the state management unit without explicitly mixing multiple PULL strategies. Function can be realized.

図17は、本発明の第2の実施の形態におけるデータ処理装置でのデータ取得処理のフローチャートである。   FIG. 17 is a flowchart of data acquisition processing in the data processing device according to the second embodiment of the present invention.

図17の処理は、図16の処理で既にデータ取得先バッファ装置として選択したバッファ装置10に対して、通信部210がデータ取得要求を行う(ステップ9901)。バッファ装置10は、返却するデータが存在する場合はデータを返却し(ステップ902)、データが存在しない場合は、データが存在しない旨の応答を返す(ステップ903)。データが返却され場合のみデータ処理プログラムはデータ処理を実行する(ステップ904)。データ処理については、システムの用途に応じて動作が異なるが、ここでは特に規定しない。   In the processing of FIG. 17, the communication unit 210 makes a data acquisition request to the buffer device 10 that has already been selected as the data acquisition destination buffer device in the processing of FIG. 16 (step 9901). If there is data to be returned, the buffer device 10 returns the data (step 902). If the data does not exist, the buffer device 10 returns a response indicating that the data does not exist (step 903). Only when data is returned, the data processing program executes data processing (step 904). Data processing differs depending on the application of the system, but is not specified here.

以下に、本発明による効果を具体的に以下に示す。   The effects of the present invention are specifically shown below.

一つのケースとして、いくつものバッファ装置があり、一時的に大量のデータが到達して輻輳が発生する可能性があり優先的に処理する必要のあるバッファ装置BUFF_1と、流量は少ないが低レイテンシで処理を行う必要のあるバッファ装置BUFF_2が混在するシステムにおいて、PULL_RR(輻輳に対応しないPULL戦略)、PULL_RR_JAM(輻輳に対応するPULL戦略)を混在させた場合を例にあげる。   In one case, there are a number of buffer devices, and there is a possibility that congestion will occur due to the arrival of a large amount of data temporarily. Buffer device BUFF_1 that needs to be preferentially processed and has a low flow rate but low latency. An example will be given of a case where PULL_RR (a PULL strategy not corresponding to congestion) and PULL_RR_JAM (a PULL strategy corresponding to congestion) are mixed in a system in which buffer devices BUFF_2 that need to perform processing are mixed.

輻輳が発生していない場合は、PULL_RRとPULL_RR_JAMは同様にラウンドロビンでバッファ装置を選択する。これによりすべてのバッファ装置が一定期間内に選択される。一部のバッファ装置にて輻輳が発生している場合は、PULL_RRで動作するデータ処理プログラムは、常に一定の周期でBUFF_1とBUFF_2を巡回するため、BUFF_2の要件を満たすことができる。また、PULL_RR_JAMは、輻輳したBUFF_1を優先的に選択するため、BUFF_1をに到着して蓄積されている大量のデータを短時間で処理しようと試みる。   When congestion does not occur, PULL_RR and PULL_RR_JAM select the buffer device by round robin in the same manner. As a result, all the buffer devices are selected within a certain period. When congestion occurs in some buffer devices, the data processing program operating with PULL_RR always cycles through BUFF_1 and BUFF_2 at a constant cycle, so that the requirements of BUFF_2 can be satisfied. Further, PULL_RR_JAM preferentially selects a congested BUFF_1, and therefore tries to process a large amount of data that arrives at BUFF_1 and accumulates in a short time.

上述のように、単独のPULL戦略を選択した場合に、入力や処理の要件が異なるデータが混在する環境下で十分に要件を満たせない場合があり、このような環境下において、複数のPULL戦略を混在させることの可能な本発明のシステムの効果がある。   As described above, when a single PULL strategy is selected, there may be cases where the requirements cannot be met sufficiently in an environment where data with different input and processing requirements are mixed. There is an effect of the system of the present invention which can be mixed.

上記の第1の実施の形態における図6のデータ処理装置100、第2の実施の形態における図12のデータ処理装置200の構成要素の動作をプログラムとして構築し、ストリーム処理システムにおけるデータ処理装置として利用されるコンピュータにインストールして実行させる、または、ネットワークを介して流通させることが可能である。   As the data processing apparatus in the stream processing system, the operations of the constituent elements of the data processing apparatus 100 in FIG. 6 in the first embodiment and the data processing apparatus 200 in FIG. 12 in the second embodiment are constructed as programs. It can be installed and executed on a computer to be used, or can be distributed via a network.

なお、本発明は、上記の第1、第2の実施の形態に限定されることなく、特許請求の範囲内において、種々変更・応用が可能である。   The present invention is not limited to the first and second embodiments described above, and various modifications and applications can be made within the scope of the claims.

10 バッファ装置
11 蓄積部
12 閾値情報
13 通信部
20 データソース
21 追記クライアント
100,200 データ処理装置
110,210 通信部
120 PULL戦略構成設定部
130,230 バッファ装置選択部
140,240 状態管理部
150,250 データ処理プログラム
220 輻輳対応設定部
DESCRIPTION OF SYMBOLS 10 Buffer apparatus 11 Accumulation part 12 Threshold information 13 Communication part 20 Data source 21 Additional recording client 100,200 Data processing apparatus 110,210 Communication part 120 Pull strategy configuration setting part 130,230 Buffer apparatus selection part 140,240 State management part 150, 250 Data processing program 220 Congestion handling setting unit

Claims (8)

ストリーム処理システムにおいて、データソースからの入力データを一時的に保持する複数のバッファ装置に蓄積されたデータを自律的に処理する複数のデータ処理プログラムを有するデータ処理装置であって、
前記バッファ装置に輻輳が発生すると、輻輳が発生しているバッファ装置を優先的に選択するルールで動作するデータ処理プログラムと、輻輳が発生しても、該輻輳が発生する前と同じ順序でバッファ装置の選択を行うルールで動作するデータ処理プログラムの両方を制御する手段を有することを特徴とするデータ処理装置。
In a stream processing system, a data processing device having a plurality of data processing programs for autonomously processing data accumulated in a plurality of buffer devices that temporarily hold input data from a data source,
When congestion occurs in the buffer device, a data processing program that operates according to a rule that preferentially selects a buffer device in which congestion has occurred, and even if congestion occurs, the buffer is processed in the same order as before the congestion occurs A data processing apparatus comprising means for controlling both data processing programs that operate according to a rule for selecting an apparatus.
前記バッファ装置から輻輳通知を取得すると、当該輻輳バッファ装置の状態情報を保持する状態管理手段と、
前記ルールとして、輻輳が発生していれば輻輳が発生しているバッファ装置からデータ取得先のバッファ装置を決定するルールAと、輻輳が発生していなければ全バッファ装置からデータ取得先のバッファ装置を決定するルールBを含む第1のルールと、該バッファ装置の輻輳には非対応の第2のルールを設定し、要求に応じてルールを通知するルール構成設定手段と、
前記データ処理プログラムからバッファ装置選択要求が入力されると、前記状態管理手段の前記輻輳バッファ装置の状態情報を参照して、前記ルール構成設定手段から取得した前記第1のルールと前記第2のルールのうち、指定されたルールに応じて選択したバッファ装置を前記データ処理プログラムに通知するバッファ装置選択手段と、
を有し、
前記データ処理プログラムは、
前記バッファ装置選択手段で選択されたバッファ装置からデータを取得する
請求項1記載のデータ処理装置。
When acquiring congestion notification from the buffer device, state management means for holding state information of the congestion buffer device;
As the rule, rule A for determining a data acquisition destination buffer device from the buffer device in which congestion occurs if congestion occurs, and data acquisition destination buffer device in all buffer devices if no congestion occurs A rule configuration setting means for setting a first rule including a rule B for determining the buffer, a second rule not corresponding to congestion of the buffer device, and notifying the rule in response to a request;
When a buffer device selection request is input from the data processing program, referring to the state information of the congestion buffer device of the state management unit, the first rule and the second rule acquired from the rule configuration setting unit Buffer device selection means for notifying the data processing program of the buffer device selected according to the specified rule among the rules,
Have
The data processing program is
The data processing apparatus according to claim 1, wherein data is acquired from the buffer apparatus selected by the buffer apparatus selecting means.
前記バッファ装置から輻輳通知を取得すると、当該輻輳バッファ装置の状態情報を保持する状態管理手段と、
前記バッファ装置に輻輳が発生している場合に、輻輳に対応すべきか否かを表すα(0≦α≦1)値の割合を設定する輻輳対応設定手段と、
前記状態管理手段の前記状態情報を参照して、輻輳が発生していない場合は、複数のバッファ装置を、どのような順序で前記バッファ装置のデータを取得するかを定めたルールに応じて巡回してデータを取得し、輻輳が発生している場合は、前記輻輳対応設定手段から前記α値を取得して乱数判定により、バッファ装置を選択し、選択したバッファ装置を前記データ処理プログラムに通知するバッファ装置選択手段と、
を有し、
前記バッファ装置選択手段は、
0〜1の間の乱数を発生し、当該乱数が0以上α未満の場合は輻輳状態のバッファ装置をデータ取得先のバッファ装置とし、当該乱数がα以上1以下の場合は全バッファ装置を選択する手段を含む
請求項1記載のデータ処理装置。
When acquiring congestion notification from the buffer device, state management means for holding state information of the congestion buffer device;
A congestion correspondence setting means for setting a ratio of α (0 ≦ α ≦ 1) value indicating whether or not to cope with congestion when congestion occurs in the buffer device;
Referring to the state information of the state management means, when there is no congestion, a plurality of buffer devices are circulated according to a rule that determines in what order the data of the buffer devices is acquired. When data is acquired and congestion occurs, the α value is acquired from the congestion response setting unit, a random number determination is performed to select a buffer device, and the selected buffer device is notified to the data processing program Buffer device selection means for
Have
The buffer device selection means includes:
A random number between 0 and 1 is generated. When the random number is 0 or more and less than α, the buffer device in the congested state is used as the data acquisition destination buffer device. When the random number is α or more and 1 or less, all buffer devices are selected. The data processing apparatus according to claim 1, further comprising:
前記バッファ選択手段は、
輻輳継続時間または輻輳しているバッファ装置の数に基づいて前記α値を大きくし、段階的に前記データ処理プログラムの数を増やす手段
を含む請求項3記載のデータ処理装置。
The buffer selection means includes
4. The data processing apparatus according to claim 3, further comprising means for increasing the α value based on a congestion duration or the number of congested buffer apparatuses and increasing the number of the data processing programs in stages.
ストリーム処理システムにおいて、データソースからの入力データを一時的に保持する複数のバッファ装置に蓄積されたデータを自律的に処理する複数のデータ処理プログラムを有するデータ処理方法であって、
データ処理装置が、
前記バッファ装置に輻輳が発生すると、輻輳が発生しているバッファ装置を優先的に選択するルールで動作するデータ処理プログラムと、輻輳が発生しても、該輻輳が発生する前と同じ順序でバッファ装置の選択を行うルールで動作するデータ処理プログラムの両方を制御することを特徴とするデータ処理方法。
In a stream processing system, a data processing method having a plurality of data processing programs for autonomously processing data stored in a plurality of buffer devices that temporarily hold input data from a data source,
Data processing device
When congestion occurs in the buffer device, a data processing program that operates according to a rule that preferentially selects a buffer device in which congestion has occurred, and even if congestion occurs, the buffer is processed in the same order as before the congestion occurs A data processing method characterized by controlling both data processing programs that operate according to a rule for selecting a device.
前記データ処理装置が、状態管理手段、ルール構成設定手段、バッファ装置選択手段、前記データ処理プログラムを有し、
前記状態管理手段が、前記バッファ装置から輻輳通知を取得すると、当該輻輳バッファ装置の状態情報を保持する状態管理ステップと、
前記ルール構成設定手段が、前記ルールとして、輻輳が発生していれば輻輳が発生しているバッファ装置からデータ取得先のバッファ装置を決定するルールAと、輻輳が発生していなければ全バッファ装置からデータ取得先のバッファ装置を決定するルールBを含む第1のルールと、該バッファ装置の輻輳には非対応の第2のルールを設定し、要求に応じてルールを通知するルール構成設定ステップと、
前記バッファ装置選択手段が、前記データ処理プログラムからバッファ装置選択要求が入力されると、前記輻輳バッファ装置の状態情報を参照して、前記ルール構成設定手段から取得した前記第1のルールと前記第2のルールのうち、指定されたルールに応じて選択したバッファ装置を前記データ処理プログラムに通知するバッファ装置選択ステップと、
を行う請求項5記載のデータ処理方法。
The data processing device includes state management means, rule configuration setting means, buffer device selection means, and the data processing program.
When the state management means obtains a congestion notification from the buffer device, a state management step for holding state information of the congestion buffer device;
The rule configuration setting means, as the rule, determines rule A to determine a data acquisition destination buffer device from the buffer device in which congestion has occurred if congestion has occurred, and all buffer devices if congestion has not occurred A rule configuration setting step for setting a first rule including rule B for determining a buffer device from which data is acquired from the second rule, a second rule not corresponding to congestion of the buffer device, and notifying the rule in response to a request When,
When the buffer device selection means receives a buffer device selection request from the data processing program, the buffer device selection means refers to the state information of the congestion buffer device and the first rule obtained from the rule configuration setting means and the first rule A buffer device selection step of notifying the data processing program of the buffer device selected according to the specified rule of the two rules;
The data processing method according to claim 5, wherein:
前記データ処理装置が、状態管理手段、輻輳対応設定手段、バッファ装置選択手段、前記データ処理プログラムを有し、
前記状管理手段が、前記バッファ装置から輻輳通知を取得すると、当該輻輳バッファ装置の状態情報を保持する状態管理ステップと、
前記輻輳対応設定手段が、前記バッファ装置に輻輳が発生している場合に、輻輳に対応すべきか否かを表すα(0≦α≦1)値の割合を設定する輻輳対応設定ステップと、
前記バッファ装置選択手段が、前記状態情報を参照して、輻輳が発生していない場合は、複数のバッファ装置を、どのような順序で前記バッファ装置のデータを取得するかを定めたルールに応じて巡回してデータを取得し、輻輳が発生している場合は、前記輻輳対応設定手段から前記α値を取得して乱数判定により、バッファ装置を選択し、選択したバッファ装置を前記データ処理プログラムに通知するバッファ装置選択ステップと、
を行い、
前記バッファ装置選択ステップにおいて、
0〜1の間の乱数を発生し、当該乱数が0以上α未満の場合は輻輳状態のバッファ装置をデータ取得先のバッファ装置とし、当該乱数がα以上1以下の場合は全バッファ装置を選択する
請求項5記載のデータ処理方法。
The data processing device has state management means, congestion response setting means, buffer device selection means, and the data processing program,
When the state management means obtains a congestion notification from the buffer device, a state management step for holding state information of the congestion buffer device;
A congestion handling setting step in which the congestion handling setting means sets a ratio of an α (0 ≦ α ≦ 1) value indicating whether or not to deal with congestion when congestion occurs in the buffer device;
When the buffer device selection means refers to the state information and no congestion has occurred, the buffer device selection unit conforms to a rule that determines in what order the buffer device data is acquired in a plurality of buffer devices. If the congestion occurs, the buffer device is selected by random number determination by acquiring the α value from the congestion response setting means, and the selected buffer device is stored in the data processing program. A buffer device selection step to notify
And
In the buffer device selection step,
A random number between 0 and 1 is generated. When the random number is 0 or more and less than α, the buffer device in the congested state is used as the data acquisition destination buffer device. When the random number is α or more and 1 or less, all buffer devices are selected. The data processing method according to claim 5.
コンピュータを、
請求項1乃至4のいずれか1項に記載のデータ処理装置の各手段として機能させるためのデータ処理プログラム。
Computer
The data processing program for functioning as each means of the data processing apparatus of any one of Claims 1 thru | or 4.
JP2013103735A 2013-05-16 2013-05-16 Data processing device, method, and program Pending JP2014225111A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013103735A JP2014225111A (en) 2013-05-16 2013-05-16 Data processing device, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013103735A JP2014225111A (en) 2013-05-16 2013-05-16 Data processing device, method, and program

Publications (1)

Publication Number Publication Date
JP2014225111A true JP2014225111A (en) 2014-12-04

Family

ID=52123753

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013103735A Pending JP2014225111A (en) 2013-05-16 2013-05-16 Data processing device, method, and program

Country Status (1)

Country Link
JP (1) JP2014225111A (en)

Similar Documents

Publication Publication Date Title
US10970144B2 (en) Packet processing on a multi-core processor
US20210141676A1 (en) Dynamic load balancing in network interface cards for optimal system level performance
US20230039191A1 (en) Throttling queue for a request scheduling and processing system
CN107800768B (en) Open platform control method and system
US9274826B2 (en) Methods for task scheduling through locking and unlocking an ingress queue and a task queue
US7836195B2 (en) Preserving packet order when migrating network flows between cores
US9778962B2 (en) Method for minimizing lock contention among threads when tasks are distributed in multithreaded system and apparatus using the same
US9853906B2 (en) Network prioritization based on node-level attributes
US9736235B2 (en) Computer system, computer, and load balancing method
US9110715B2 (en) System and method for using a sequencer in a concurrent priority queue
US20140126374A1 (en) Method and apparatus for load balancing
WO2016177081A1 (en) Notification message processing method and device
US10102037B2 (en) Averting lock contention associated with core-based hardware threading in a split core environment
US20220060426A1 (en) Systems and methods for providing lockless bimodal queues for selective packet capture
US9705698B1 (en) Apparatus and method for network traffic classification and policy enforcement
CN111427673B (en) Load balancing method, device and equipment
JP2014225111A (en) Data processing device, method, and program
US11003506B2 (en) Technique for determining a load of an application
CN110673937B (en) Single chip microcomputer and synchronous and asynchronous control method thereof
US8977795B1 (en) Method and apparatus for preventing multiple threads of a processor from accessing, in parallel, predetermined sections of source code
CN111324438A (en) Request scheduling method and device, storage medium and electronic equipment
US10476956B1 (en) Adaptive bulk write process
US10819607B2 (en) Reducing power consumption of a compute node experiencing a bottleneck
WO2016169206A1 (en) Event processing method, device and system