JP2014197340A - Distributed processing system and program - Google Patents

Distributed processing system and program Download PDF

Info

Publication number
JP2014197340A
JP2014197340A JP2013073097A JP2013073097A JP2014197340A JP 2014197340 A JP2014197340 A JP 2014197340A JP 2013073097 A JP2013073097 A JP 2013073097A JP 2013073097 A JP2013073097 A JP 2013073097A JP 2014197340 A JP2014197340 A JP 2014197340A
Authority
JP
Japan
Prior art keywords
job
flow
processing unit
processing
job processing
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
JP2013073097A
Other languages
Japanese (ja)
Inventor
淳也 加藤
Junya Kato
淳也 加藤
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2013073097A priority Critical patent/JP2014197340A/en
Publication of JP2014197340A publication Critical patent/JP2014197340A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To independently determine a job to be processed by own job processing means on the basis of the number of jobs of each processing definition information stored in a job queue in the case of allowing job processing means to perform the distributed processing of jobs to which processing definition information is designated.SOLUTION: Each job processing part 50 includes: distribution processing part 51 for distributing a flow to each job processing part 50 by executing distribution processing which is common to all the job processing parts 50; and a job execution part 53 for executing a job to which the flow distributed to its own job processing part is designated. The distribution processing part 51 is configured to, when there exists a flow in which the number of standby jobs stored in a job queue 16 satisfies increase conditions, increase the number of the job processing parts 50 as the distribution designations of the flow. An auto-scaler 15 is configured to, when the number of standby jobs satisfies the increase conditions even after the flow is distributed to all the job processing parts 50, perform scale out.

Description

本発明は、分散処理システム及びプログラムに関する。   The present invention relates to a distributed processing system and a program.

例えば、特許文献1には、イベントを処理する複数の処理サーバにかかる負荷を分散するために、コンテキスト依存振り分け装置がイベントの内容に応じた振り分けルールに従って当該イベントを処理する処理サーバを決定する技術が提案されている。   For example, in Patent Document 1, in order to distribute the load applied to a plurality of processing servers that process an event, a technique in which a context-dependent distribution device determines a processing server that processes the event according to a distribution rule according to the content of the event. Has been proposed.

特開2006−309701号公報JP 2006-309701 A 特開2007−306138号公報JP 2007-306138 A 特開2008−040718号公報JP 2008-040718 A 特表2011−510367号公報Special table 2011-510367 gazette

本発明は、処理定義情報が指定されたジョブをジョブ処理手段に分散処理させる際、ジョブキューに蓄積されている処理定義情報毎のジョブの数に基づいて自ジョブ処理手段が処理するジョブを自立的に決定することを目的とする。   According to the present invention, when a job for which processing definition information is specified is distributed to the job processing means, the job processed by the own job processing means is independent based on the number of jobs for each processing definition information accumulated in the job queue. The purpose is to make a decision.

本発明に係る分散処理システムは、処理対象のデータに対して実施する処理を定義する処理定義情報が指定されたジョブをジョブキューに登録する登録手段と、前記ジョブキューに蓄積されているジョブのうち自己に振り分けた処理定義情報が指定されたジョブのみを処理する1又は複数のジョブ処理手段と、を有し、前記各ジョブ処理手段は、前記ジョブ処理手段全てに共通した振分処理を実行することによって処理定義情報を前記各ジョブ処理手段に振り分ける振分処理部と、前記振分処理部により自己に振り分けられた処理定義情報が指定されたジョブを実行するジョブ実行部と、を有し、前記振分処理部は、処理定義情報毎に集計された前記ジョブキューに蓄積されているジョブの数に応じて当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を増減させることを特徴とする。   The distributed processing system according to the present invention includes a registration unit for registering a job in which processing definition information defining processing to be performed on data to be processed is specified in a job queue, and a job stored in the job queue. One or a plurality of job processing means for processing only jobs for which processing definition information assigned to them is specified, and each job processing means executes a distribution process common to all the job processing means. A distribution processing unit that distributes the process definition information to each job processing unit, and a job execution unit that executes a job in which the process definition information distributed to the job processing unit is specified by the distribution processing unit. The distribution processing unit stores the process definition information specified for the job in accordance with the number of jobs accumulated in the job queue aggregated for each process definition information. Increasing or decreasing the number of said job processing means for the partial destination characterized.

また、前記ジョブ処理手段の数を調整する調整手段を有し、前記調整手段は、前記振分処理部により全ての前記ジョブ処理手段に振り分けられた処理定義情報が指定されたジョブの数が予め決められた第一のジョブ処理手段増加条件を満たした場合に前記ジョブ処理手段の数を増加させることを特徴とする。   An adjustment unit that adjusts the number of job processing units, and the adjustment unit includes a predetermined number of jobs for which the process definition information assigned to all the job processing units by the distribution processing unit is designated; The number of job processing means is increased when a predetermined first job processing means increasing condition is satisfied.

また、前記振分処理部は、処理定義情報毎に集計された前記ジョブキューに蓄積されているジョブの数が予め決められた増加条件を満たした場合、当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を増加させることを特徴とする。   Further, the distribution processing unit, when the number of jobs accumulated in the job queue aggregated for each process definition information satisfies a predetermined increase condition, the process definition information specified for the job The number of job processing means to be distributed is increased.

また、前記振分処理部は、前記ジョブキューに蓄積されているジョブであって複数の前記ジョブ処理手段を振分先とした処理定義情報に指定されたジョブの数が予め決められた減少条件を満たした場合、当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を減少させることを特徴とする。   In addition, the distribution processing unit is configured to reduce the number of jobs stored in the job queue and specified in the process definition information with a plurality of job processing means as distribution destinations in advance. If the above condition is satisfied, the number of job processing means to which the process definition information specified for the job is assigned is reduced.

また、前記調整手段は、前記ジョブキューに蓄積されているジョブの数が予め決められた第二のジョブ処理手段増加条件を満たした場合にも前記ジョブ処理手段の数を増加させることを特徴とする。   Further, the adjusting means increases the number of job processing means even when the number of jobs accumulated in the job queue satisfies a predetermined second job processing means increase condition. To do.

また、前記調整手段は、前記ジョブキューに蓄積されているジョブの数が予め決められたジョブ処理手段減少条件を満たした場合に前記ジョブ処理手段の数を減少させることを特徴とする。   The adjustment unit may reduce the number of job processing units when the number of jobs stored in the job queue satisfies a predetermined job processing unit reduction condition.

本発明に係るプログラムは、コンピュータを、処理対象のデータに対して実施する処理を定義する処理定義情報が指定されたジョブをジョブキューに登録する登録手段、前記ジョブキューに蓄積されているジョブのうち自己に振り分けた処理定義情報が指定されたジョブのみを処理する1又は複数のジョブ処理手段、として機能させ、前記各ジョブ処理手段は、前記ジョブ処理手段全てに共通した振分処理を実行することによって処理定義情報を前記各ジョブ処理手段に振り分ける振分処理部と、前記振分処理部により自己に振り分けられた処理定義情報が指定されたジョブを実行するジョブ実行部と、を有し、前記振分処理部は、処理定義情報毎に集計された前記ジョブキューに蓄積されているジョブの数に応じて当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を増減させることを特徴とする。   The program according to the present invention includes a registration unit for registering a job in which a process definition information for defining a process to be performed on data to be processed is specified in a job queue, and a job stored in the job queue. Of these, each job processing unit executes a distribution process common to all the job processing units. The job processing unit functions as one or a plurality of job processing units that process only a job for which processing definition information assigned to itself is specified. A distribution processing unit that distributes the process definition information to each job processing unit, and a job execution unit that executes a job in which the process definition information distributed to the job processing unit is specified by the distribution processing unit, The distribution processing unit is assigned to the job according to the number of jobs accumulated in the job queue that is aggregated for each process definition information. And wherein the increasing or decreasing the number of said job processing means for the assignment destination management definition information.

請求項1記載の発明によれば、処理定義情報が指定されたジョブをジョブ処理手段に分散処理させる際、ジョブキューに蓄積されている処理定義情報毎のジョブの数に基づいて自ジョブ処理手段が処理するジョブを自立的に決定することができる。   According to the first aspect of the present invention, when the job processing means distributes the job for which the process definition information is specified, the own job processing means is based on the number of jobs for each process definition information accumulated in the job queue. Can independently determine the job to be processed.

請求項2記載の発明によれば、処理定義情報が全てのジョブ処理手段に振り分けられてはじめてジョブ処理手段の数を増加させることができる。   According to the second aspect of the present invention, the number of job processing means can be increased only after the process definition information is distributed to all job processing means.

請求項3記載の発明によれば、処理定義情報が振り分けられたジョブ処理手段にかかる負荷が増加した場合に、当該処理定義情報の振分先とするジョブ処理手段の数を増加させることができる。   According to the third aspect of the present invention, when the load on the job processing means to which the process definition information is distributed increases, the number of job processing means to which the process definition information is assigned can be increased. .

請求項4記載の発明によれば、処理定義情報が振り分けられたジョブ処理手段にかかる負荷が減少した場合に、当該処理定義情報の振分先とするジョブ処理手段の数を減少させることができる。   According to the fourth aspect of the present invention, when the load on the job processing means to which the process definition information is distributed decreases, the number of job processing means to which the process definition information is assigned can be reduced. .

請求項5記載の発明によれば、全てのジョブ処理手段にかかる負荷が増加した場合に、ジョブ処理手段の数を増加させることができる。   According to the fifth aspect of the present invention, when the load on all job processing means increases, the number of job processing means can be increased.

請求項6記載の発明によれば、全てのジョブ処理手段にかかる負荷が減少した場合に、ジョブ処理手段の数を減少させることができる。   According to the sixth aspect of the present invention, the number of job processing means can be reduced when the load on all job processing means is reduced.

請求項7記載の発明によれば、処理定義情報が指定されたジョブをジョブ処理手段に分散処理させる際、ジョブキューに蓄積されている処理定義情報毎のジョブの数に基づいて自ジョブ処理手段が処理するジョブを自立的に決定することができる。   According to the seventh aspect of the present invention, when the job processing means distributes the job for which the process definition information is specified, the own job processing means is based on the number of jobs for each process definition information accumulated in the job queue. Can independently determine the job to be processed.

本発明に係る分散処理システムの一実施の形態を示した全体構成図である。1 is an overall configuration diagram showing an embodiment of a distributed processing system according to the present invention. 本実施の形態におけるジョブ管理サーバ及びジョブ実行サーバのハードウェア構成の一例を示した図である。It is the figure which showed an example of the hardware constitutions of the job management server and job execution server in this Embodiment. 本実施の形態における分散処理システムのうちクラウド側のブロック構成の一例を示した図である。It is the figure which showed an example of the block configuration by the side of the cloud among the distributed processing systems in this Embodiment. 本実施の形態におけるジョブキューに登録されるジョブに関する情報のデータ構成例を示した図である。It is a figure showing an example of data composition of information about a job registered in a job queue in this embodiment. 本実施の形態におけるジョブ処理部テーブル記憶部に設定されるジョブ処理部テーブルのデータ構成例を示した図である。It is the figure which showed the example of a data structure of the job process part table set to the job process part table memory | storage part in this Embodiment. 本実施の形態におけるフロー多重度テーブル記憶部に設定されるフロー多重度テーブルのデータ構成例を示した図である。It is the figure which showed the data structural example of the flow multiplicity table set to the flow multiplicity table memory | storage part in this Embodiment. 本実施の形態におけるジョブ処理部が行うジョブの実行処理を示したフローチャートである。5 is a flowchart illustrating job execution processing performed by a job processing unit according to the present embodiment. 本実施の形態においてコンシステント・ハッシュ法に基づく円周上にジョブ処理部及びフローをマッピングする手順及びジョブ処理部に対するフローの振分状態を示した図である。It is the figure which showed the procedure which maps a job processing part and a flow on the circumference based on the consistent hash method in this Embodiment, and the distribution state of the flow with respect to a job processing part. 本実施の形態におけるジョブ管理サーバ側の処理を示したフローチャートである。5 is a flowchart showing processing on the job management server side in the present embodiment. 本実施の形態においてジョブ数の増加に伴いコンシステント・ハッシュ法に基づく円周上にフローの複製及びジョブ処理部をマッピングする順番を示した図である。It is the figure which showed the order which maps the replication of a flow and a job process part on the circumference based on the consistent hash method with the increase in the number of jobs in this Embodiment. 本実施の形態におけるジョブとジョブ処理部との関係を示した図である。It is the figure which showed the relationship between the job and job processing part in this Embodiment. 本実施の形態において待ちジョブ数の減少に伴いコンシステント・ハッシュ法に基づく円周上にマッピングされたフローの複製及びジョブ処理部を削除する順番を示した図である。It is the figure which showed the order which deletes the replication of the flow mapped on the circumference based on the consistent hash method, and the job process part according to the reduction | decrease in the number of waiting jobs in this Embodiment.

以下、図面に基づいて、本発明の好適な実施の形態について説明する。   Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.

図1は、本発明に係る分散処理システムの一実施の形態を示した全体構成図である。図1には、ジョブの実行を要求する装置の一例として設けられている画像形成装置1と、クラウド2の一部を構成するジョブ管理サーバ10及びジョブ実行サーバ5が示されている。画像形成装置1は、スキャン機能、コピー機能、ネットワーク機能等が搭載されたコンピュータ内蔵の装置であり、ユーザの操作指示に応じてジョブをクラウド2へ投入することでジョブの実行を要求する。ジョブ管理サーバ10は、クラウド2に向けて送られてきたジョブの実行要求を受け付け、その受け付けたジョブの管理を行う。ジョブ実行サーバ5は、ジョブ管理サーバ10が受け付けたジョブを実行する。   FIG. 1 is an overall configuration diagram showing an embodiment of a distributed processing system according to the present invention. FIG. 1 shows an image forming apparatus 1 provided as an example of an apparatus that requests job execution, and a job management server 10 and a job execution server 5 that constitute a part of the cloud 2. The image forming apparatus 1 is an apparatus with a built-in computer equipped with a scan function, a copy function, a network function, and the like, and requests execution of a job by submitting the job to the cloud 2 in accordance with a user operation instruction. The job management server 10 receives a job execution request sent to the cloud 2 and manages the received job. The job execution server 5 executes the job received by the job management server 10.

図2は、本実施の形態におけるジョブ管理サーバ10のハードウェア構成の一例を示した図である。本実施の形態においてジョブ管理サーバ10を形成するサーバコンピュータは、従前から存在する汎用的なハードウェア構成で実現できる。すなわち、コンピュータは、図2に示したようにCPU61、ROM62、RAM63、ハードディスクドライブ(HDD)64を接続したHDDコントローラ65、通信手段として設けられたネットワークコントローラ66を内部バス67に接続して構成される。なお、図示していないが、入力手段としてマウスとキーボード、表示装置としてディスプレイをそれぞれ接続する入出力コントローラを内部バス67に接続して構成してもよい。   FIG. 2 is a diagram illustrating an example of a hardware configuration of the job management server 10 according to the present embodiment. In this embodiment, the server computer forming the job management server 10 can be realized by a general-purpose hardware configuration that has existed in the past. That is, the computer is configured by connecting the CPU 61, the ROM 62, the RAM 63, the HDD controller 65 to which the hard disk drive (HDD) 64 is connected, and the network controller 66 provided as a communication means to the internal bus 67 as shown in FIG. The Although not shown, an input / output controller for connecting a mouse and a keyboard as input means and a display as a display device may be connected to the internal bus 67.

ジョブ実行サーバ5もジョブ管理サーバ10と同じサーバコンピュータであることから、ジョブ実行サーバ5のハードウェアをジョブ管理サーバ10と同じように構成してもよい。   Since the job execution server 5 is also the same server computer as the job management server 10, the hardware of the job execution server 5 may be configured in the same way as the job management server 10.

図3は、本実施の形態における分散処理システムのうちクラウド2側のブロック構成の一例を示した図である。図3において、ジョブ管理サーバ10は、ジョブ受付部11、ジョブ管理部12、ジョブ処理部監視部13、ジョブキュー監視部14、オートスケーラ15、ジョブキュー16、ジョブ処理部テーブル記憶部17及びフロー多重度テーブル記憶部18を有している。ジョブ受付部11は、投入されたジョブを受け付ける。ジョブ受付部11が受け付けるジョブには、処理対象のデータ、当該データに対して実施する一連の処理が定義された処理定義情報としてのフロー及び当該ジョブの実行を要求したユーザの識別情報(ユーザID)が少なくとも含まれている。フローには、フォルダからの取り出し、原稿のスキャン等処理対象とするデータの取込処理、イメージ加工、OCR処理、フォーマット変換等の加工処理及びファックス、印刷、電子メール等処理結果の配信処理といった一連の処理の流れ及び各処理の内容について定義されている。ジョブ管理部12は、登録手段として設けられ、ジョブ受付部11が受け付けたジョブを受け取り、当該ジョブの識別情報(ジョブID)及び当該ジョブを受け付けた受付日時を付加してジョブキュー16に登録する。ジョブ処理部監視部13は、各ジョブ処理部50が稼動しているかどうかを監視する。ジョブキュー監視部14は、ジョブキュー16に蓄積されているジョブの数を監視する。オートスケーラ15は、調整手段として設けられ、ジョブ処理部50の数を調整する。   FIG. 3 is a diagram illustrating an example of a block configuration on the cloud 2 side in the distributed processing system according to the present embodiment. 3, the job management server 10 includes a job reception unit 11, a job management unit 12, a job processing unit monitoring unit 13, a job queue monitoring unit 14, an autoscaler 15, a job queue 16, a job processing unit table storage unit 17, and a flow. A multiplicity table storage unit 18 is provided. The job reception unit 11 receives a submitted job. The job received by the job receiving unit 11 includes data to be processed, a flow as process definition information in which a series of processes to be performed on the data are defined, and identification information (user ID) of the user who has requested execution of the job ) Is included at least. The flow includes a series of processing, such as fetching from a folder, scanning of original data such as document scanning, processing such as image processing, OCR processing, format conversion, and distribution processing of processing results such as fax, printing, and e-mail. The process flow and the contents of each process are defined. The job management unit 12 is provided as a registration unit. The job management unit 12 receives a job received by the job reception unit 11, adds the identification information (job ID) of the job and the reception date / time when the job is received, and registers the job in the job queue 16. . The job processing unit monitoring unit 13 monitors whether each job processing unit 50 is operating. The job queue monitoring unit 14 monitors the number of jobs accumulated in the job queue 16. The autoscaler 15 is provided as an adjusting unit and adjusts the number of job processing units 50.

図4は、本実施の形態におけるジョブキュー16に登録されるジョブに関する情報のデータ構成例を示した図である。ジョブに関する情報には、ジョブ毎に、当該ジョブの識別情報(ジョブID)、当該ジョブの実行を要求したユーザの識別情報(ユーザID)、当該ジョブに指定されたフローの識別情報(フローID)、当該ジョブを受け付けた受付日時及び当該ジョブの処理対象として指定されたデータの一形態である文書が含まれている。なお、文書には、文書データそのものではなく文書データの格納先を特定する情報でもよい。   FIG. 4 is a diagram illustrating a data configuration example of information regarding jobs registered in the job queue 16 according to the present embodiment. The job-related information includes, for each job, identification information (job ID) of the job, identification information of the user who requested execution of the job (user ID), and identification information of the flow specified for the job (flow ID) , The reception date and time when the job is received and a document that is one form of data designated as the processing target of the job. The document may be information specifying the storage location of the document data, not the document data itself.

図5は、本実施の形態におけるジョブ処理部テーブル記憶部17に設定されるジョブ処理部テーブルのデータ構成例を示した図である。ジョブ処理部テーブルは、ジョブ処理部監視部13により更新される。ジョブ処理部テーブルには、ジョブ処理部50毎に、当該ジョブ処理部50の識別情報(ジョブ処理部ID)、当該ジョブ処理部50のIPアドレス及び最終稼動通知時刻が対応付けして設定される。最終稼動通知時刻には、当該ジョブ処理部50が稼働中であることを確認できた直近の時刻が設定される。   FIG. 5 is a diagram showing a data configuration example of the job processing unit table set in the job processing unit table storage unit 17 in the present embodiment. The job processing unit table is updated by the job processing unit monitoring unit 13. In the job processing unit table, the identification information (job processing unit ID) of the job processing unit 50, the IP address of the job processing unit 50, and the last operation notification time are set in association with each other for each job processing unit 50. . The latest operation notification time is set to the latest time when it can be confirmed that the job processing unit 50 is operating.

図6は、本実施の形態におけるフロー多重度テーブル記憶部18に設定されるフロー多重度テーブルのデータ構成例を示した図である。フロー多重度テーブルは、ジョブキュー監視部14により更新される。フロー多重度テーブルには、フロー毎に、当該フローの識別情報(フローID)及び多重度が対応付けして設定される。多重度には、当該フローを実行するジョブ処理部50の数が設定される。本実施の形態では、1つのフローは基本的に1つのジョブ処理部50に分担されるので、初期値として1が設定される。   FIG. 6 is a diagram showing a data configuration example of the flow multiplicity table set in the flow multiplicity table storage unit 18 in the present embodiment. The flow multiplicity table is updated by the job queue monitoring unit 14. In the flow multiplicity table, identification information (flow ID) and multiplicity of the flow are set in association with each flow. In the multiplicity, the number of job processing units 50 that execute the flow is set. In the present embodiment, one flow is basically shared by one job processing unit 50, so 1 is set as an initial value.

ジョブ管理サーバ10における各構成要素11〜15は、ジョブ管理サーバ10を形成するコンピュータと、コンピュータに搭載されたCPU61で動作するプログラムとの協調動作により実現される。また、各記憶手段16〜18は、ジョブ管理サーバ10に搭載されたHDD64あるいはRAM63にて実現される。あるいは、クラウド2内の他の記憶手段をネットワーク経由で利用してもよい。   Each component 11 to 15 in the job management server 10 is realized by a cooperative operation of a computer that forms the job management server 10 and a program that operates on the CPU 61 mounted on the computer. The storage units 16 to 18 are realized by the HDD 64 or the RAM 63 mounted on the job management server 10. Alternatively, other storage means in the cloud 2 may be used via a network.

本実施の形態では、ジョブ管理サーバ10が提供する機能を1台のサーバコンピュータにて提供するように図示したが、これに限る必要はなく、複数台のサーバコンピュータに分散して提供するように構成してもよい。   In the present embodiment, the function provided by the job management server 10 is illustrated as being provided by a single server computer. However, the present invention is not limited to this, and the functions are provided distributed to a plurality of server computers. It may be configured.

本実施の形態におけるジョブ処理部50は、仮想的なコンピュータにより実現される。1台のジョブ実行サーバ5には、1又は複数の仮想的なコンピュータが構築される。各ジョブ処理部50は、ジョブ処理手段として設けられ、ジョブキュー16に登録されたジョブのうち自己に振り分けたフローが指定されたジョブのみを処理する。ジョブ処理部50は、1つでもよいし複数でもよく、オートスケーラ15により増減される。   The job processing unit 50 in the present embodiment is realized by a virtual computer. One or a plurality of virtual computers are constructed in one job execution server 5. Each job processing unit 50 is provided as a job processing unit, and processes only jobs for which a flow assigned to itself is specified among jobs registered in the job queue 16. There may be one or more job processing units 50, and the number is increased or decreased by the autoscaler 15.

ジョブ処理部50は、振分処理部51、ジョブ取得部52、ジョブ実行部53及び制御部54を有している。振分処理部51は、ジョブ処理部50全てに共通した振分処理を実行することによってフローを各ジョブ処理部50に振り分ける。ジョブ取得部52は、処理候補とするジョブをジョブ管理サーバ10から取得する。ジョブ実行部53は、振分処理部51により自ジョブ処理部50に振り分けられたフローが指定されたジョブを実行する。制御部54は、各構成要素51〜53と連携しながらジョブ処理部50における実行制御を行う。   The job processing unit 50 includes a distribution processing unit 51, a job acquisition unit 52, a job execution unit 53, and a control unit 54. The distribution processing unit 51 distributes the flow to each job processing unit 50 by executing a distribution process common to all the job processing units 50. The job acquisition unit 52 acquires a job as a processing candidate from the job management server 10. The job execution unit 53 executes a job in which the flow assigned to the own job processing unit 50 by the distribution processing unit 51 is designated. The control unit 54 performs execution control in the job processing unit 50 in cooperation with the components 51 to 53.

ジョブ実行サーバ5における各構成要素51〜54は、ジョブ実行サーバ5を形成するコンピュータと、コンピュータに搭載されたCPU61で動作するプログラムとの協調動作により実現される。   The components 51 to 54 in the job execution server 5 are realized by a cooperative operation of a computer that forms the job execution server 5 and a program that operates on the CPU 61 mounted on the computer.

本実施の形態で用いるプログラムは、通信手段により提供することはもちろん、CD−ROMやDVD−ROM等のコンピュータ読み取り可能な記録媒体に格納して提供することも可能である。通信手段や記録媒体から提供されたプログラムはコンピュータにインストールされ、コンピュータのCPUがプログラムを順次実行することで各種処理が実現される。   The program used in this embodiment can be provided not only by communication means but also by storing in a computer-readable recording medium such as a CD-ROM or DVD-ROM. The program provided from the communication means or the recording medium is installed in the computer, and various processes are realized by the CPU of the computer sequentially executing the program.

ところで、本実施の形態におけるジョブ処理部50は、全ての種類のフローが実行可能に構成されている。従って、どのジョブをどのジョブ処理部50に振り分けても実行できるため、オートスケーリングが容易に行える。   Incidentally, the job processing unit 50 according to the present embodiment is configured to be able to execute all types of flows. Therefore, since any job can be executed even if it is distributed to which job processing unit 50, autoscaling can be easily performed.

ただ、ジョブを実行している間は、そのジョブに指定されたフローに関する情報をRAM63に保持するため、実行対象とするフローの種類が異なるジョブが増えるとRAM63を逼迫する。例えば、同じ10個のジョブを並行して実行していたとしても、それが同じフローが指定されたジョブなのか、全て異なるフローが指定されたジョブなのかによって、ジョブ処理部50におけるメモリ使用量が異なってくる。特に、対話など再開待ちのジョブのようにいつ終わるかわからないようなジョブが、種類の異なるフローでいくつも同時並行して実行されるような場合は、より顕著になる。   However, while the job is being executed, information related to the flow specified for the job is held in the RAM 63, and therefore the RAM 63 is tight when the number of jobs having different types of flows to be executed increases. For example, even if the same 10 jobs are executed in parallel, the amount of memory used in the job processing unit 50 depends on whether the same flow is specified or whether all the different flows are specified. Will be different. This is particularly noticeable when jobs that do not know when to finish, such as jobs waiting for resumption, such as dialogue, are executed in parallel in different types of flows.

そこで、本実施の形態においては、ジョブの分散処理に関しては、実行中のジョブの数に基づく負荷に基づき振り分けるのではなく、フローの種類に従ってジョブを各ジョブ処理部50に振り分けることによってジョブ処理部50のリソースを効率良く利用するようにしている。   Therefore, in the present embodiment, regarding job distribution processing, job processing units are not distributed based on the load based on the number of jobs being executed, but are distributed to the job processing units 50 according to the type of flow. 50 resources are used efficiently.

なお、ジョブ処理部50が処理するのはジョブであり、そのジョブに指定されたフローに従って処理対象のデータに対して一連の処理を実施することになる。このように、本実施の形態では、フローの種類に従ってジョブを各ジョブ処理部50に振り分けるので、説明の便宜上、ジョブ処理部50は、「指定されたフローに従ってジョブを実行する」を単に「フローを実行する」と表現する場合もある。なお、本実施の形態においてジョブに対する「処理」と「実行」とはほぼ同義である。   Note that the job processing unit 50 processes a job, and a series of processing is performed on the data to be processed in accordance with the flow specified for the job. As described above, in this embodiment, jobs are distributed to the job processing units 50 according to the type of flow. For convenience of explanation, the job processing unit 50 simply selects “execute a job according to a specified flow” as “flow”. May be expressed as "execute". In the present embodiment, “processing” and “execution” for a job are almost synonymous.

本実施の形態では、上記のように実行するフローの種類によってジョブをジョブ処理部50に振り分けることによってジョブ処理部50のリソースを効率良く利用しつつジョブの分散処理を実現する。本実施の形態では、基本的には1つのフローは1つのジョブ処理部50のみによって処理されるようにフローを振り分ける。ただ、指定されたフローに偏りが発生した場合、ジョブ数が増大したフローの実行を担当するジョブ処理部50に処理が集中してしまうことになる。   In this embodiment, job distribution processing is realized while efficiently using resources of the job processing unit 50 by distributing jobs to the job processing unit 50 according to the type of flow to be executed as described above. In the present embodiment, the flow is basically distributed so that one flow is processed by only one job processing unit 50. However, when the specified flow is biased, the processing is concentrated on the job processing unit 50 that is responsible for executing the flow with the increased number of jobs.

そこで、本実施の形態においては、ジョブキュー監視部14がジョブキュー16に蓄積されたジョブをフローの種類毎に集計し、振分処理部51は、その集計したジョブの数に応じてフローの振分先とするジョブ処理部50の数を増減させることを特徴としている。具体的には、フロー毎のジョブの数が予め決められた増加条件を満たすようになった場合には、そのフローの振分先とするジョブ処理部50の数を増やし、一方、ジョブ処理部50の数を増やした後、フロー毎のジョブの数が予め決められた増加条件を満たすようになった場合には、そのフローの振分先とするジョブ処理部50の数を減少させるようにしている。なお、振分先とするジョブ処理部50の数を増減させる各条件については追って説明する。   Therefore, in the present embodiment, the job queue monitoring unit 14 totals the jobs accumulated in the job queue 16 for each flow type, and the distribution processing unit 51 determines the flow according to the total number of jobs. It is characterized by increasing or decreasing the number of job processing units 50 as distribution destinations. Specifically, when the number of jobs for each flow satisfies a predetermined increase condition, the number of job processing units 50 to which the flow is allocated is increased, while the job processing unit After increasing the number of 50, if the number of jobs for each flow satisfies a predetermined increase condition, the number of job processing units 50 to which the flow is allocated is decreased. ing. Each condition for increasing or decreasing the number of job processing units 50 as distribution destinations will be described later.

次に、本実施の形態における動作について説明する。最初に、定期的に実施される処理について説明する。   Next, the operation in this embodiment will be described. First, processing that is performed periodically will be described.

まず、ジョブ処理部50を予め決められた数用意する。本実施の形態では、3つジョブ処理部JP1〜JP3を用意することにする。ジョブ処理部監視部13は、定期的に稼動しているかどうかを各ジョブ処理部50に対して問い合わせる。各ジョブ処理部50は、この問い合わせに応じて応答することによって自己が稼動していることを通知する。ジョブ処理部監視部13は、ジョブ処理部50からの通知を受けると、その通知したジョブ処理部50に対応したジョブ処理部テーブルにおける最終稼動通知時刻を現在時刻にて更新する。なお、応答してこないジョブ処理部50に対応する最終稼動通知時刻は更新されないままである。例えば、ジョブ処理部監視部13が5分毎に問い合わせる場合、最終稼動通知時刻に現在時刻より5分以内の時刻が設定されていれば、当該ジョブ処理部50は、稼働中であると認識され、一方、最終稼動通知時刻に現在時刻より5分より前の時刻が設定されていた場合、そのジョブ処理部50は、現時点で稼動していないと認識される。   First, a predetermined number of job processing units 50 are prepared. In the present embodiment, three job processing units JP1 to JP3 are prepared. The job processing unit monitoring unit 13 inquires each job processing unit 50 as to whether or not it is regularly operating. Each job processing unit 50 notifies that it is operating by responding to this inquiry. Upon receiving the notification from the job processing unit 50, the job processing unit monitoring unit 13 updates the last operation notification time in the job processing unit table corresponding to the notified job processing unit 50 with the current time. Note that the last operation notification time corresponding to the job processing unit 50 that has not responded remains unupdated. For example, when the job processing unit monitoring unit 13 inquires every 5 minutes, if a time within 5 minutes from the current time is set as the final operation notification time, the job processing unit 50 is recognized as operating. On the other hand, if the last operation notification time is set to a time before 5 minutes from the current time, the job processing unit 50 is recognized as not operating at the present time.

続いて、ジョブがジョブキュー16に登録されるまでの動作について説明する。   Next, an operation until a job is registered in the job queue 16 will be described.

例えば、ユーザが、画像形成装置1の操作パネルを操作することによって、フローのリストを表示させ、その中からジョブの実施に利用するフローを選択した後、原稿をスキャンさせる。このユーザ操作に応じて、画像形成装置1は、ジョブの実行要求をしたユーザを識別するユーザID、スキャン画像データ及びユーザにより指定されたフローを識別するフローIDを含むジョブを送信することによってクラウド2へ投入する。   For example, the user operates the operation panel of the image forming apparatus 1 to display a list of flows, selects a flow to be used for job execution from the list, and then scans a document. In response to this user operation, the image forming apparatus 1 transmits a job including a user ID that identifies a user who has requested execution of the job, scan image data, and a flow ID that identifies a flow specified by the user, to the cloud. 2

クラウド2におけるジョブ受付部11は、画像形成装置1からジョブが送られてくると、そのジョブを受け付け、ジョブ管理部12に渡す。ジョブ管理部12は、そのジョブにジョブを識別するジョブIDを新たに生成して割り付け、更に送られてきたジョブに含まれているユーザID、ジョブを受け付けた日時及び文書(スキャン画像データ)を付加してジョブキュー16に登録する。なお、文書は、文書そのものではなく、文書の格納先を特定する情報でもよい。   When a job is sent from the image forming apparatus 1, the job reception unit 11 in the cloud 2 receives the job and passes it to the job management unit 12. The job management unit 12 newly generates and assigns a job ID for identifying the job to the job, and further includes the user ID included in the sent job, the date and time when the job was received, and the document (scanned image data). In addition, it is registered in the job queue 16. The document may not be the document itself but may be information for specifying the storage location of the document.

次に、ジョブ処理部50が行うジョブの実行処理について図7に示したフローチャートを用いて説明する。このジョブ実行処理において実施する振分処理では、Consistent Hashing(コンシステント・ハッシュ法)を使用して各ジョブ処理部50に各フローを振り分ける。この振分処理は、各ジョブ処理部50において自立的に実行されるが、振分処理に用いられる入力値及び処理内容は全て同じであるため、各ジョブ処理部50がこの振分処理を個々に実行したとしても同じ処理結果が得られるようになっている。   Next, job execution processing performed by the job processing unit 50 will be described with reference to the flowchart shown in FIG. In the distribution process performed in the job execution process, each flow is distributed to each job processing unit 50 using consistent hashing (consistent hash method). This distribution process is independently executed in each job processing unit 50. However, since all input values and processing contents used for the distribution process are the same, each job processing unit 50 performs this distribution process individually. The same processing result can be obtained even if it is executed.

ジョブを新たに実行可能な状態にあるジョブ処理部50は、ジョブキュー16からジョブを取得する(ステップ101)。続いて、ジョブ処理部50は、ジョブ処理部テーブルを参照することで(ステップ102)、現在稼動しているジョブ処理部50を認識する。具体的には、ジョブ処理部監視部13が5分毎に最終稼動通知時刻を更新する場合、振分処理部51は、現在時刻と各最終稼動通知時刻との時間差を算出し、その算出結果が5分以内であるジョブ処理部50を稼働中と判断する。ここでは、全てのジョブ処理部JP1〜JP3が稼動しているものとして説明する。振分処理部51は、各ジョブ処理部50のIPアドレスに基づいてハッシュを計算し、図8に示したようにコンシステント・ハッシュ法に基づく仮想的な円周上に各ジョブ処理部50をマッピングする(ステップ103)。本実施の形態では、各ジョブ処理部50の円周上における位置をバランス良くするため100点〜200点のハッシュを計算する。図8(a)において丸数字はジョブ処理部50を表し、各数字1〜3が各ジョブ処理部JP1〜JP3に対応している。   The job processing unit 50 in a state where the job can be newly executed acquires the job from the job queue 16 (step 101). Subsequently, the job processing unit 50 recognizes the job processing unit 50 that is currently operating by referring to the job processing unit table (step 102). Specifically, when the job processing unit monitoring unit 13 updates the final operation notification time every 5 minutes, the distribution processing unit 51 calculates the time difference between the current time and each final operation notification time, and the calculation result Is determined to be operating. Here, it is assumed that all job processing units JP1 to JP3 are operating. The distribution processing unit 51 calculates a hash based on the IP address of each job processing unit 50, and each job processing unit 50 is placed on a virtual circumference based on the consistent hash method as shown in FIG. Mapping is performed (step 103). In the present embodiment, a hash of 100 to 200 points is calculated in order to improve the balance of the positions of the job processing units 50 on the circumference. In FIG. 8A, the circled numbers represent the job processing unit 50, and the numbers 1 to 3 correspond to the job processing units JP1 to JP3.

なお、本実施の形態では、異なるハッシュ値が算出されるように、各ジョブ処理部50におけるユニークな情報としてIPアドレスを用いるようにした。本実施の形態では、各ジョブ処理部50のIPアドレスをジョブ処理部テーブルに登録しておき、このテーブルから取得するようにした。ただ、各ジョブ処理部50にユニークな情報としては、他の情報を用いてもよい。また、ユニークな情報の取得先を内部に保持しておいてもよいし、ジョブ処理部テーブル以外から取得してもよい。   In this embodiment, the IP address is used as unique information in each job processing unit 50 so that different hash values are calculated. In the present embodiment, the IP address of each job processing unit 50 is registered in the job processing unit table and obtained from this table. However, other information may be used as information unique to each job processing unit 50. Further, the acquisition destination of unique information may be held inside, or may be acquired from other than the job processing unit table.

続いて、振分処理部51は、フロー多重度テーブルを参照し(ステップ103)、各フローのフローIDをキーとしてハッシュを計算し、図8(b)に示したように各ジョブ処理部50がマッピングされた円周上に各フローをマッピングする(ステップ104)。図8(b)において丸英字はフローを表し、各英字A〜Eが各フローA〜Eに対応している。   Subsequently, the distribution processing unit 51 refers to the flow multiplicity table (step 103), calculates a hash using the flow ID of each flow as a key, and each job processing unit 50 as shown in FIG. 8B. Each flow is mapped on the circumference to which is mapped (step 104). In FIG. 8B, a circled letter represents a flow, and each letter A to E corresponds to each flow A to E.

以上の処理によって図8(b)に示したように各ジョブ処理部JP1〜JP3及び各フローA〜Eが同じ仮想的な円周上にマッピングされる。コンシステント・ハッシュ法によると、どのフローがどのジョブ処理部50に振り分けられるかということは、円周上の各フローを時計方向に動かせばよいことになっている。つまり、各フローは、自己より大きいハッシュ値であり、かつ最も近い値のジョブ処理部50に振り分けられることになるので、図8(b)に示した例によると、フローA,Bはジョブ処理部JP1に、フローC,Dはジョブ処理部JP2に、フローEはジョブ処理部JP3に、それぞれ振り分けられる。   Through the above processing, as shown in FIG. 8B, the job processing units JP1 to JP3 and the flows A to E are mapped on the same virtual circumference. According to the consistent hash method, which flow is assigned to which job processing unit 50 is determined by moving each flow on the circumference in the clockwise direction. That is, each flow has a hash value larger than that of itself and is distributed to the job processing unit 50 having the closest value. Therefore, according to the example shown in FIG. Flows C and D are assigned to job processing unit JP2 and flow E is assigned to job processing unit JP3.

以上のように、自己が担当するフローが決定されると、制御部54は、ステップ101において取得したジョブに指定されたフローを参照して、そのジョブが実行対象であるかどうかを判定する。例えば、ジョブ処理部JP1において、取得したジョブのフローがフローAでもフローBでもなければ(ステップ106でN)、自己の実行対象でないジョブを取得していたと判断して、そのジョブを実行せずにジョブキュー16に登録されている次のジョブを取得しにいく(ステップ101)。   As described above, when the flow in charge is determined, the control unit 54 refers to the flow specified for the job acquired in step 101 and determines whether the job is an execution target. For example, in the job processing unit JP1, if the acquired job flow is neither flow A nor flow B (N in step 106), it is determined that a job that is not the subject of execution is acquired, and the job is not executed. Next, the next job registered in the job queue 16 is acquired (step 101).

一方、取得したジョブのフローがフローA又はフローBであれば(ステップ106でY)、制御部54は、実行対象のジョブを取得していたと判断して、そのジョブの実行をジョブ実行部53に指示し、ジョブ実行部53は、この指示に応じてジョブの実行を開始する(ステップ107)。そして、制御部54は、ジョブ管理部12に削除指示を送ることによって、ジョブキュー16に登録されている当該ジョブを削除させる(ステップ108)。なお、ジョブキュー16からのジョブの取得、削除等ジョブ管理部12が実施するジョブ管理自体は、従前と同じ方法でよい。   On the other hand, if the flow of the acquired job is flow A or flow B (Y in step 106), the control unit 54 determines that the job to be executed has been acquired, and executes the job to the job execution unit 53. The job execution unit 53 starts executing the job in response to this instruction (step 107). Then, the control unit 54 deletes the job registered in the job queue 16 by sending a deletion instruction to the job management unit 12 (step 108). Note that the job management itself performed by the job management unit 12 such as acquisition and deletion of jobs from the job queue 16 may be the same method as before.

本実施の形態では、以上のようにジョブを取得する度に各ジョブ処理部50及び各フローを同じ円周上に自動的にマッピングするようにした。各ジョブ処理部50をジョブを取得する度に各ジョブ処理部50をマッピングするようにしたのは、第一に、ジョブを取得してから次のジョブを取得するまでの間にジョブ処理部50が増減した場合に対処するためである。仮に、図8(b)に示した状態からフローの種類が変わらずにジョブ処理部JP3が削除された場合、フローEはジョブ処理部JP3に代わってジョブ処理部JP1により実行されることになる。第二に、ジョブを取得してから次のジョブを取得するまでの間に新たなフローが追加された場合、そのフローを担当するジョブ処理部50を決定する必要があるためである。このように、ジョブ処理部50及びフローの増減に対応するために、本実施の形態では、ジョブを取得する度に各マッピング処理を実施することにしている。   In the present embodiment, each job processing unit 50 and each flow is automatically mapped on the same circumference every time a job is acquired as described above. The reason why each job processing unit 50 is mapped each time the job processing unit 50 acquires a job is that the job processing unit 50 is first acquired from the time the job is acquired until the next job is acquired. This is to cope with the case where the increase or decrease occurs. If the job processing unit JP3 is deleted without changing the flow type from the state shown in FIG. 8B, the flow E is executed by the job processing unit JP1 instead of the job processing unit JP3. . Second, when a new flow is added between the time when a job is acquired and the time when the next job is acquired, it is necessary to determine the job processing unit 50 responsible for that flow. As described above, in order to cope with increase / decrease in the job processing unit 50 and the flow, in the present embodiment, each mapping process is performed every time a job is acquired.

もちろん、この手法に限定する必要はない。例えば、現時点におけるジョブ処理部テーブル及びフロー多重度テーブルの設定内容を一時保持しておき、ジョブを取得する度に一時保持しておいた設定内容と新たに取得したジョブ処理部テーブル及びフロー多重度テーブルの設定内容とに差異が生じたときにハッシュ計算をして各ジョブ処理部50及び各フローを円周上にマッピングするようにしてもよい。   Of course, it is not necessary to limit to this method. For example, the setting contents of the current job processing unit table and flow multiplicity table are temporarily stored, and the setting content temporarily stored every time a job is acquired, the newly acquired job processing unit table and flow multiplicity When there is a difference between the setting contents of the table, hash calculation may be performed to map each job processing unit 50 and each flow on the circumference.

ところで、ジョブキュー16に蓄積されたジョブがいずれかのジョブ処理部50により取り出され実行されていく消費速度よりジョブキュー16で実行されずに待ち状態となっているジョブの数(以下、単に「待ちジョブ数」とも称する)が増えていく増加速度が相対的に速ければ、ジョブキュー16には、待ちジョブ数が増えていくことになる。また、あるフロー(例えばフローA)を実行するジョブ処理部JP1におけるジョブの消費速度よりフローAが指定されたジョブの増える増加速度が相対的に速ければ、ジョブキュー16には、フローAの待ちジョブ数が増えていくことになる。本実施の形態では、1つのフローを1つのジョブ処理部50で実行させることを基本としているので、このフローAの待ちジョブ数の増加は、ジョブ処理部JP1における負荷の増大のみを招くことになる。これを解消するためには、ジョブ処理部JP1に加えて他のジョブ処理部50をフローAの分担先として追加して対応することが考えられる。フローの分担先を追加するためには、図8に示した円周上にフローAの複製を作成し、このフローAの複製が現時点で分担先となっているジョブ処理部JP1以外のジョブ処理部50に振り分けられるようにマッピングすればよい。この「フローの複製」は、フローの分担先を追加することと同義である。例えば、フローAの複製を、ジョブ処理部JP1が担当とはならない円周上の位置にマッピングすることで、フローAを実行するジョブ処理部50の数を増やすことになる。これにより、ジョブ処理部JP1にかかる負荷は軽減される。このフローの複製においても負荷の増加が解消できない場合、本実施の形態では、そのときにはじめてスケールアウトによりジョブ処理部50の数を増やして負荷分散を行うようにしている。   By the way, the number of jobs that are not executed in the job queue 16 and are in a waiting state (hereinafter simply referred to as “ If the rate of increase in which the “number of waiting jobs” increases is relatively high, the number of waiting jobs will increase in the job queue 16. Further, if the increasing rate of the job for which the flow A is designated is relatively higher than the job consumption rate in the job processing unit JP1 that executes a certain flow (for example, the flow A), the job queue 16 waits for the flow A. The number of jobs will increase. In the present embodiment, since one flow is executed by one job processing unit 50, the increase in the number of waiting jobs in this flow A only causes an increase in load in the job processing unit JP1. Become. In order to solve this problem, it can be considered that another job processing unit 50 is added as a sharing destination of the flow A in addition to the job processing unit JP1. In order to add a flow sharing destination, a copy of flow A is created on the circumference shown in FIG. 8, and job processing other than the job processing unit JP1 to which this flow A copy is currently assigned Mapping may be performed so as to be distributed to the unit 50. This “duplication of flow” is synonymous with adding a flow sharing destination. For example, the number of job processing units 50 that execute the flow A is increased by mapping the copy of the flow A to a position on the circumference that the job processing unit JP1 is not in charge of. As a result, the load on the job processing unit JP1 is reduced. In the present embodiment, when the increase in load cannot be eliminated even by duplication of this flow, the load distribution is performed by increasing the number of job processing units 50 by scale-out for the first time at this time.

図9は、本実施の形態におけるジョブ管理サーバ10側の処理を示したフローチャートであるが、以下、実行待ちのジョブが増えることによって行うフローの複製及びスケールアウト等ジョブ負荷の分散処理について、図7及び図9に示したフローチャートを用いて説明する。なお、本実施の形態では、図9では、処理を定期的に繰り返し実行することを想定して、処理をその都度終了させるように図示したが、処理を終了させずに常時起動した状態にて(つまり、ステップ201に戻るように)処理を繰り返し実行するようにしてもよい。また、ここでは、図10(a)に示したように3つのジョブ処理部JP1〜JP3が稼動し、5つのフローA〜Eが使用されているものとして説明する。なお、図10(a)は図8(b)と同じ図である。   FIG. 9 is a flowchart showing processing on the job management server 10 side in this embodiment. Hereinafter, distributed processing of job load such as duplication of flow and scale-out performed when the number of jobs waiting to be executed increases. 7 and the flowchart shown in FIG. In the present embodiment, in FIG. 9, it is illustrated that the process is terminated every time assuming that the process is periodically repeated. However, in the state where the process is always started without being terminated. The process may be repeatedly executed (that is, return to step 201). Also, here, it is assumed that three job processing units JP1 to JP3 are operating and five flows A to E are used as shown in FIG. FIG. 10A is the same as FIG. 8B.

ジョブキュー監視部14は、ジョブキュー16へのジョブの蓄積状況を監視するためにジョブの蓄積状況を取得する(ステップ201)。具体的には、待ちジョブ数をフロー毎に求める。そして、あるフローの待ちジョブ数が予め決められたフロー複製条件(増加条件)、例えば一定期間(例えば10分間)待ちジョブ数が10という閾値を超えていた状態が続いたというフロー複製条件を満たした場合(ステップ202でY)、フロー多重度テーブルにおける当該フローの多重度に1を加算する(ステップ206)。なお、ここでは、フローAがはじめてフロー複製条件に合致したものとする。すなわち、ステップ203でNと判断され、フローAのフロー多重度が2に更新されたものとする。   The job queue monitoring unit 14 acquires the job accumulation status in order to monitor the job accumulation status in the job queue 16 (step 201). Specifically, the number of waiting jobs is obtained for each flow. And, the number of waiting jobs for a certain flow satisfies a predetermined flow duplication condition (increase condition), for example, the flow duplication condition that the number of waiting jobs for a certain period (for example, 10 minutes) continues to exceed the threshold of 10. If this is the case (Y in step 202), 1 is added to the multiplicity of the flow in the flow multiplicity table (step 206). Here, it is assumed that the flow A matches the flow duplication condition for the first time. That is, it is determined that N is determined in step 203 and the flow multiplicity of the flow A is updated to 2.

図7において、ジョブ処理部50における振分処理部51は、ジョブ取得部52によりジョブが取得された後(ステップ101)、ジョブ処理部テーブルを参照して(ステップ102)、各ジョブ処理部50を円周上にマッピングする(ステップ103)。ここでは、ジョブ処理部JP1〜JP3とも稼動しているので、図8(a)に示したように、各ジョブ処理部JP1〜JP3は円周上にマッピングされる。   In FIG. 7, the distribution processing unit 51 in the job processing unit 50 refers to the job processing unit table (step 102) after the job is acquired by the job acquisition unit 52 (step 101), and each job processing unit 50. Are mapped on the circumference (step 103). Here, since the job processing units JP1 to JP3 are also operating, as shown in FIG. 8A, the job processing units JP1 to JP3 are mapped on the circumference.

続いて、振分処理部51は、フロー多重度テーブルを参照すると(ステップ104)、フローAの多重度は2になっている。ここで、フロー多重度が1の場合の各フローのマッピングは、前述したとおりフローAも含めて各フローのフローIDをキーとしてハッシュを計算し、円周上に各フローをマッピングする(ステップ105)。この状態を図10(a)に示す。フローの複製が行われたことでフロー多重度が2の場合、振分処理部51は、更に当該フローのフローIDを入力とするフロー多重度2用の所定の計算を行うことで、当該フローIDとは異なる値となるキーを生成する。そして、新たに生成したキーに基づきハッシュ計算を実行し、円周上にマッピングする(ステップ105)。この複製されたフローA71が円周上にマッピングされたときの状態を図10(b)に示す。図10(b)の例に従うと、複製によるフローA(以下、「複製フローA」)71は、複製フローA71より大きく、かつ最も近いジョブ処理部JP3に振り分けられたことになる。換言すると、フローIDを入力としてキーを生成するフロー多重度2用の所定の計算は、ハッシュ計算によりフローAがジョブ処理部JP1以外に分担されるようにキーを生成する必要がある。この後の処理(ステップ106〜108)については、すでに説明しているので、ここでの説明は省略する。   Subsequently, when the distribution processing unit 51 refers to the flow multiplicity table (step 104), the multiplicity of the flow A is 2. Here, mapping of each flow when the flow multiplicity is 1 calculates a hash using the flow ID of each flow including the flow A as a key as described above, and maps each flow on the circumference (step 105). ). This state is shown in FIG. If the flow multiplicity is 2 because the flow is duplicated, the distribution processing unit 51 further performs a predetermined calculation for the flow multiplicity 2 with the flow ID of the flow as an input, so that the flow A key having a value different from the ID is generated. Then, hash calculation is performed based on the newly generated key, and mapping is performed on the circumference (step 105). FIG. 10B shows a state when the duplicated flow A71 is mapped on the circumference. According to the example of FIG. 10B, the duplication flow A (hereinafter, “duplication flow A”) 71 is allocated to the closest job processing unit JP3 which is larger than the duplication flow A71. In other words, the predetermined calculation for the flow multiplicity 2 that generates a key with the flow ID as an input needs to generate a key so that the flow A is shared with other than the job processing unit JP1 by hash calculation. Since the subsequent processing (steps 106 to 108) has already been described, description thereof is omitted here.

なお、ジョブ管理サーバ10において、フロー多重度テーブルにおける当該フローの多重度に1を加算する処理(ステップ206)の後の処理(ステップ207〜211)については、追って説明する。   In the job management server 10, a process (steps 207 to 211) subsequent to the process of adding 1 to the multiplicity of the flow in the flow multiplicity table (step 206) will be described later.

図11は、本実施の形態におけるジョブとジョブ処理部50との関係を示した図である。図11には、ジョブキューに未だ実行されずに蓄積されているジョブと各ジョブ処理部50に振り分けられて実行中のジョブとが示されている。図11において、各ジョブは、当該ジョブに指定されたフローのフローIDに登録順に連続番号が付加され識別される。図11(a)には、図10(a)に対応したジョブの状態が示されている。図11(a)によると、ジョブ処理部JP1にはA1、A2、B1、A3が振り分けられ実行中である。ジョブ処理部JP2にはD3、D4、C1が振り分けられ実行中である。ジョブ処理部JP3にはE1が振り分けられ実行中である。そして、ジョブキューには、A4、A5、...、A15が蓄積されている。このフローの複製が行われる前の段階では、図10(a)に示したように、ジョブ処理部JP1にはフローAとフローBが振り分けられ、ジョブ処理部JP2にはフローCとフローDが振り分けられ、ジョブ処理部JP3にはフローEが振り分けられる。   FIG. 11 is a diagram illustrating a relationship between a job and the job processing unit 50 in the present embodiment. FIG. 11 shows jobs that have not yet been executed in the job queue and are accumulated and jobs that are being distributed to the job processing units 50 and are being executed. In FIG. 11, each job is identified by adding a serial number to the flow ID of the flow designated for the job in the order of registration. FIG. 11A shows the job status corresponding to FIG. According to FIG. 11A, A1, A2, B1, and A3 are assigned to the job processing unit JP1 and are being executed. D3, D4, and C1 are allocated to the job processing unit JP2 and are being executed. E1 is assigned to the job processing unit JP3 and is being executed. In the job queue, A4, A5,. . . , A15 are accumulated. Prior to the duplication of the flow, as shown in FIG. 10A, the flow A and the flow B are distributed to the job processing unit JP1, and the flow C and the flow D are distributed to the job processing unit JP2. The flow E is distributed to the job processing unit JP3.

そして、フローAの複製が作成され、図10(b)に示したように円周上にマッピングされると、図11(b)に示したように、フローAが指定されたジョブ(A4)76は、ジョブ処理部JP3においても実行されるようになる。   Then, when a copy of the flow A is created and mapped on the circumference as shown in FIG. 10B, the job (A4) in which the flow A is designated as shown in FIG. 11B. No. 76 is also executed in the job processing unit JP3.

ジョブ管理サーバ10におけるジョブキュー監視部14は、ジョブキュー16へのジョブの蓄積状況を監視するためにジョブの蓄積状況を取得し、待ちジョブ数をフロー毎に求めたところ(ステップ201)、今なお一定期間、フローAの待ちジョブ数が10を超えていた場合というフロー複製条件を満たしているとすると(ステップ202でY)、この段階では、全てのジョブ処理部50(具体的には、ジョブ処理部JP2)にフローAが分担されていないので(ステップ203でN)、フロー多重度テーブルにおける当該フローの多重度に1を加算する(ステップ206)。これにより、フローAのフロー多重度は3に更新される。   The job queue monitoring unit 14 in the job management server 10 acquires the job accumulation status in order to monitor the job accumulation status in the job queue 16, and obtains the number of waiting jobs for each flow (step 201). If the flow duplication condition that the number of waiting jobs in flow A has exceeded 10 for a certain period of time is satisfied (Y in step 202), all job processing units 50 (specifically, Since the flow A is not shared by the job processing unit JP2) (N in step 203), 1 is added to the multiplicity of the flow in the flow multiplicity table (step 206). As a result, the flow multiplicity of the flow A is updated to 3.

図7において、ジョブ処理部50における振分処理部51は、ジョブ取得部52によりジョブが取得された後(ステップ101)、ジョブ処理部テーブルを参照して(ステップ102)、各ジョブ処理部50を円周上にマッピングする(ステップ103)。ここでは、ジョブ処理部JP1〜JP3とも稼動しているので、図8(a)に示したように、各ジョブ処理部JP1〜JP3は円周上にマッピングされる。   In FIG. 7, the distribution processing unit 51 in the job processing unit 50 refers to the job processing unit table (step 102) after the job is acquired by the job acquisition unit 52 (step 101), and each job processing unit 50. Are mapped on the circumference (step 103). Here, since the job processing units JP1 to JP3 are also operating, as shown in FIG. 8A, the job processing units JP1 to JP3 are mapped on the circumference.

続いて、振分処理部51は、フロー多重度テーブルを参照すると(ステップ104)、フローAの多重度は3になっている。そこで、振分処理部51は、まずフロー多重度が1の場合の各フローのマッピングを行う。すなわち、各フローA〜EのフローIDをキーとしてハッシュを計算し、円周上に各フローをマッピングする(ステップ105)。この状態を図10(a)に示す。続いて、振分処理部51は、前述したフロー多重度2用の所定の計算を行うことで、当該フローIDとは異なる値となるキーを生成し、その新たに生成したキーに基づきハッシュ計算を実行し、円周上にマッピングする(ステップ105)。この複製されたフローA71が円周上にマッピングされたときの状態を図10(b)に示す。振分処理部51は、更に当該フローのフローIDを入力とするフロー多重度3用の所定の計算を行うことで、当該フローID及びフロー多重度2の際に求めたキーとは異なる値となるキーを生成する。そして、新たに生成したキーに基づきハッシュ計算を実行し、円周上にマッピングする(ステップ105)。この複製されたフローA72が円周上にマッピングされたときの状態を図10(c)に示す。図10(c)の例に従うと、複製フローA72は、複製フローA72より大きく、かつ最も近いジョブ処理部JP2に振り分けられたことになる。換言すると、フローIDを入力としてキーを生成するフロー多重度3用の所定の計算は、ハッシュ計算によりフローAがすでに分担されているジョブ処理部JP1及びジョブ処理部JP3以外に分担されるようにキーを生成する必要がある。この後の処理(ステップ106〜108)については、すでに説明しているので、ここでの説明は省略する。   Subsequently, when the distribution processing unit 51 refers to the flow multiplicity table (step 104), the multiplicity of the flow A is 3. Therefore, the distribution processing unit 51 first maps each flow when the flow multiplicity is 1. That is, a hash is calculated using the flow IDs of the flows A to E as keys, and each flow is mapped on the circumference (step 105). This state is shown in FIG. Subsequently, the distribution processing unit 51 generates a key having a value different from the flow ID by performing the predetermined calculation for the flow multiplicity 2 described above, and performs a hash calculation based on the newly generated key. To map on the circumference (step 105). FIG. 10B shows a state when the duplicated flow A71 is mapped on the circumference. The distribution processing unit 51 further performs a predetermined calculation for the flow multiplicity 3 with the flow ID of the flow as an input, thereby obtaining a value different from the key obtained for the flow ID and the flow multiplicity 2. Generate a key. Then, hash calculation is performed based on the newly generated key, and mapping is performed on the circumference (step 105). FIG. 10C shows a state when the duplicated flow A72 is mapped on the circumference. According to the example of FIG. 10C, the duplication flow A72 is allocated to the closest job processing unit JP2 which is larger than the duplication flow A72. In other words, the predetermined calculation for flow multiplicity 3, which generates a key with the flow ID as an input, is shared by other than the job processing unit JP1 and job processing unit JP3 to which flow A has already been shared by hash calculation. You need to generate a key. Since the subsequent processing (steps 106 to 108) has already been described, description thereof is omitted here.

この結果、図11(c)に示したように、フローAが指定されたジョブ(A13)77は、ジョブ処理部JP2においても実行されるようになる。   As a result, as shown in FIG. 11C, the job (A13) 77 in which the flow A is designated is also executed in the job processing unit JP2.

以上の処理を繰り返すことで、フローAは、複数のジョブ処理部50により実行されることになり、フローAの待ちジョブ数がフロー複製条件を満たした状態が解消されなければ、上記のようにフローAを振り分けるジョブ処理部50の数が増加され、最終的に全てのジョブ処理部JP1〜JP3に分担されることになる。   By repeating the above processing, the flow A is executed by a plurality of job processing units 50. If the state where the number of waiting jobs of the flow A satisfies the flow duplication condition is not resolved, as described above The number of job processing units 50 to which the flow A is distributed is increased, and is eventually shared by all the job processing units JP1 to JP3.

ジョブ管理サーバ10におけるジョブキュー監視部14は、ジョブキュー16へのジョブの蓄積状況を監視するためにジョブの蓄積状況を取得し、待ちジョブ数をフロー毎に求めたところ(ステップ201)、フローAがフロー複製条件を満たしたとする。この場合(ステップ202でY)、ジョブキュー監視部14は、続いて全てのジョブ処理部50にフローAが複製されているかを確認する。これは、稼働中のジョブ処理部50の数とフロー多重度の値とを比較することで確認してもよい。全てのジョブ処理部50にフローAが複製されている場合(ステップ203でY)、この段階ではじめてスケールアウトを実施する。すなわち、フローAがフロー複製条件を満たし、かつ全てのジョブ処理部50に複製されたという、予め決められた第一のジョブ処理部増加条件を満たすことによって、ジョブキュー監視部14がスケールアウトをオートスケーラ15に指示すると、オートスケーラ15は、この指示に応じてスケールアウトを行う(ステップ204)。また、ジョブ処理部監視部13は、ジョブ処理部テーブルに新たに生成されるジョブ処理部に関するレコードを追加する更新を行う(ステップ205)。ここでは、ジョブ処理部JP4を追加したものとし、最終稼動通知時刻には現在時刻を設定する。続いて、ジョブキュー監視部14は、フロー多重度テーブルにおける当該フローの多重度に1を加算する(ステップ206)。これにより、フローAのフロー多重度は4に更新される。   The job queue monitoring unit 14 in the job management server 10 acquires the job accumulation status in order to monitor the job accumulation status in the job queue 16, and obtains the number of waiting jobs for each flow (step 201). Assume that A satisfies the flow replication condition. In this case (Y in step 202), the job queue monitoring unit 14 subsequently checks whether or not the flow A is copied to all the job processing units 50. This may be confirmed by comparing the number of active job processing units 50 with the value of the flow multiplicity. When the flow A is duplicated in all the job processing units 50 (Y in Step 203), the scale-out is performed only at this stage. That is, the job queue monitoring unit 14 performs the scale-out by satisfying the predetermined first job processing unit increase condition that the flow A satisfies the flow duplication condition and has been copied to all the job processing units 50. When the autoscaler 15 is instructed, the autoscaler 15 scales out in accordance with this instruction (step 204). Further, the job processing unit monitoring unit 13 performs an update for adding a record relating to a newly generated job processing unit to the job processing unit table (step 205). Here, the job processing unit JP4 is added, and the current time is set as the final operation notification time. Subsequently, the job queue monitoring unit 14 adds 1 to the multiplicity of the flow in the flow multiplicity table (step 206). As a result, the flow multiplicity of the flow A is updated to 4.

図7において、ジョブ処理部50における振分処理部51は、ジョブ取得部52によりジョブが取得された後(ステップ101)、ジョブ処理部テーブルを参照して(ステップ102)、各ジョブ処理部50を円周上にマッピングする(ステップ103)。このとき、振分処理部51は、ジョブ処理部JP1〜JP4が稼動していると認識し、図10(d)に示したように、ジョブ処理部JP1〜JP3に加え、符号74で表したジョブ処理部JP4を円周上にマッピングする。   In FIG. 7, the distribution processing unit 51 in the job processing unit 50 refers to the job processing unit table (step 102) after the job is acquired by the job acquisition unit 52 (step 101), and each job processing unit 50. Are mapped on the circumference (step 103). At this time, the distribution processing unit 51 recognizes that the job processing units JP1 to JP4 are operating, and as shown in FIG. 10D, the distribution processing unit 51 is represented by reference numeral 74 in addition to the job processing units JP1 to JP3. The job processing unit JP4 is mapped on the circumference.

続いて、振分処理部51は、フロー多重度テーブルを参照すると(ステップ104)、フローAの多重度は4になっている。振分処理部51は、フロー多重度テーブルの設定内容を参照に円周上に各フローをマッピングするが、フローB〜E及びフローAの多重度が1から3までの処理は上記と同様なので説明を省略する。   Subsequently, when the distribution processing unit 51 refers to the flow multiplicity table (step 104), the multiplicity of the flow A is 4. The distribution processing unit 51 maps each flow on the circumference with reference to the setting contents of the flow multiplicity table. However, the processing of the multiplicity of flows B to E and flow A from 1 to 3 is the same as described above. Description is omitted.

更に、振分処理部51は、前述したように当該フローのフローIDを入力とするフロー多重度4用の所定の計算を行うことで、当該フローIDとは異なる値となるキーを生成する。振分処理部51は、フロー多重度4用の所定の計算を行うことで、当該フローID、フロー多重度2及びフロー多重度3の際に求めたキーとは異なる値となるキーを生成する。そして、新たに生成したキーに基づきハッシュ計算を実行し、円周上にマッピングする(ステップ105)。この複製されたフローA73が円周上にマッピングされたときの状態を図10(d)に示す。図10(d)の例に従うと、複製フローA73は、複製フローA73より大きく、かつ最も近いジョブ処理部JP4に振り分けられたことになる。マッピングの位置について着目すると、複製フローA71は、多重度3のときにはジョブ処理部JP3に分担されていたが、ジョブ処理部JP4がマッピングされることによってジョブ処理部JP4に分担されたことを意味する。つまり、フローAは、ジョブ処理部JP1,JP2,JP4に振り分けられていることになる。そこで、ここでは、ジョブ処理部JP3に分担されるように複製フローA73をマッピングする必要がある。この後の処理(ステップ106〜108)については、すでに説明しているので、ここでの説明は省略する。   Further, as described above, the distribution processing unit 51 performs a predetermined calculation for the flow multiplicity 4 using the flow ID of the flow as an input, thereby generating a key having a value different from the flow ID. The distribution processing unit 51 performs a predetermined calculation for the flow multiplicity 4, thereby generating a key having a value different from the key obtained for the flow ID, the flow multiplicity 2 and the flow multiplicity 3. . Then, hash calculation is performed based on the newly generated key, and mapping is performed on the circumference (step 105). FIG. 10D shows a state when the duplicated flow A73 is mapped on the circumference. According to the example of FIG. 10D, the duplication flow A73 is assigned to the closest job processing unit JP4 which is larger than the duplication flow A73. Focusing on the mapping position, the duplication flow A71 is assigned to the job processing unit JP3 when the multiplicity is 3, but is assigned to the job processing unit JP4 by mapping the job processing unit JP4. . That is, the flow A is distributed to the job processing units JP1, JP2, and JP4. Therefore, here, it is necessary to map the duplication flow A73 so as to be shared by the job processing unit JP3. Since the subsequent processing (steps 106 to 108) has already been described, description thereof is omitted here.

このスケールアウトの結果、図11(d)に示したように、フローAが指定されたジョブ(A21)78は、ジョブ処理部JP4においても実行されるようになる。   As a result of this scale-out, as shown in FIG. 11D, the job (A21) 78 in which the flow A is designated is also executed in the job processing unit JP4.

以上のように、フローAが全てのジョブ処理部50により実行されるようになった後でもなおフローAの待ちジョブ数がフロー複製条件を満たす状態が解消されなければ、スケールアウトにより対応される。この後もフローAの待ちジョブ数がフロー複製条件を満たす状態が解消されなければ、スケールアウトが繰り返し実行される。このようにして負荷の分散が図られる。   As described above, even after the flow A is executed by all the job processing units 50, if the state where the number of waiting jobs of the flow A still satisfies the flow duplication condition is not solved, it is dealt with by scale-out. . After this, if the state where the number of waiting jobs of the flow A satisfies the flow duplication condition is not solved, the scale-out is repeatedly executed. In this way, load distribution is achieved.

上記説明したように、あるフロー(上記例ではフローA)の待ちジョブ数が増加した場合には、当該フローを実行するジョブ処理部50の数を増やすことで対応するようにした。そして、当該フローを全てのジョブ処理部50で対応してもなお待ちジョブ数が高い負荷の状態が維持される場合、すなわちフロー複製条件を満たす状態が続いた場合には、スケールアウトで対応するようにした。   As described above, when the number of waiting jobs for a certain flow (flow A in the above example) increases, the number of job processing units 50 that execute the flow is increased. Then, if the state of a load with a high number of waiting jobs is maintained even if the job is handled by all the job processing units 50, that is, if the state satisfying the flow duplication condition continues, it is handled by scale-out. I did it.

ただ、あるフローの待ちジョブ数がフロー複製条件を満たしていなくても(図9におけるステップ202でN)、ジョブキュー16における全待ちジョブ数がスケールアウト実施条件(予め決められた第二のジョブ処理部増加条件)に合致した場合、例えば一定期間(例えば10分間)全待ちジョブ数が30という閾値を超えていた状態が続いたというスケールアウト実施条件を満たした場合(ステップ212でY)、この場合もフローAを処理するジョブ処理部50全体において負荷の高い状態が続いていると判断してスケールアウトを行うようにしてもよい(ステップ204)。   However, even if the number of waiting jobs in a certain flow does not satisfy the flow duplication condition (N in step 202 in FIG. 9), the total number of waiting jobs in the job queue 16 is determined according to the scale-out execution condition (predetermined second job). When the processing unit increase condition) is met, for example, when the scale-out execution condition that the number of all waiting jobs exceeds the threshold of 30 for a certain period (for example, 10 minutes) continues (Y in step 212), Also in this case, it may be determined that the high load state continues in the entire job processing unit 50 that processes the flow A, and the scale-out may be performed (step 204).

なお、1つのフローを担当するジョブ処理部50の数を増やすためのフロー複製条件は、上記例に限らず、ジョブの種類やジョブ処理部50の性能等を考慮して適宜設定すればよい。スケールアウト実施条件においても同様である。例えば、待ちジョブ数をジョブ処理部50の数で除算した値が一定期間所定の閾値を超えた場合や実行中及び再開待ちのジョブの数が一定期間所定の閾値を超えた場合などをスケールアウト実施条件として設定してもよい。   Note that the flow duplication condition for increasing the number of job processing units 50 in charge of one flow is not limited to the above example, and may be set as appropriate in consideration of the type of job, the performance of the job processing unit 50, and the like. The same applies to the scale-out execution conditions. For example, when the value obtained by dividing the number of waiting jobs by the number of job processing units 50 exceeds a predetermined threshold for a certain period, or when the number of jobs being executed and waiting for restart exceeds a predetermined threshold for a certain period You may set as implementation conditions.

以上は、待ちジョブ数が増加した場合の対応について説明した。ここでは、上記処理の流れに従ってスケールアウトを実行した後に負荷が軽減された場合における処理について図9のステップ207〜211を用いて説明する。   The above describes the response when the number of waiting jobs increases. Here, the processing when the load is reduced after performing the scale-out according to the above-described processing flow will be described using steps 207 to 211 in FIG. 9.

現在、円周上には、図12(a)に示したようにジョブ処理部JP1〜JP4及びフローA〜Eがマッピングされているとする。なお、図12(a)は、図10(d)を同じ図である。   At present, it is assumed that job processing units JP1 to JP4 and flows A to E are mapped on the circumference as shown in FIG. 12A is the same as FIG. 10D.

ステップ201で取得したジョブキュー16の状況を参照して、複製フローの待ちジョブ数が予め決められた複製解除条件(減少条件)、例えば一定期間(例えば10分間)待ちジョブ数が5という閾値を下回った状態が続いたという複製解除条件を満たした場合(ステップ207でY)、ジョブキュー監視部14は、フロー多重度テーブルにおける当該複製フローの多重度を1減算する(ステップ208)。   With reference to the status of the job queue 16 acquired in step 201, a duplication release condition (decrease condition) in which the number of waiting jobs in the duplication flow is determined in advance, for example, a threshold that the number of waiting jobs is 5 for a certain period (for example, 10 minutes) When the copy cancellation condition that the state has been lowered is satisfied (Y in Step 207), the job queue monitoring unit 14 subtracts 1 from the multiplicity of the copy flow in the flow multiplicity table (Step 208).

図7において、ジョブ処理部50における振分処理部51は、ジョブ取得部52によりジョブが取得された後(ステップ101)、ジョブ処理部テーブルを参照して(ステップ102)、各ジョブ処理部50を円周上にマッピングする(ステップ103)。ここでは、ジョブ処理部JP1〜JP4とも稼動しているので、図12(a)に示したように、各ジョブ処理部JP1〜JP4は円周上にマッピングされる。   In FIG. 7, the distribution processing unit 51 in the job processing unit 50 refers to the job processing unit table (step 102) after the job is acquired by the job acquisition unit 52 (step 101), and each job processing unit 50. Are mapped on the circumference (step 103). Here, since the job processing units JP1 to JP4 are also operating, the job processing units JP1 to JP4 are mapped on the circumference as shown in FIG.

続いて、振分処理部51は、フロー多重度テーブルを参照すると(ステップ104)、フローAの多重度は3になっている。従って、ここでは、前述したフローAの多重度が3のときの処理を実行する(ステップ105)。つまり、多重度3のときのマッピング状態に戻るので、図12(b)に示したように図12(a)における状態から複製フロー73が削除されたようなマッピングの状態になる。   Subsequently, when the distribution processing unit 51 refers to the flow multiplicity table (step 104), the multiplicity of the flow A is 3. Therefore, here, the process when the multiplicity of the flow A is 3 is executed (step 105). That is, since the mapping state is returned to the multiplicity of 3, the mapping state is such that the replication flow 73 is deleted from the state shown in FIG. 12A as shown in FIG.

このように、複製フローが複製解除条件を満たすことによって削除される順番は、複製フロー73、複製フロー72、複製フロー71と複製された順番の逆になる。   As described above, the order in which the duplicate flow is deleted when the duplicate release condition is satisfied is the reverse of the duplicate order of the duplicate flow 73, duplicate flow 72, and duplicate flow 71.

また、複製フローが複製解除条件を満たしていなくても、ジョブキュー16における全待ちジョブ数がジョブ処理部減少条件に合致した場合、例えば一定期間(例えば10分間)全待ちジョブ数が10という閾値を下回った状態が続いたというジョブ処理部減少条件を満たした場合(ステップ209でY)、ジョブ処理部50を削減する(ステップ210)。具体的には、ジョブ処理部監視部13は、ジョブ処理部テーブルに設定されているジョブ処理部50を削除する更新を行う(ステップ211)。いずれのジョブ処理部JP1〜JP4を削除対象としてよいが、本実施の形態では、追加されたジョブ処理部JP4を削除することにする。   Even if the duplication flow does not satisfy the duplication cancellation condition, if the total number of waiting jobs in the job queue 16 matches the job processing unit reduction condition, for example, a threshold of 10 for the total number of waiting jobs for a certain period (for example, 10 minutes). If the job processing unit reduction condition that the state below the value has continued is satisfied (Y in step 209), the job processing unit 50 is reduced (step 210). Specifically, the job processing unit monitoring unit 13 performs an update to delete the job processing unit 50 set in the job processing unit table (step 211). Any job processing unit JP1 to JP4 may be targeted for deletion, but in the present embodiment, the added job processing unit JP4 is deleted.

図7において、ジョブ処理部50における振分処理部51は、ジョブ取得部52によりジョブが取得された後(ステップ101)、ジョブ処理部テーブルを参照して(ステップ102)、各ジョブ処理部50を円周上にマッピングする(ステップ103)。このとき、振分処理部51は、ジョブ処理部JP1〜JP3が稼動していると認識し、円周上にマッピングする。このようにして、ジョブ処理部JP4は、削除されることになる。図12(b)の状態からジョブ処理部JP4が削除されたときの状態を図12(c)に示す。図12(b)では、ジョブ処理部JP3がフローEを、ジョブ処理部JP4がフローAを担当していたところ、ジョブ処理部JP4が削除されることによりフローA71が再びジョブ処理部JP3に分担されることになる。この結果、ジョブ処理部JP3は、フローA,Eを担当することになる。   In FIG. 7, the distribution processing unit 51 in the job processing unit 50 refers to the job processing unit table (step 102) after the job is acquired by the job acquisition unit 52 (step 101), and each job processing unit 50. Are mapped on the circumference (step 103). At this time, the distribution processing unit 51 recognizes that the job processing units JP1 to JP3 are operating, and maps them on the circumference. In this way, the job processing unit JP4 is deleted. FIG. 12C shows a state when the job processing unit JP4 is deleted from the state of FIG. In FIG. 12B, the job processing unit JP3 was in charge of the flow E and the job processing unit JP4 was in charge of the flow A. However, when the job processing unit JP4 is deleted, the flow A71 is again assigned to the job processing unit JP3. Will be. As a result, the job processing unit JP3 takes charge of the flows A and E.

なお、解除対象とする複製フロー及び削減対象とするジョブ処理部50は、必ずしも増加する順番の逆とする必要はなく、例えば各ジョブ処理部50にかかる現在の負荷状況を考慮して、負荷の小さいジョブ処理部50から削除するようにしてもよい。   Note that the replication flow to be canceled and the job processing unit 50 to be reduced do not necessarily have to be in the reverse order of increase. For example, considering the current load status applied to each job processing unit 50, You may make it delete from the small job process part 50. FIG.

本実施の形態においては、以上のように各ジョブ処理部50がジョブキュー16に蓄積される待ちジョブ数に応じてフローを担当するジョブ処理部50の数を自立的に増減して負荷分散を行えるようにした。そして、全てのジョブ処理部50が待ちジョブ数の多いフローの分担先となってはじめてスケールアウトを行うようにした。   In the present embodiment, as described above, each job processing unit 50 autonomously increases or decreases the number of job processing units 50 in charge of the flow according to the number of waiting jobs accumulated in the job queue 16 to distribute the load. I was able to do it. The scale-out is performed only when all the job processing units 50 are assigned to a flow having a large number of waiting jobs.

なお、本実施の形態では、コンシステント・ハッシュ法を使用してフローの振分を行うようにしたが、これに代わる手法を用いてもよい、   In the present embodiment, the flow is distributed using the consistent hash method, but an alternative method may be used.

1 画像形成装置、2 クラウド、5 ジョブ実行サーバ、10 ジョブ管理サーバ、11 ジョブ受付部、12 ジョブ管理部、13 ジョブ処理部監視部、14 ジョブキュー監視部、15 オートスケーラ、16 ジョブキュー、17 ジョブ処理部テーブル記憶部、18 フロー多重度テーブル記憶部、50 ジョブ処理部、51 振分処理部、52 ジョブ取得部、53 ジョブ実行部、54 制御部、61 CPU、62 ROM、63 RAM、64 ハードディスクドライブ(HDD)、65 HDDコントローラ、66 ネットワークコントローラ、67 内部バス。   DESCRIPTION OF SYMBOLS 1 Image forming apparatus, 2 Cloud, 5 Job execution server, 10 Job management server, 11 Job reception part, 12 Job management part, 13 Job processing part monitoring part, 14 Job queue monitoring part, 15 Auto scaler, 16 Job queue, 17 Job processing unit table storage unit, 18 flow multiplicity table storage unit, 50 job processing unit, 51 distribution processing unit, 52 job acquisition unit, 53 job execution unit, 54 control unit, 61 CPU, 62 ROM, 63 RAM, 64 Hard disk drive (HDD), 65 HDD controller, 66 network controller, 67 internal bus.

Claims (7)

処理対象のデータに対して実施する処理を定義する処理定義情報が指定されたジョブをジョブキューに登録する登録手段と、
前記ジョブキューに蓄積されているジョブのうち自己に振り分けた処理定義情報が指定されたジョブのみを処理する1又は複数のジョブ処理手段と、
を有し、
前記各ジョブ処理手段は、
前記ジョブ処理手段全てに共通した振分処理を実行することによって処理定義情報を前記各ジョブ処理手段に振り分ける振分処理部と、
前記振分処理部により自己に振り分けられた処理定義情報が指定されたジョブを実行するジョブ実行部と、
を有し、
前記振分処理部は、処理定義情報毎に集計された前記ジョブキューに蓄積されているジョブの数に応じて当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を増減させることを特徴とする分散処理システム。
A registration means for registering a job in which processing definition information for defining processing to be performed on data to be processed is specified in a job queue;
One or a plurality of job processing means for processing only jobs for which processing definition information assigned to the job is specified among jobs stored in the job queue;
Have
Each job processing means includes:
A distribution processing unit that distributes the process definition information to each job processing unit by executing a distribution process common to all the job processing units;
A job execution unit that executes a job in which the process definition information distributed to itself by the distribution processing unit is designated;
Have
The distribution processing unit determines the number of job processing means to which the process definition information specified for the job is allocated according to the number of jobs accumulated in the job queue that is aggregated for each process definition information. A distributed processing system characterized by increasing or decreasing the number.
前記ジョブ処理手段の数を調整する調整手段を有し、
前記調整手段は、前記振分処理部により全ての前記ジョブ処理手段に振り分けられた処理定義情報が指定されたジョブの数が予め決められた第一のジョブ処理手段増加条件を満たした場合に前記ジョブ処理手段の数を増加させることを特徴とする請求項1に記載の分散処理システム。
Adjusting means for adjusting the number of the job processing means;
The adjusting unit is configured to execute the processing when the number of jobs in which the process definition information assigned to all the job processing units is assigned by the distribution processing unit satisfies a predetermined first job processing unit increase condition. 2. The distributed processing system according to claim 1, wherein the number of job processing means is increased.
前記振分処理部は、処理定義情報毎に集計された前記ジョブキューに蓄積されているジョブの数が予め決められた増加条件を満たした場合、当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を増加させることを特徴とする請求項1に記載の分散処理システム。   When the number of jobs accumulated in the job queue aggregated for each process definition information satisfies a predetermined increase condition, the distribution processing unit distributes the process definition information specified for the job. 2. The distributed processing system according to claim 1, wherein the number of said job processing means is increased. 前記振分処理部は、前記ジョブキューに蓄積されているジョブであって複数の前記ジョブ処理手段を振分先とした処理定義情報に指定されたジョブの数が予め決められた減少条件を満たした場合、当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を減少させることを特徴とする請求項1に記載の分散処理システム。   The distribution processing unit satisfies a reduction condition in which the number of jobs stored in the job queue and specified in the process definition information with a plurality of job processing means as distribution destinations is determined in advance. 2. The distributed processing system according to claim 1, wherein the number of job processing means to which the processing definition information designated for the job is assigned is reduced. 前記調整手段は、前記ジョブキューに蓄積されているジョブの数が予め決められた第二のジョブ処理手段増加条件を満たした場合にも前記ジョブ処理手段の数を増加させることを特徴とする請求項2に記載の分散処理システム。   The adjustment unit increases the number of job processing units even when the number of jobs stored in the job queue satisfies a predetermined second job processing unit increase condition. Item 3. The distributed processing system according to Item 2. 前記調整手段は、前記ジョブキューに蓄積されているジョブの数が予め決められたジョブ処理手段減少条件を満たした場合に前記ジョブ処理手段の数を減少させることを特徴とする請求項2に記載の分散処理システム。   3. The adjustment unit according to claim 2, wherein the adjustment unit reduces the number of job processing units when the number of jobs accumulated in the job queue satisfies a predetermined job processing unit reduction condition. Distributed processing system. コンピュータを、
処理対象のデータに対して実施する処理を定義する処理定義情報が指定されたジョブをジョブキューに登録する登録手段、
前記ジョブキューに蓄積されているジョブのうち自己に振り分けた処理定義情報が指定されたジョブのみを処理する1又は複数のジョブ処理手段、
として機能させ、
前記各ジョブ処理手段は、
前記ジョブ処理手段全てに共通した振分処理を実行することによって処理定義情報を前記各ジョブ処理手段に振り分ける振分処理部と、
前記振分処理部により自己に振り分けられた処理定義情報が指定されたジョブを実行するジョブ実行部と、
を有し、
前記振分処理部は、処理定義情報毎に集計された前記ジョブキューに蓄積されているジョブの数に応じて当該ジョブに指定された処理定義情報の振分先とする前記ジョブ処理手段の数を増減させることを特徴とするプログラム。
Computer
Registration means for registering a job in which job definition information that defines processing to be performed on data to be processed is specified in a job queue;
One or a plurality of job processing means for processing only jobs for which processing definition information assigned to the job is specified among jobs stored in the job queue;
Function as
Each job processing means includes:
A distribution processing unit that distributes the process definition information to each job processing unit by executing a distribution process common to all the job processing units;
A job execution unit that executes a job in which the process definition information distributed to itself by the distribution processing unit is designated;
Have
The distribution processing unit determines the number of job processing means to which the process definition information specified for the job is allocated according to the number of jobs accumulated in the job queue that is aggregated for each process definition information. A program characterized by increasing or decreasing.
JP2013073097A 2013-03-29 2013-03-29 Distributed processing system and program Pending JP2014197340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013073097A JP2014197340A (en) 2013-03-29 2013-03-29 Distributed processing system and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013073097A JP2014197340A (en) 2013-03-29 2013-03-29 Distributed processing system and program

Publications (1)

Publication Number Publication Date
JP2014197340A true JP2014197340A (en) 2014-10-16

Family

ID=52358065

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013073097A Pending JP2014197340A (en) 2013-03-29 2013-03-29 Distributed processing system and program

Country Status (1)

Country Link
JP (1) JP2014197340A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020536319A (en) * 2017-09-30 2020-12-10 オラクル・インターナショナル・コーポレイション Dynamic migration of groups of containers
CN112114971A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Task allocation method, device and equipment
CN115543585A (en) * 2022-11-28 2022-12-30 北京首信科技股份有限公司 Enterprise number card data synchronization method, server and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020536319A (en) * 2017-09-30 2020-12-10 オラクル・インターナショナル・コーポレイション Dynamic migration of groups of containers
US11755393B2 (en) 2017-09-30 2023-09-12 Oracle International Corporation API registry in a container platform for automatically generating client code libraries
CN112114971A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Task allocation method, device and equipment
CN115543585A (en) * 2022-11-28 2022-12-30 北京首信科技股份有限公司 Enterprise number card data synchronization method, server and storage medium
CN115543585B (en) * 2022-11-28 2023-08-22 北京首信科技股份有限公司 Enterprise number card data synchronization method, server and storage medium

Similar Documents

Publication Publication Date Title
JP5628510B2 (en) System and method for decentralized job scheduling and distributed execution in a network of multifunction devices
JP5716316B2 (en) Job execution apparatus and image forming apparatus
US10990334B2 (en) System, server and method of controlling the system and method of controlling the server
US20110149344A1 (en) Log information management system, control method therefor, and storage medium
JP2012083991A (en) Job execution management device, job execution device, job execution system and program
US20180088880A1 (en) Information processing apparatus, function usage amount management system, and non-transitory computer readable storage medium
US20180285169A1 (en) Information processing system and computer-implemented method
JP2014197340A (en) Distributed processing system and program
JP6303571B2 (en) Data processing apparatus, data processing system, data processing method, and program
CN108228346B9 (en) Service system and control method thereof
JP2014172394A (en) Printer, program and printing system
JP5760350B2 (en) Information processing system
WO2015104906A1 (en) Printing system, print server and method for submitting print jobs
JP6272080B2 (en) Information processing apparatus, distributed printing system, printing control method, and program
JP2006260216A (en) Document output management system, method and program
JP6890396B2 (en) Information processing system and information processing method, document processing system, program
US9552182B2 (en) Printing using multiple print processing resources
US10365870B2 (en) Information processing system for detecting overload of a management server and processing a priority request having priority, and information processing method for detecting overload of a management server and processing a priority request having a high priority
JP2017049660A (en) Server device, control system, control method, and program
JP2012079171A (en) Job execution system, job execution device, and program
JP5867002B2 (en) Assignment processing apparatus, image forming system, assignment processing method, and program
JP2003186639A (en) Network printer
JP6812732B2 (en) Information processing systems, information processing equipment and programs
JP5732755B2 (en) Distribution system, distribution apparatus, distribution method, and program
JP5682398B2 (en) Information processing apparatus, information processing program, and information processing system