JP5033343B2 - Job management apparatus and job management method - Google Patents

Job management apparatus and job management method Download PDF

Info

Publication number
JP5033343B2
JP5033343B2 JP2006089277A JP2006089277A JP5033343B2 JP 5033343 B2 JP5033343 B2 JP 5033343B2 JP 2006089277 A JP2006089277 A JP 2006089277A JP 2006089277 A JP2006089277 A JP 2006089277A JP 5033343 B2 JP5033343 B2 JP 5033343B2
Authority
JP
Japan
Prior art keywords
job
class
processing
data
item
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.)
Expired - Fee Related
Application number
JP2006089277A
Other languages
Japanese (ja)
Other versions
JP2007265029A (en
Inventor
綾太郎 木村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute 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 Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2006089277A priority Critical patent/JP5033343B2/en
Publication of JP2007265029A publication Critical patent/JP2007265029A/en
Application granted granted Critical
Publication of JP5033343B2 publication Critical patent/JP5033343B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、ジョブの実行を制御するための技術、特に、依存関係を有する複数のジョブを実行制御するための技術、に関する。   The present invention relates to a technique for controlling execution of a job, and more particularly to a technique for controlling execution of a plurality of jobs having dependency relationships.

企業や公共施設などの運用を支えるエンタープライズシステム(Enterprise System)は、今や、大小さまざまな組織の基盤システムとして導入されている。エンタープライズシステムは、ノード端末やデータベースから得られるデータを集計、蓄積、解析、加工した上でより付加価値の高い情報を出力する。エンタープライズシステムは複雑化する組織マネジメントをより効率化するために発展を続けている。   Enterprise systems that support the operation of enterprises and public facilities are now being introduced as infrastructure systems for large and small organizations. An enterprise system aggregates, accumulates, analyzes, and processes data obtained from node terminals and databases, and outputs information with higher added value. Enterprise systems continue to evolve to make more complex organization management more efficient.

このようなエンタープライズシステムは、ジョブの集合体としてモデリングされることが多い。ジョブとは、データベースの更新処理や、各ノード端末から得られたデータに対する演算処理など、システムにおいて基本的な実行単位となる処理である。これらのジョブは、前段にあたるジョブの出力データに基づいて後段にあたるジョブが実行されるように互いに依存関係を有したかたちで設計される。   Such enterprise systems are often modeled as a collection of jobs. A job is a process that is a basic execution unit in the system, such as a database update process and a calculation process for data obtained from each node terminal. These jobs are designed in such a manner that they have a dependency relationship so that the job corresponding to the subsequent stage is executed based on the output data of the job corresponding to the preceding stage.

エンタープライズシステムの構築にあたっては、COBOL(COmmon Business Oriented Language)などの手続き型言語が広く採用されている。COBOLは、その文法がシンプルであることから、エンタープライズシステムのようにジョブを順次処理するという処理モデルにおいては実績のある言語である。
特開平7−129415号公報
In building an enterprise system, a procedural language such as COBOL (COmmon Business Oriented Language) is widely used. Since the grammar is simple, COBOL is a well-proven language in the processing model of processing jobs sequentially like an enterprise system.
JP-A-7-129415

その一方、JAVA(登録商標)やC++などのオブジェクト指向言語が、ソフトウェア開発の現場において急速に普及しつつある。オブジェクト指向言語は、データとそのデータにアクセスするためのインタフェースをクラス(class)としてカプセル化する。クラスという一種の構造体によってデータが保護されるため、オブジェクト指向言語は、コードの再利用性・保守性・堅牢性などの諸点において手続き型言語よりも優れている。オブジェクト指向言語が普及するにつれて、開発現場でもCOBOLプログラマよりもJAVA(登録商標)プログラマの方が増加しつつある。とりわけ、中国・台湾・インドをはじめとする東アジア諸国では、COBOLプログラマよりもJAVA(登録商標)プログラマの方が確保しやすい。加えて、団塊の世代が一斉に定年退職する、いわゆる2007年問題によって、熟練したCOBOLプログラマの多くが現場を去るという直近の事情もある。
このような背景から、JAVA(登録商標)によってエンタープライズシステムを開発する必要性が顕在化しつつあると本発明者は認識した。
On the other hand, object-oriented languages such as JAVA (registered trademark) and C ++ are rapidly spreading in the field of software development. An object-oriented language encapsulates data and an interface for accessing the data as a class. Because data is protected by a kind of structure called a class, object-oriented languages are superior to procedural languages in terms of code reusability, maintainability, and robustness. As object-oriented languages become widespread, JAVA (registered trademark) programmers are increasing more in development sites than COBOL programmers. In particular, in East Asian countries such as China, Taiwan and India, JAVA (registered trademark) programmers are easier to secure than COBOL programmers. In addition, there is a recent situation that many skilled COBOL programmers leave the field due to the so-called 2007 problem where baby boomers retire all at once.
From such a background, the present inventor has recognized that the necessity of developing an enterprise system by JAVA (registered trademark) is becoming apparent.

ただし、大量のデータをバッチ処理する形態となることが多いエンタープライズシステムにおいてオブジェクト指向言語の優位性を発揮させるためには、手続き型言語による設計思想とは異なる設計思想に基づく必要がある。オブジェクト指向言語の特徴はソフトウェアの部品化であり、クラスの機能をいかに定義するかによってそのクラスの有用性が決まる。本発明者は、オブジェクト指向言語を前提としてエンタープライズシステムを設計するための新たなフレームワークを提供することにより、その優位性を好適に発揮させることができると想到した。   However, in order to exert the superiority of an object-oriented language in an enterprise system that often takes a form of batch processing a large amount of data, it is necessary to be based on a design philosophy that is different from the design philosophy of a procedural language. A feature of object-oriented languages is software componentization, and the usefulness of the class depends on how the class functions are defined. The present inventor has conceived that the superiority can be suitably exhibited by providing a new framework for designing an enterprise system on the premise of an object-oriented language.

本発明はこうした状況に鑑みてなされたものであり、その主たる目的は、オブジェクト指向言語に基づいて、複数のジョブを実行制御するシステムを効率的に設計するための技術、および、複数のジョブを効率的に実行させるための技術を提供することにある。   The present invention has been made in view of such a situation, and the main object thereof is a technique for efficiently designing a system for executing and controlling a plurality of jobs based on an object-oriented language, and a plurality of jobs. The object is to provide a technique for efficient execution.

本発明のある態様は、前段にあたるジョブの出力データに基づいて後段にあたるジョブが実行されるように依存関係が定められた複数のジョブを実行するためのジョブ管理装置である。
この装置は、ジョブのタイプに応じてあらかじめ定義されたクラスからジョブオブジェクトを生成し、各ジョブオブジェクトの依存関係を示すジョブリスト情報を生成する。そして、ジョブの処理内容を示す処理関数をジョブオブジェクトが生成された後に設定し、複数の処理関数に対して別々のスレッドを割り当てた上で、これら複数の処理関数を時間的に並行して実行させる。
前段にあたるジョブオブジェクトと後段にあたるジョブオブジェクトの関係において、後段にあたるジョブオブジェクトの処理関数は、前段にあたるジョブオブジェクトの処理関数が生成する出力データを変数として所定の処理を実行し、出力データが未生成の段階においては出力データが生成されるまで待機する。
An aspect of the present invention is a job management apparatus for executing a plurality of jobs whose dependency relationships are determined so that a job corresponding to a subsequent stage is executed based on output data of a job corresponding to the preceding stage.
This apparatus generates a job object from a class defined in advance according to the type of job, and generates job list information indicating the dependency of each job object. Then, after the job object is created, a processing function indicating the job processing content is set, and after assigning different threads to multiple processing functions, these multiple processing functions are executed in parallel in time. Let
In the relationship between the job object corresponding to the previous stage and the job object corresponding to the subsequent stage, the processing function of the job object corresponding to the subsequent stage executes predetermined processing using the output data generated by the processing function of the job object corresponding to the previous stage as a variable, and the output data is not generated. The stage waits until output data is generated.

なお、以上の構成要素の任意の組合せ、本発明を方法、装置、システム、記録媒体、コンピュータプログラムにより表現したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described components and a representation of the present invention by a method, apparatus, system, recording medium, and computer program are also effective as an aspect of the present invention.

本発明によれば、オブジェクト指向言語に基づくジョブの実行制御システムを効率的に設計・運用する上で効果がある。   The present invention is effective in efficiently designing and operating a job execution control system based on an object-oriented language.

図1は、エンタープライズシステム204のハードウェア構成図である。
エンタープライズシステム204は、企業や公共施設のような組織の業務管理のために導入されるシステムである。エンタープライズシステム204は、地理的に分散された複数の組織を統合するシステムとして構成されてもよい。
FIG. 1 is a hardware configuration diagram of the enterprise system 204.
The enterprise system 204 is a system introduced for business management of an organization such as a company or a public facility. The enterprise system 204 may be configured as a system that integrates a plurality of geographically dispersed organizations.

本実施例におけるエンタープライズシステム204は、ジョブ管理装置100、ノード端末200およびデータベース206を含む。これらは、インターネット202を介して互いに接続されている。
ジョブ管理装置100は、各ジョブの関係を定義したデータフローダイアグラム(DFD:Data Flow Diagram)にしたがって複数のジョブを順次実行する。データフローダイアグラム(以下、「DFD」ともよぶ)については、後に図3等に関連して詳述する。また、ジョブ管理装置100の機能については、次の図2以降に関連して詳述する。
The enterprise system 204 in this embodiment includes a job management apparatus 100, a node terminal 200, and a database 206. These are connected to each other via the Internet 202.
The job management apparatus 100 sequentially executes a plurality of jobs according to a data flow diagram (DFD: Data Flow Diagram) that defines the relationship between the jobs. A data flow diagram (hereinafter also referred to as “DFD”) will be described later in detail with reference to FIG. Further, the function of the job management apparatus 100 will be described in detail with reference to FIG.

ノード端末200は、ユーザが業務遂行のために使用するコンピュータ端末である。ノード端末200は業務上のさまざまなデータを取得する。ジョブ管理装置100は、ジョブの実行に際して、ノード端末200やデータベース206とデータを送受する。ジョブ管理装置100は、ノード端末200やデータベース206から取得したデータに基づいて各種のジョブを実行する。   The node terminal 200 is a computer terminal used by a user for performing business. The node terminal 200 acquires various business data. The job management apparatus 100 transmits and receives data to and from the node terminal 200 and the database 206 when executing a job. The job management apparatus 100 executes various jobs based on data acquired from the node terminal 200 or the database 206.

まとめると、ノード端末200やデータベース206から得られるデータを変数として、ジョブ管理装置100はさまざまなジョブを実行する。ジョブ管理装置100は、各ジョブの実行タイミングを統合的に制御することもできる。このように、ノード端末200やデータベース206から得られるデータに基づいて、あらかじめ処理内容が定義されたジョブが順次実行されることにより、エンタープライズシステム204全体としての運用がなされている。   In summary, the job management apparatus 100 executes various jobs using data obtained from the node terminal 200 and the database 206 as variables. The job management apparatus 100 can also integrally control the execution timing of each job. In this manner, the enterprise system 204 as a whole is operated by sequentially executing jobs whose processing contents are defined in advance based on data obtained from the node terminal 200 and the database 206.

図2は、ジョブ管理装置100の機能ブロック図である。
ここに示す各ブロックは、ハードウェア的には、コンピュータのCPUをはじめとする素子や機械装置で実現でき、ソフトウェア的にはコンピュータプログラム等によって実現されるが、ここでは、それらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックはハードウェア、ソフトウェアの組合せによっていろいろなかたちで実現できることは、当業者には理解されるところである。
ここでは、主として各機能ブロックの発揮すべき機能について述べ、その具体的な作用については、図3以降に関連して説明する。
FIG. 2 is a functional block diagram of the job management apparatus 100.
Each block shown here can be realized in hardware by an element such as a CPU of a computer or a mechanical device, and in software it is realized by a computer program or the like. Draw functional blocks. Therefore, those skilled in the art will understand that these functional blocks can be realized in various forms by a combination of hardware and software.
Here, functions to be exhibited by each functional block will be mainly described, and specific actions thereof will be described with reference to FIG.

ジョブ管理装置100は、ユーザインタフェース処理部110、通信部120およびデータ処理部130を含む。
ユーザインタフェース処理部110は、ユーザからの入力処理やユーザに対する情報表示のようなユーザインタフェース全般に関する処理を担当する。通信部120は、ノード端末200やデータベース206との通信処理を担当する。データ処理部130は、ユーザインタフェース処理部110や通信部120から取得されたデータを元にして各種のデータ処理を実行する。データ処理部130は、ユーザインタフェース処理部110および通信部120の間のインタフェースの役割も果たす。
The job management apparatus 100 includes a user interface processing unit 110, a communication unit 120, and a data processing unit 130.
The user interface processing unit 110 is in charge of processing related to the entire user interface such as input processing from the user and information display for the user. The communication unit 120 is in charge of communication processing with the node terminal 200 and the database 206. The data processing unit 130 executes various types of data processing based on data acquired from the user interface processing unit 110 and the communication unit 120. The data processing unit 130 also serves as an interface between the user interface processing unit 110 and the communication unit 120.

データ処理部130は、モデル管理部140とフロー制御部150を含む。
モデル管理部140は、各ジョブの依存関係を示す「静的なモデル」に関するデータを管理する。フロー制御部150は、各ジョブの処理内容を定義するとともに、各ジョブの実行を制御する。ここで注目すべきは、本実施例におけるジョブ管理装置100において、ジョブの静的な依存関係を管理するモデル管理部140と、ジョブの動的な処理内容を管理するフロー制御部150が機能上分離されていることである。そのため、ジョブの「依存関係の定義」と「処理内容の定義」について、一方の設計作業が他方の設計内容によって制約されない枠組み(フレームワーク)となっている。
以上をふまえて、より具体的なソフトウェア構造について説明する。
The data processing unit 130 includes a model management unit 140 and a flow control unit 150.
The model management unit 140 manages data related to a “static model” indicating the dependency relationship of each job. The flow control unit 150 defines the processing contents of each job and controls the execution of each job. It should be noted that in the job management apparatus 100 according to the present embodiment, the model management unit 140 that manages the static dependency relationship of the job and the flow control unit 150 that manages the dynamic processing content of the job are functionally related. It is to be separated. Therefore, the “definition of dependency” and “definition of processing contents” of a job have a framework (framework) in which one design work is not restricted by the other design contents.
Based on the above, a more specific software structure will be described.

図3は、本実施例におけるデータフローダイアグラム312を示す図である。
同図に示すデータフローダイアグラム312は、所定の期間における4つCD(Compact Disc)店のCDの売上枚数を集計して、地域別および店別の売上枚数を計算するという処理過程を示している。このデータフローダイアグラム312には、売上データ300、売上集約処理302、地区別売上データ304、店マスタデータ306、店名追加処理308および店別売上データ310の6つの構成要素(Entity)が定義されている。
FIG. 3 is a diagram showing a data flow diagram 312 in the present embodiment.
A data flow diagram 312 shown in the figure shows a process of calculating the number of sales for each region and each store by summing up the number of CDs sold at four CD (Compact Disc) stores in a predetermined period. . In this data flow diagram 312, six components (Entity) are defined: sales data 300, sales aggregation processing 302, district sales data 304, store master data 306, store name addition processing 308, and store sales data 310. Yes.

売上データ300は、4つのCD店におけるCD売上枚数を示すデータである。ここで、CD店を識別するために、各CD店には「01」〜「04」として示す「店ID」が付与されている。また、各CD店が所属する地区を識別するために、各地区には「A」または「B」として示す「地区ID」が付与されている。売上データ300によれば、「01」および「02」のCD店は、「A」地区に属し、「03」と「04」のCD店は「B」地区に属している。ここで「01」のCD店には、2つのノード端末200が設置されており、それぞれのノード端末200からは、CD売上枚数として「1枚」と「2枚」が入力されている。同様に「02」や「04」のCD店にも、2つのノード端末200が設置されている。すなわち、売上データ300は、2つの地区、4つのCD店、7つのノード端末200から得られるデータである。   Sales data 300 is data indicating the number of CDs sold at four CD stores. Here, in order to identify the CD stores, “store IDs” indicated as “01” to “04” are assigned to the respective CD stores. Further, in order to identify the district to which each CD store belongs, each district is given a “district ID” indicated as “A” or “B”. According to the sales data 300, CD stores “01” and “02” belong to the “A” district, and CD stores “03” and “04” belong to the “B” district. Here, two node terminals 200 are installed in the CD store “01”, and “1” and “2” are input as the number of CD sales from each node terminal 200. Similarly, two node terminals 200 are also installed in CD stores “02” and “04”. That is, the sales data 300 is data obtained from two districts, four CD stores, and seven node terminals 200.

売上集約処理302は、各CD店に設置されるノード端末200から得られた売上データ300をまとめて、CD店ごとのCD売上枚数を計算する。そして、このCD店ごとのCD売上枚数に関する情報(以下、「中間データ」とよぶ)を店名追加処理308に渡す。その一方、地区ごとのCD売上枚数を計算して地区別売上データ304を生成する。   In the sales aggregation process 302, the sales data 300 obtained from the node terminal 200 installed in each CD store is collected, and the number of CD sales for each CD store is calculated. Information relating to the number of CDs sold for each CD store (hereinafter referred to as “intermediate data”) is passed to the store name adding process 308. On the other hand, the sales data 304 for each district is generated by calculating the number of CD sales for each district.

店名追加処理308は、売上集約処理302から受け取った中間データと店マスタデータ306に基づいて、店別売上データ310を生成する。店マスタデータ306は、店IDと店名を対応づけるデータであり、データベース206から得られるデータである。店別売上データ310は、CD店ごとのCD売上枚数を集計したデータであり、店IDだけでなく対応する店名も含むデータである。   The store name addition processing 308 generates store-specific sales data 310 based on the intermediate data received from the sales aggregation processing 302 and the store master data 306. The store master data 306 is data that associates a store ID with a store name, and is data obtained from the database 206. The sales data 310 for each store is data obtained by tabulating the number of CDs sold for each CD store, and includes not only the store ID but also the corresponding store name.

仮に、データフローダイアグラム312をCOBOLによって実装するとする。COBOLはマルチスレッド環境を想定して設計された言語ではない。そのため、売上集約処理302と店名追加処理308をマルチタスク処理として定義する場合、売上集約処理302のメモリ空間と、店名追加処理308のメモリ空間は別々に割り当てられることになる。したがって、売上集約処理302は、中間データをいったんファイル化し、店名追加処理308はこのファイルから中間データを読み出すという処理方法になる。   Suppose that the data flow diagram 312 is implemented by COBOL. COBOL is not a language designed for a multi-thread environment. For this reason, when the sales aggregation process 302 and the store name addition process 308 are defined as multitask processes, the memory space of the sales aggregation process 302 and the memory space of the store name addition process 308 are allocated separately. Accordingly, the sales aggregation processing 302 is a processing method in which the intermediate data is once converted into a file, and the store name addition processing 308 reads the intermediate data from this file.

これに対し、本実施例において使用されるプログラミング言語であるJAVA(登録商標)は、マルチスレッド環境にて使用されることを充分に想定して設計された言語である。そのため、売上集約処理302と店名追加処理308をマルチタスク処理として定義する場合でも、各処理は別々のスレッドにて実行可能である。同一プロセス空間に属するスレッド間のメモリ共有は簡単なので、売上集約処理302は、中間データをわざわざファイル化しなくても、店名追加処理308に渡すことができる。このようなマルチスレッドに関する優位性と実現性については後に詳述する。   On the other hand, JAVA (registered trademark), which is a programming language used in the present embodiment, is a language designed with sufficient assumption that it will be used in a multi-thread environment. Therefore, even when the sales aggregation processing 302 and the store name addition processing 308 are defined as multitask processing, each processing can be executed by separate threads. Since memory sharing between threads belonging to the same process space is simple, the sales aggregation processing 302 can pass the intermediate data to the store name addition processing 308 without having to bother creating a file. The superiority and feasibility of such multithread will be described in detail later.

本実施例においては、データフローダイアグラム312に含まれる6つの構成要素を「ジョブ」として定義し、各ジョブごとにクラス(以下、「ジョブクラス」ともよぶ)を定義する。フロー制御部150は、ジョブクラスをインスタンス化することにより生成されるオブジェクト(以下、「ジョブオブジェクト」ともよぶ)に対して、その処理内容を設定することになる。以下においては、「Xクラス(「X」は文字列)」をインスタンス化して生成されるオブジェクトのことを単に「Xオブジェクト」と表記するものとする。   In the present embodiment, six components included in the data flow diagram 312 are defined as “jobs”, and a class (hereinafter also referred to as “job class”) is defined for each job. The flow control unit 150 sets the processing content of an object (hereinafter also referred to as “job object”) generated by instantiating a job class. In the following, an object generated by instantiating “X class (“ X ”is a character string)” is simply referred to as “X object”.

図4は、図3のDFDに対応するジョブクラスの依存関係を示す図である。
UriageSourceクラス400は、売上データ300に対応するジョブクラスであり、売上データ300を各CD店のノード端末200から収集して保持するクラスである。UriageAggregatorクラス402は、売上集約処理302に対応するジョブクラスである。以下、同様に、AreaUriageTotalSinkクラス404は地区別売上データ304、MiseMaSourceクラス406は店マスタデータ306、MiseMaMatcherクラス408は店名追加処理308、MiseUriageTotalSinkクラス410は店別売上データ310にそれぞれ対応するジョブクラスである。
FIG. 4 is a diagram illustrating the dependency relationship of the job class corresponding to the DFD of FIG.
The UriageSource class 400 is a job class corresponding to the sales data 300, and is a class that collects and holds the sales data 300 from the node terminals 200 of each CD store. The UriageAggregator class 402 is a job class corresponding to the sales aggregation process 302. Hereinafter, similarly, the AreaUriageTotalSink class 404 is a job class corresponding to the district sales data 304, the MiseMaSource class 406 is the store master data 306, the MiseMaMatcher class 408 is a store name addition process 308, and the MiseUriageTotalSink class 410 is a job class corresponding to the store sales data 310. .

UriageSourceクラス400に、UriageAggregatorクラス402へ売上データ300を渡したり、UriageAggregatorクラス402をインスタンス化するための処理が直接記述されると、UriageSourceクラス400とUriageAggregatorクラス402の結合が強くなってしまう。ジョブクラス同士の結合が強くなると、あるジョブクラスの依存関係や処理内容の変更が他の多くのジョブクラスのパフォーマンスに影響しやすくなってしまうため望ましくない。いいかえれば、再利用性・保守性・堅牢性に優れたジョブクラスを設計するためには、ジョブクラス同士の結合が弱い方が望ましい。
そこで、本実施例においては、UriageSourceクラス400からMiseUriageTotalSinkクラス410までの各ジョブクラスに対して、後述するNodeFlowControllerクラス500によって後天的に「処理を注入する(inject)」という手法を採用している。すなわち、ジョブクラスそのものは、先天的には依存関係を持たないかたちで設計されている。
When the sales data 300 is passed to the UriageSource class 400 and the process for instantiating the UriageAggregator class 402 is directly described, the connection between the UriageSource class 400 and the UriageAggregator class 402 becomes strong. If the connection between job classes becomes stronger, it is not desirable because a change in dependency or processing contents of a certain job class easily affects the performance of many other job classes. In other words, in order to design a job class with excellent reusability, maintainability, and robustness, it is desirable that the coupling between job classes is weak.
Therefore, in the present embodiment, a method of “injecting processing” by the NodeFlowController class 500 described later is adopted for each job class from the UriageSource class 400 to the MiseUriageTotalSink class 410. In other words, the job class itself is designed in a form that does not have any dependency in nature.

図5は、ジョブ管理装置100の基本的な機能を実現するためのクラスの関係を示す模式図である。より詳細には、次の図6および図7に関連して説明するが、同図において、まず、クラスの関係の概要を示す。
UriageProcessingModelクラス440は、データフローダイアグラム312に示した各ジョブクラスの関係を定義するクラスである。UriageProcessingModelクラス440は、図4に示した6つのジョブクラスを含むジョブクラス群420を持つ。同図に示す菱形記号は、UML(Unified Modeling Language)の表記法に基づき、「集約(aggregation)」を示す。すなわち、UriageProcessingModelクラス440は、その一部としてジョブクラス群420を持つ。したがって、UriageProcessingModelクラス440がインスタンス化されるときには、その一部であるジョブクラス群420も付随してインスタンス化される。UriageProcessingModelオブジェクトは、各ジョブオブジェクトを持つことになる。
FIG. 5 is a schematic diagram illustrating the relationship of classes for realizing the basic functions of the job management apparatus 100. This will be described in detail with reference to FIGS. 6 and 7 below. In FIG.
The UriageProcessingModel class 440 is a class that defines the relationship between the job classes shown in the data flow diagram 312. The UriageProcessingModel class 440 has a job class group 420 including the six job classes shown in FIG. The rhombus symbols shown in the figure indicate “aggregation” based on the UML (Unified Modeling Language) notation. That is, the UriageProcessingModel class 440 has a job class group 420 as a part thereof. Therefore, when the UriageProcessingModel class 440 is instantiated, the job class group 420 that is a part thereof is also instantiated. The UriageProcessingModel object will have each job object.

UriageProcessingModelクラス440はConnectionクラス430も持つ。Connectionクラス430は、ジョブクラス群420における各ジョブクラスの依存関係をリストとして管理するクラスである(以下、このようなタイプのクラスのことを「関係クラス」とよぶ)。UriageProcessingModelクラス440は、ジョブとその依存関係をジョブクラス群420とConnectionクラス430の機能を使って管理することになる。   The UriageProcessingModel class 440 also has a Connection class 430. The Connection class 430 is a class that manages the dependency relationship of each job class in the job class group 420 as a list (hereinafter, such a class is referred to as a “relationship class”). The UriageProcessingModel class 440 manages jobs and their dependencies using the functions of the job class group 420 and the Connection class 430.

SingleThreadFlowControllerクラス450とMultiThreadFlowControllerクラス452は、各ジョブクラスの処理内容を定義するクラスである。SingleThreadFlowControllerクラス450やMultiThreadFlowControllerクラス452の機能によって、エンタープライズシステム204が実際に駆動されることになる。SingleThreadFlowControllerクラス450は、シングルスレッドモデルにてエンタープライズシステム204を駆動するクラスである。MultiThreadFlowControllerクラス452は、マルチスレッドモデルにてエンタープライズシステム204を駆動するクラスである。エンタープライズシステム204の処理開始に際して、SingleThreadFlowControllerクラス450とMultiThreadFlowControllerクラス452のいずれかの実行モデルがユーザによって選択される。実行モデルの選択方法については、図8に関連して詳述する。   The SingleThreadFlowController class 450 and the MultiThreadFlowController class 452 are classes that define the processing content of each job class. The enterprise system 204 is actually driven by the functions of the SingleThreadFlowController class 450 and the MultiThreadFlowController class 452. The SingleThreadFlowController class 450 is a class that drives the enterprise system 204 in a single thread model. The MultiThreadFlowController class 452 is a class that drives the enterprise system 204 in a multi-thread model. At the start of processing of the enterprise system 204, one of the execution models of the SingleThreadFlowController class 450 and the MultiThreadFlowController class 452 is selected by the user. The execution model selection method will be described in detail with reference to FIG.

SingleThreadFlowControllerクラス450とMultiThreadFlowControllerクラス452は、共にUriageProcessingModelクラス440を持つことになる。より厳密には、SingleThreadFlowControllerクラス450やMultiThreadFlowControllerクラス452には、UriageProcessingModelクラス440への参照(reference)が設定されているが、本明細書では、参照も含めて「持つ」と定義する。したがって、SingleThreadFlowControllerクラス450かMultiThreadFlowControllerクラス452のいずれかの実行モデルが選択され、UriageProcessingModelクラス440がインスタンス化されるときには、更に、ジョブクラス群420とConnectionクラス430が連鎖的ににインスタンス化されることになる。   The SingleThreadFlowController class 450 and the MultiThreadFlowController class 452 both have a UriageProcessingModel class 440. More strictly, a reference to the UriageProcessingModel class 440 is set in the SingleThreadFlowController class 450 and the MultiThreadFlowController class 452, but in this specification, it is defined as “having” including the reference. Therefore, when the execution model of either the SingleThreadFlowController class 450 or the MultiThreadFlowController class 452 is selected and the UriageProcessingModel class 440 is instantiated, the job class group 420 and the Connection class 430 are further instantiated in a chain. Become.

先の図2に示した機能ブロック図と対比すると、モデル管理部140の機能はUriageProcessingModelクラス440、ジョブクラス群420、Connectionクラス430の各機能によって実現され、フロー制御部150の機能はSingleThreadFlowControllerクラス450またはMultiThreadFlowControllerクラス452の機能によって実現されることになる。以下、UriageProcessingModelクラス440のようなジョブの内容とその依存関係を定義するクラスことを「モデルクラス」、SingleThreadFlowControllerクラス450やMultiThreadFlowControllerクラス452のようなジョブの処理内容を定義するクラスのことを「コントロールクラス」とよぶ。
以下においては、MultiThreadFlowControllerクラス452によるマルチスレッドモデルを題材として説明する。なお、参考までに、シングルスレッドモデルについては本件の関連案件である特願2005−350643に詳しい。
Compared with the functional block diagram shown in FIG. 2, the function of the model management unit 140 is realized by the functions of the UriageProcessingModel class 440, the job class group 420, and the Connection class 430, and the function of the flow control unit 150 is the SingleThreadFlowController class 450. Alternatively, it is realized by the function of the MultiThreadFlowController class 452. Hereinafter, a class that defines job contents and their dependencies such as the UriageProcessingModel class 440 is referred to as a “model class”, and a class that defines job processing contents such as the SingleThreadFlowController class 450 and the MultiThreadFlowController class 452 is referred to as a “control class”. "
In the following, a multithread model based on the MultiThreadFlowController class 452 will be described as a subject. For reference, the single thread model is detailed in Japanese Patent Application No. 2005-350643, which is a related case of this case.

図6は、ジョブクラスとモデルクラスの関係を示すクラス図である。
前の図4に示したように、UriageProcessingModelクラス440は、UriageSourceクラス400からMiseUriageTotalSinkクラス410までの6つのジョブクラスを持つ。UriageProcessingModelクラス440自体は、MultiThreadFlowControllerクラス452に持たれている。UriageProcessingModelクラス440は、ProcessingModelクラス460を継承するモデルクラスである。すなわちUriageProcessingModelクラス440は、ProcessingModelクラス460において定義された機能を受け継ぎつつ、CDの売上処理を管理するために特有の機能が追加されたクラスとして定義される。ProcessingModelクラス460の作成にあたっては、CDの売上処理を管理するために特有の機能のみを追加すればよいので、スクラッチからUriageProcessingModelクラス440自体を作成するのに比べて、開発や保守にともなう負担が軽減される。以下、ProcessingModelクラス460のように、モデルクラスの継承元となる、基本的なクラスのことを「モデルベースクラス」とよぶことにする。ProcessingModelクラス460は、Connectionクラス430を持つ。したがって、ProcessingModelクラス460を継承するUriageProcessingModelクラス440も、Connectionクラス430を持つことになる。
FIG. 6 is a class diagram showing the relationship between the job class and the model class.
As shown in FIG. 4, the UriageProcessingModel class 440 has six job classes from the UriageSource class 400 to the MiseUriageTotalSink class 410. The UriageProcessingModel class 440 itself is included in the MultiThreadFlowController class 452. The UriageProcessingModel class 440 is a model class that inherits the ProcessingModel class 460. That is, the UriageProcessingModel class 440 is defined as a class to which a specific function is added in order to manage the sales process of the CD while inheriting the function defined in the ProcessingModel class 460. When creating the ProcessingModel class 460, it is only necessary to add a specific function to manage the sales processing of the CD. Therefore, compared to creating the UriageProcessingModel class 440 itself from scratch, the burden associated with development and maintenance is reduced. Is done. Hereinafter, a basic class that is a model class inheritance source, such as the ProcessingModel class 460, is referred to as a “model base class”. The ProcessingModel class 460 has a Connection class 430. Therefore, the UriageProcessingModel class 440 that inherits the ProcessingModel class 460 also has a Connection class 430.

6つのジョブクラスのうち、UriageSourceクラス400とMiseMaSourceクラス406はRecordStreamSourceクラス480を継承するジョブクラスである。RecordStreamSourceクラス480は、売上データ300や店マスタデータ306のようにジョブの前提となるデータを管理するための基本仕様が定義されたクラスである。UriageAggregatorクラス402は、RecordStreamAggregatorクラス482を継承する。RecordStreamAggregatorクラス482は、売上集約処理302のようにデータを集約するジョブについての基本仕様が定義されたクラスである。MiseMaMatcherクラス408は、RecordStreamMatcherクラス484を継承する。RecordStreamMatcherクラス484は、店名追加処理308のように2種類のデータを結合するジョブについての基本仕様が定義されたクラスである。MiseUriageTotalSinkクラス410とAreaUriageTotalSinkクラス404は、RecordStreamSinkクラス486を継承する。RecordStreamSinkクラス486は、地区別売上データ304や店別売上データ310のようにジョブの処理結果として生成されるデータを管理するための基本仕様が定義されたクラスである。
このように、6つのジョブクラスは、4種類のクラス(以下、「ジョブベースクラス」とよぶ)のいずれかを継承している。更に遡ると、すべてのジョブベースクラスは、Nodeクラス490を継承する。Nodeクラス490は、ジョブのタイプによらない基本的な仕様が定義されたクラスである。
Of the six job classes, the UriageSource class 400 and the MiseMaSource class 406 are job classes that inherit the RecordStreamSource class 480. The RecordStreamSource class 480 is a class in which basic specifications for managing data that is a premise of a job such as the sales data 300 and the store master data 306 are defined. The UriageAggregator class 402 inherits the RecordStreamAggregator class 482. The RecordStreamAggregator class 482 is a class in which a basic specification for a job that aggregates data like the sales aggregation process 302 is defined. The MiseMaMatcher class 408 inherits the RecordStreamMatcher class 484. The RecordStreamMatcher class 484 is a class in which basic specifications are defined for a job that combines two types of data as in the store name addition process 308. The MiseUriageTotalSink class 410 and the AreaUriageTotalSink class 404 inherit the RecordStreamSink class 486. The RecordStreamSink class 486 is a class in which basic specifications for managing data generated as a result of job processing, such as sales data by district 304 and sales data 310 by store, are defined.
As described above, the six job classes inherit any of the four types of classes (hereinafter referred to as “job base classes”). Going back further, all job base classes inherit the Node class 490. The Node class 490 is a class in which basic specifications independent of job types are defined.

Nodeクラス490は、NodeFlowControllerクラス500を持つ。NodeFlowControllerクラス500は、ジョブオブジェクトの処理内容を決定するためのクラスである(以下、このようなクラスのことを「処理クラス」とよぶ)。そのため、ジョブクラスがインスタンス化されると、ジョブオブジェクトごとに処理オブジェクトも生成されることになる。ただし、ジョブクラスがインスタンス化される時点においては、処理オブジェクトには特定の処理内容は設定されない。後に詳述する方法にて、MultiThreadFlowControllerクラス452、すなわち、コントロールクラスが処理を注入するときに、具体的な処理内容が設定される。   The Node class 490 has a NodeFlowController class 500. The NodeFlowController class 500 is a class for determining the processing content of a job object (hereinafter, such a class is referred to as a “processing class”). Therefore, when a job class is instantiated, a processing object is also generated for each job object. However, when the job class is instantiated, specific processing content is not set in the processing object. By the method described in detail later, when the MultiThreadFlowController class 452, that is, the control class, injects processing, specific processing contents are set.

同図に示すクラス図によれば、データフローダイアグラム312に対応するクラスであるジョブクラスやモデルクラスのほかに、ジョブベースクラスやモデルベースクラスが定義されている。したがって、開発者がエンタープライズシステム204を設計するときには、あらかじめ用意されているジョブベースクラスやモデルベースクラスの基本仕様を利用しながら、設計対象となるエンタープライズシステム204に特有の機能をジョブクラスやモデルクラスに定義すればよい。これにより、クラスの再利用性というオブジェクト指向言語の特性を効果的に利用できる。エンタープライズシステム204の場合、何百、何千というジョブの基本仕様は数パターンに集約できることが多いため、オブジェクト指向言語の継承機能は特に有効である。   According to the class diagram shown in the figure, a job base class and a model base class are defined in addition to a job class and a model class corresponding to the data flow diagram 312. Therefore, when a developer designs the enterprise system 204, functions specific to the enterprise system 204 to be designed are added to the job class and model class using the basic specifications of the job base class and model base class prepared in advance. Should be defined. This makes it possible to effectively use the object-oriented language characteristic of class reusability. In the case of the enterprise system 204, since the basic specifications of hundreds or thousands of jobs can often be aggregated into several patterns, the inheritance function of the object-oriented language is particularly effective.

図7は、処理クラスの継承に関するクラス図である。
前の図6で見たように、NodeFlowControllerクラス500は、ジョブオブジェクトの処理内容を定義するための処理クラスである。NodeFlowControllerクラス500からMTNodeFlowControllerクラス502が継承され、更に、MTRecordStreamSourceクラス510、MTRecordStreamMatcherクラス512、MTRecordStreamAggregatorクラス514およびMTRecordStreamSinkクラス516の4種類の処理クラスが継承されている。MTRecordStreamSourceクラス510は、RecordStreamSourceクラス480に対応して、その処理内容を定義するためのクラスである。MTRecordStreamMatcherクラス512、MTRecordStreamAggregatorクラス514およびMTRecordStreamSinkクラス516は、それぞれ、RecordStreamMatcherクラス484、RecordStreamAggregatorクラス482およびRecordStreamSinkクラス486に対応してそれらの処理内容を定義するクラスである。NodeFlowControllerクラス500から継承された4種類の処理クラスによって、ジョブクラスの処理内容が定義されることになる。
FIG. 7 is a class diagram regarding inheritance of processing classes.
As seen in FIG. 6, the NodeFlowController class 500 is a processing class for defining job object processing contents. The MTNodeFlowController class 502 is inherited from the NodeFlowController class 500, and further, four types of processing classes, the MTRecordStreamSource class 510, the MTRecordStreamMatcher class 512, the MTRecordStreamAggregator class 514, and the MTRecordStreamSink class 516 are inherited. The MTRecordStreamSource class 510 is a class for defining the processing contents corresponding to the RecordStreamSource class 480. The MTRecordStreamMatcher class 512, the MTRecordStreamAggregator class 514, and the MTRecordStreamSink class 516 are classes that define processing contents corresponding to the RecordStreamMatcher class 484, the RecordStreamAggregator class 482, and the RecordStreamSink class 486, respectively. The processing contents of the job class are defined by the four types of processing classes inherited from the NodeFlowController class 500.

なお、図示しないが、NodeFlowControllerクラス500からはSTNodeFlowControllerクラスも継承され、更に、STNodeFlowControllerクラスからSTRecordStreamSourceクラス、STRecordStreamMatcherクラス、STRecordStreamAggregatorクラスおよびSTRecordStreamSinkクラスの4種類の処理クラスが継承されている。これらのクラスはシングルスレッドモデルのための処理クラスである。マルチスレッドモデルの場合には、MT系のプレフィックスを持つ処理クラス、すなわち、MTNodeFlowControllerクラス502のサブクラス群によって処理内容が定義され、シングルスレッドモデルの場合には、ST系のプレフィックスを持つ処理クラス、すなわち、STNodeFlowControllerクラスのサブクラス群によって処理内容が定義される。
以上のクラス図をふまえ、サンプルのソースコードを参照しながら、基幹的な処理の内容を処理順序にしたがって説明する。以下に示すソースコードはJAVA(登録商標)にて記述されている。
Although not shown, the STNodeFlowController class is also inherited from the NodeFlowController class 500, and further, four types of processing classes, the STRecordStreamSource class, the STRecordStreamMatcher class, the STRecordStreamAggregator class, and the STRecordStreamSink class are inherited from the STNodeFlowController class. These classes are processing classes for the single thread model. In the case of the multi-thread model, the processing content is defined by the processing class having the MT system prefix, that is, the subclass group of the MTNodeFlowController class 502. In the case of the single thread model, the processing class having the ST system prefix, that is, The processing contents are defined by the subclass group of the STNodeFlowController class.
Based on the above class diagram, the contents of the basic processing will be described according to the processing order while referring to the sample source code. The source code shown below is described in JAVA (registered trademark).

図8は、エンタープライズシステムの実行開始にあたって、最初に実行される関数を示す図である。
この最初に実行される関数(メソッド:method)は、main関数である(S10)。main関数は、UriageProcessingModelクラス440のpublicでstaticなメンバ関数であり、UriageProcessingModelクラス440の外からコール可能である。ユーザは、main関数に引数を指定するか否かによって、シングルスレッドモデルか(S12)、マルチスレッドモデルかを選択できる(S14)。引数が指定され、マルチスレッドモデルが選択されたとして説明する(S14)。
FIG. 8 is a diagram illustrating a function that is executed first when the execution of the enterprise system is started.
The function (method) executed first is the main function (S10). The main function is a public static member function of the UriageProcessingModel class 440, and can be called from outside the UriageProcessingModel class 440. The user can select a single thread model (S12) or a multi-thread model depending on whether or not an argument is specified in the main function (S14). A description will be given assuming that an argument is specified and a multi-thread model is selected (S14).

マルチスレッドモデルが選択されると、doTestWithMultiThread関数が実行される。doTestWithMultiThread関数が実行されると、UriageProcessingModelクラス440がインスタンス化され、testProcessingModelという名前のモデルオブジェクトが生成される(S100)。インスタンス化にともなって実行される詳細な処理内容については、次の図9に関連して説明する。   When the multi-thread model is selected, the doTestWithMultiThread function is executed. When the doTestWithMultiThread function is executed, the UriageProcessingModel class 440 is instantiated and a model object named testProcessingModel is generated (S100). Details of the processing executed in the instantiation will be described with reference to FIG.

次に、MultiThreadFlowControllerクラス452がインスタンス化され、multiThreadFlowControllerという名前のコントロールオブジェクトが生成される(S200)。インスタンス化にともなって実行される詳細な処理内容については、後の図10に関連して説明する。   Next, the MultiThreadFlowController class 452 is instantiated, and a control object named multiThreadFlowController is generated (S200). Details of the processing executed in the instantiation will be described later with reference to FIG.

最後に、コントロールオブジェクトのdoTask関数にモデルオブジェクトが引数として渡されている(S300)。このときにモデルオブジェクトが管理するジョブオブジェクトに対して、コントロールオブジェクトによる「処理の注入」が実行される。doTask関数に関する詳細な処理内容については、後の図10以降に関連して説明する。   Finally, the model object is passed as an argument to the doTask function of the control object (S300). At this time, “injection of processing” by the control object is executed for the job object managed by the model object. Detailed processing contents regarding the doTask function will be described later with reference to FIG.

まとめると、doTestWithMultiThread関数は、モデルオブジェクトとコントロールオブジェクトを生成し、コントロールオブジェクトにモデルオブジェクトを渡して、コントロールオブジェクトに所定の処理を実行させている。   In summary, the doTestWithMultiThread function generates a model object and a control object, passes the model object to the control object, and causes the control object to execute a predetermined process.

図9は、モデルオブジェクト生成時に実行されるソースコードを示す図である。
S100において、UriageProcessingModelクラス440がインスタンス化されるときには、まず、UriageProcessingModel()として示されるコンストラクタ関数が実行される(S102)。このコンストラクタ関数の実行に際して、各ジョブクラスがインスタンス化される(S104)。ここでは、UriageProcessingModelクラス440のメンバ変数として、UriageSourceクラス400、MiseMaSourceクラス406、UriageAggregatorクラス402、MiseMaMatcherクラス408、MiseUriageTotalSinkクラス410およびAreaUriageTotalSinkクラス404の各ジョブクラスがインスタンス化され、それぞれ、uriageSource、miseMaSource、uriageAggregator、miseMaMatcher、miseUriageTotalSinkrおよびareaUriageTotalSinkという名前のジョブオブジェクトが生成される。なお、各ジョブオブジェクトの生成に際しては、それぞれ、NodeFlowControllerクラス500から処理オブジェクトが生成される。継承元のNodeクラス490がNodeFlowControllerクラス500を持つためである。ただし、この段階では処理オブジェクトにはジョブオブジェクトごとに対応した具体的な処理内容は定義されない。また、UriageProcessingModelクラス440のインスタンス化に際しては、モデルベースクラスが持っている関係クラス、すなわち、Connectionクラス430もインスタンス化される。Connectionクラス430は、リスト形式にて各ジョブオブジェクトのつながりを管理するためのクラスである。
FIG. 9 is a diagram illustrating source code executed when a model object is generated.
In S100, when the UriageProcessingModel class 440 is instantiated, first, a constructor function indicated as UriageProcessingModel () is executed (S102). Upon execution of this constructor function, each job class is instantiated (S104). Here, as the member variables of the UriageProcessingModel class 440, the job classes of the UriageSource class 400, the MiseMaSource class 406, the UriageAggregator class 402, the MiseMaMatcher class 408, the MiseUriageTotalSink class 410, and the AreaUriageTotalSink class 404 are instantiated, respectively, uriageSource, miseMaSource, uriageAggregator Job objects named miseMaMatcher, miseUriageTotalSinkr and areaUriageTotalSink are created. When each job object is generated, a processing object is generated from the NodeFlowController class 500. This is because the inheritance source Node class 490 has the NodeFlowController class 500. However, specific processing contents corresponding to each job object are not defined in the processing object at this stage. Further, when instantiating the UriageProcessingModel class 440, a relation class possessed by the model base class, that is, the Connection class 430 is also instantiated. The Connection class 430 is a class for managing the connection between job objects in a list format.

ジョブクラスの中には、後述する「プールクラス」や「アイテムクラス」を持つクラスもある。このようなタイプのジョブクラスがインスタンス化されるときには、プールクラスやアイテムクラスも付随的にインスタンス化される。アイテムクラスは、ノード端末200やデータベース206から取得されるデータや、ジョブオブジェクト間で送受されるデータを保持するためのクラスである。プールクラスは、アイテムオブジェクトを所定個数を上限として保持するためのクラスである。プールクラスやアイテムクラスについては、図14以降に関連して詳述する。   Some job classes have a “pool class” and an “item class” which will be described later. When such a type of job class is instantiated, a pool class and an item class are also instantiated. The item class is a class for holding data acquired from the node terminal 200 and the database 206 and data transmitted and received between job objects. The pool class is a class for holding a predetermined number of item objects as an upper limit. The pool class and item class will be described in detail with reference to FIG.

次に、コンストラクタ関数の中の、createModel関数が実行される(S106)。これにより、S104にて生成された各ジョブオブジェクトが関係オブジェクトにノードとして登録される。こうして、必要なジョブオブジェクトとそのつながりが定義される。いいかえれば、モデルオブジェクトは、その生成時に、登場キャラクタたるジョブオブジェクトと、その関係を示す関係オブジェクトを生成する。   Next, the createModel function in the constructor function is executed (S106). As a result, each job object generated in S104 is registered as a node in the related object. In this way, necessary job objects and their connections are defined. In other words, the model object generates a job object that is an appearance character and a relation object indicating the relationship when the model object is generated.

図10は、コントロールオブジェクト生成時とデータフローの実行開始に対応する部分のソースコードを示す図である。
前の図8に示したdoTestWithMultiThread関数のS200において、MultiThreadFlowControllerクラス452がインスタンス化される。このとき、まず、MultiThreadFlowController()として示されるコンストラクタ関数が実行される(S202)。このコンストラクタ関数の実行によって、ProcessingModelクラス460のインスタンスを保持するmodelという名前の変数が用意される(S204)。このProcessingModelクラス460は、UriageProcessingModelクラス440の継承元となるモデルベースクラスであるから、この段階では、modelという名前の変数には、CDの売上処理に関する具体的なモデルは設定されない。コンストラクタ関数の実行により、MultiThreadFlowControllerクラス452からmultiThreadFlowControllerという名前のコントロールオブジェクトが生成される(図8のS200)。
FIG. 10 is a diagram showing a source code of a part corresponding to the time of generating the control object and the start of execution of the data flow.
In S200 of the doTestWithMultiThread function shown in FIG. 8, the MultiThreadFlowController class 452 is instantiated. At this time, first, a constructor function indicated as MultiThreadFlowController () is executed (S202). By executing this constructor function, a variable named model that holds an instance of the ProcessingModel class 460 is prepared (S204). Since this ProcessingModel class 460 is a model base class from which the UriageProcessingModel class 440 is inherited, a specific model related to CD sales processing is not set in the variable named model at this stage. By executing the constructor function, a control object named multiThreadFlowController is generated from the MultiThreadFlowController class 452 (S200 in FIG. 8).

こうして、図8のS100とS200に示した、モデルオブジェクトとコントロールオブジェクトの生成が完了し、図6に示した各クラスに基づいてさまざまなオブジェクトが生成されることになる。ここまでの処理のことを「生成初期化処理」とよぶことにする。   Thus, the generation of the model object and the control object shown in S100 and S200 of FIG. 8 is completed, and various objects are generated based on the classes shown in FIG. The processing up to this point is called “generation initialization processing”.

先に示した図8のdoTestWithMultiThread関数は、生成初期化処理が終了すると、コントロールオブジェクトのdoTask関数をコールしている(図8のS300)。このとき、モデルオブジェクトがコントロールオブジェクトのdoTask関数の引数として渡されている。モデルオブジェクトは、setModel関数によって、S204にて生成されたmodelという名前のオブジェクトに、図8のS100にて生成されたCDの売上処理に関するtestProcessingModelという名前のモデルオブジェクトを設定している(S310)。こうして、コントロールオブジェクトは、コントロール対象となる具体的なモデルオブジェクトを取得する。   The doTestWithMultiThread function of FIG. 8 shown above calls the doTask function of the control object when the generation initialization process ends (S300 of FIG. 8). At this time, the model object is passed as an argument of the doTask function of the control object. The model object sets the model object named testProcessingModel related to the sales process of the CD generated in S100 of FIG. 8 to the object named model generated in S204 by the setModel function (S310). In this way, the control object acquires a specific model object to be controlled.

次に、doTask関数は、ジョブオブジェクト間でアイテムオブジェクトを送受するための「キュークラス」をインスタンス化する(S320)。キュークラスは、前段にあたるジョブオブジェクトが後段にあたるジョブオブジェクトにアイテムオブジェクトを転送するときのキューとなるクラスである。キュークラスについては図14以降に関連して詳述する。次に、各ジョブオブジェクトに処理を注入するためのinjectFlowController関数を実行する(S330)。なお、S310からS330までの処理のことを「注入初期化処理」とよぶことにする。最後に、mainTask関数を実行して、モデルオブジェクトが集約する各ジョブオブジェクトに実行開始を指示する(S340)。   Next, the doTask function instantiates a “queue class” for sending and receiving item objects between job objects (S320). The queue class is a class that becomes a queue when the job object corresponding to the previous stage transfers the item object to the job object corresponding to the subsequent stage. The queue class will be described in detail with reference to FIG. Next, an injectFlowController function for injecting processing into each job object is executed (S330). The process from S310 to S330 is referred to as “injection initialization process”. Finally, the mainTask function is executed to instruct each job object that the model objects aggregate to start execution (S340).

図11は、図10のS320およびS330までの処理に対応するソースコードを示す図である。
前の図10に示したdoTask関数のS320の実行にともなって、injectRecordStream関数が実行される。これによって、ジョブオブジェクト間でデータを受け渡すためのオブジェクトとして、MTRecordStreamクラスがインスタンス化される。このMTRecordStreamクラスがキュークラスに相当する。このクラスは、前段にあたるジョブオブジェクトから投入されたアイテムオブジェクトを所定個数を上限として保持するキューとして機能する。後段にあたるジョブオブジェクトは、キューオブジェクトからアイテムオブジェクトを取得し、アイテムオブジェクトが保持するデータを読み出す。たとえば、前段にあたるジョブオブジェクトのUriageSourceオブジェクトは、後段にあたるジョブオブジェクトのUriageAggregatorオブジェクトとの関係で設定されたキューオブジェクトにアイテムオブジェクトを格納し、後段のUriageAggregatorオブジェクトは、このキューオブジェクトからアイテムオブジェクトを取得する。ジョブオブジェクト間においてデータの受け渡しをするための基本的なインタフェースも、コントロールオブジェクト側にて定義される。
次に、doTask関数のS330(図10)の実行にともなって、injectFlowController関数が実行される。injectFlowController関数は、関係オブジェクトを走査して、順次ジョブオブジェクトを選択し、各ジョブオブジェクトについてinjectFlowControllerToNode関数を実行する(S332)。
FIG. 11 is a diagram showing source code corresponding to the processes up to S320 and S330 in FIG.
The injectRecordStream function is executed in accordance with the execution of S320 of the doTask function shown in FIG. As a result, the MTRecordStream class is instantiated as an object for passing data between job objects. This MTRecordStream class corresponds to the queue class. This class functions as a queue that holds a predetermined number of item objects input from job objects corresponding to the preceding stage as an upper limit. The job object corresponding to the latter stage acquires the item object from the queue object, and reads the data held by the item object. For example, the UriageSource object of the job object corresponding to the preceding stage stores the item object in the queue object set in relation to the UriageAggregator object of the job object corresponding to the subsequent stage, and the UriageAggregator object of the subsequent stage acquires the item object from this queue object. The basic interface for passing data between job objects is also defined on the control object side.
Next, the injectFlowController function is executed with the execution of S330 (FIG. 10) of the doTask function. The injectFlowController function scans the related objects, sequentially selects job objects, and executes the injectFlowControllerToNode function for each job object (S332).

このinjectFlowControllerToNode関数においては、一時的な処理オブジェクトnfcが生成される。次に、処理対象となるジョブオブジェクトがどのタイプのジョブベースクラスから継承されているかが判定される。たとえば、処理対象のジョブオブジェクトが、RecordStreamSourceクラス480を継承するときには、nfcという名前の処理オブジェクトには、MTRecordStreamSourceクラス510を継承する処理オブジェクトが設定される。たとえば、UriageAggregatorオブジェクトは、RecordStreamAggregatorクラス482に基づくので、nfcにはMTRecordStreamAggregatorオブジェクトが設定される。こうして、処理オブジェクトnfcには、4種類の処理オブジェクトのいずれかが設定される。そして、setTargetNode関数によって、各ジョブオブジェクトに処理オブジェクトが設定される(S334)。この段階で、ジョブオブジェクトの処理内容が決定することになる。すなわち、コントロールオブジェクトによってジョブオブジェクトに処理が「注入」される。各処理オブジェクトは、doTask関数という名前の処理関数を備えており、この処理関数の内容が実際の処理内容を定義づけることになる。
ここでは、ジョブベースクラスに応じて割り当てるべき処理クラスを選択するアルゴリズムを示しているが、ジョブクラスごとに割り当てるべき処理クラスを選択するアルゴリズムは、これ以外にも任意に設計可能である。たとえば、外部イベントの検出等、所定の条件の成否に応じて、割り当てるべき処理クラスを選択・変更してもよい。
In this injectFlowControllerToNode function, a temporary processing object nfc is generated. Next, it is determined which type of job base class the job object to be processed is inherited from. For example, when the job object to be processed inherits the RecordStreamSource class 480, a processing object that inherits the MTRecordStreamSource class 510 is set in the processing object named nfc. For example, since the UriageAggregator object is based on the RecordStreamAggregator class 482, an MTRecordStreamAggregator object is set in nfc. Thus, one of the four types of processing objects is set in the processing object nfc. Then, a processing object is set for each job object by the setTargetNode function (S334). At this stage, the processing content of the job object is determined. That is, the process is “injected” into the job object by the control object. Each processing object has a processing function named doTask function, and the content of this processing function defines the actual processing content.
Here, an algorithm for selecting a processing class to be assigned according to a job base class is shown, but an algorithm for selecting a processing class to be assigned for each job class can be arbitrarily designed. For example, the processing class to be assigned may be selected / changed according to the success or failure of a predetermined condition such as detection of an external event.

図12は、図10のS340の処理に対応するソースコードを示す図である。
注入初期化処理が完了すると、エンタープライズシステム204を実際に稼働させるためのmainTask関数が実行される(S340)。mainTask関数は、関係オブジェクトを走査してジョブオブジェクトを順次選択し、各ジョブオブジェクトに設定されている処理オブジェクトを取得する(S342)。
FIG. 12 is a diagram showing source code corresponding to the processing of S340 in FIG.
When the injection initialization process is completed, a mainTask function for actually operating the enterprise system 204 is executed (S340). The mainTask function scans the related objects, sequentially selects job objects, and acquires the processing objects set in each job object (S342).

そして、処理オブジェクトのメンバ関数として提供されるstartThread関数を実行させる(S344)。こうして処理オブジェクトには、別々のスレッド(以下、「ワーカスレッド」とよぶ)が割り当てられ、各ジョブは別々のコンテキスト(context)で実行されることになる。図4に示したように、エンタープライズシステム204には6つのジョブクラスが定義され、それにあわせて6つの処理クラスがインスタンス化される。ジョブオブジェクトが6つあるためS344は6回実行され、6つのワーカスレッドが次々に実行指示されることになる。mainTask関数の実行スレッド(以下、「メインスレッド」とぶ)を含めると、計7つのスレッドが同時並行的に実行されることになる。6つのワーカスレッドのうち、MiseMaSourceクラス406以外についてのワーカスレッドが、threadListという名前のリストに登録される(S346)。   Then, the startThread function provided as a member function of the processing object is executed (S344). In this way, different threads (hereinafter referred to as “worker threads”) are assigned to the processing objects, and each job is executed in different contexts. As shown in FIG. 4, six job classes are defined in the enterprise system 204, and six processing classes are instantiated accordingly. Since there are six job objects, S344 is executed six times, and six worker threads are instructed to execute one after another. When the execution thread of the mainTask function (hereinafter referred to as “main thread”) is included, a total of seven threads are executed concurrently. Of the six worker threads, worker threads other than the MiseMaSource class 406 are registered in a list named threadList (S346).

6つのワーカスレッドの実行が開始されると、mainTask関数は、threadListをチェックして登録されている各ワーカスレッドが終了しているかをjoin関数によって判定する(S348)。join関数は、判定対象ワーカスレッドが終了していなければブロックされる。そのため、threadListに登録されている5つのワーカスレッドのうちのいずれかが終了していなければ、join関数のブロックによってmainTask関数は終了しない。threadListに登録されている5つのワーカスレッドが終了すると、join関数によるメインスレッドのブロックが解除され、mainTask関数が終了する。これによりエンタープライズシステム204の全体としての処理が終了する。   When the execution of the six worker threads is started, the mainTask function checks the threadList to determine whether each registered worker thread has ended by using the join function (S348). The join function is blocked if the determination target worker thread is not terminated. Therefore, if any one of the five worker threads registered in the threadList has not ended, the mainTask function is not ended by the block of the join function. When the five worker threads registered in the threadList are terminated, the main thread block by the join function is released, and the mainTask function is terminated. As a result, the processing of the entire enterprise system 204 is completed.

MiseMaSourceクラス406についてのワーカスレッドは、threadListに登録されない。したがって、このワーカスレッドが終了していなくても、メインスレッドは終了可能である。MiseMaSourceクラス406についてのワーカスレッドをthreadListに登録しない理由は、以下の通りである。
MiseMaSourceオブジェクトの処理内容は、店マスタデータ306という所定のマスタデータを読み出して、MiseMaMatcherオブジェクトに転送することである。MiseMaSourceオブジェクトは、必ずしも店マスタデータ306の全てを読み出す必要はなく、後段にあたるMiseMaMatcherオブジェクトの処理に必要なだけ読み出せばよい。このような理由から、MiseMaSourceオブジェクトのワーカスレッドは、join関数による終了の待ち合わせ対象から除外されている。一方、UriageSourceオブジェクトは、ノード端末200から取得された全ての売上データ300を処理対象とするため、待ち合わせの対象となっている。すなわち、UriageSourceオブジェクトが売上データ300の全てを取得してUriageAggregatorオブジェクトに渡し終わらなければ、mainTaskは終了しない。
Worker threads for the MiseMaSource class 406 are not registered in the threadList. Therefore, even if this worker thread has not ended, the main thread can be ended. The reason why the worker thread for the MiseMaSource class 406 is not registered in the threadList is as follows.
The processing content of the MiseMaSource object is to read predetermined master data called store master data 306 and transfer it to the MiseMaMatcher object. The MiseMaSource object does not necessarily need to read all of the store master data 306, but only needs to be read for processing the MiseMaMatcher object corresponding to the subsequent stage. For this reason, the worker thread of the MiseMaSource object is excluded from the target of waiting for completion by the join function. On the other hand, the UriageSource object is a target of waiting because all sales data 300 acquired from the node terminal 200 is a processing target. That is, unless the UriageSource object acquires all of the sales data 300 and passes it to the UriageAggregator object, the mainTask does not end.

図13は、図12のS344の処理に対応するソースコードを示す図である。
MTNodeFlowControllerクラス502から継承されるマルチスレッド系の処理クラスは、startThread関数をメンバ関数として備える。この関数が、MultiThreadFlowControllerクラス452からコールされると、新たにワーカスレッドを生成し(S350)、実行開始させる(S352)。こうして、処理関数に相当するdoTask関数がワーカスレッドにて実行される。
FIG. 13 is a diagram showing source code corresponding to the process of S344 of FIG.
The multi-thread processing class inherited from the MTNodeFlowController class 502 includes a startThread function as a member function. When this function is called from the MultiThreadFlowController class 452, a new worker thread is generated (S350) and the execution is started (S352). In this way, the doTask function corresponding to the processing function is executed in the worker thread.

ただし、実行開始させられたあと、ワーカスレッドが実行状態となるか待機状態となるかは、DFDによって定義されたジョブの依存関係の影響を受ける。たとえば、MiseMaSourceオブジェクトの処理内容は、データベース206から店マスタデータ306を取得して後段のMiseMaMatcherオブジェクトに渡すことなので、MiseMaSourceオブジェクトは、通常、他のジョブの処理状態の影響を受けることなくジョブを実行可能である。一方、MiseMaMatcherオブジェクトは、MiseMaSourceオブジェクトから渡されたデータを受け取らなければジョブを実行できない。
このように、6つのワーカスレッドは実行開始されても、必ずしも全てが即時に実行状態となるわけではなく、他のジョブの処理状態に応じて待機状態と実行状態のいずれかの状態に遷移する。結果として、DFDに定義された依存関係にしたがいつつも、複数のジョブが非同期的に実行されることになる。
However, whether or not a worker thread enters an execution state or a standby state after the start of execution is affected by the job dependency defined by the DFD. For example, the processing content of the MiseMaSource object is to acquire the store master data 306 from the database 206 and pass it to the subsequent MiseMaMatcher object, so the MiseMaSource object usually executes a job without being affected by the processing status of other jobs. Is possible. On the other hand, a MiseMaMatcher object cannot execute a job unless it receives data passed from a MiseMaSource object.
As described above, even if the six worker threads are started to be executed, not all of them are immediately put into the execution state, and the state transits to either the standby state or the execution state according to the processing state of other jobs. . As a result, a plurality of jobs are executed asynchronously while following the dependency defined in the DFD.

図14は、ジョブオブジェクト間におけるデータ送受方法を説明するための模式図である。
ジョブ間には、関係クラスの定義にしたがって前段と後段という依存関係が定義される。図4の場合、MiseMaSourceオブジェクトの後段のジョブは、MiseMaMatcherオブジェクトであるが、MiseUriageTotalSinkオブジェクトにとってMiseMaMatcherオブジェクトは前段のジョブにあたる。図14においては、簡単のため、依存関係を有するジョブ1からジョブ4を対象として説明する。ここでいうジョブ1からジョブ4の各ジョブはジョブオブジェクトに対応する。ジョブ1の後段のジョブはジョブ2である。ジョブ2の後段のジョブはジョブ3とジョブ4である。各ジョブは、前段にあたるジョブからその処理結果を示すデータを取得したことを条件として自処理を実行する。
FIG. 14 is a schematic diagram for explaining a data transmission / reception method between job objects.
Dependencies between the previous stage and the subsequent stage are defined between jobs according to the definition of the relationship class. In the case of FIG. 4, the subsequent job of the MiseMaSource object is the MiseMaMatcher object, but for the MiseUriageTotalSink object, the MiseMaMatcher object is the previous job. In FIG. 14, for the sake of simplicity, description will be given for jobs 1 to 4 having a dependency relationship. Each job from job 1 to job 4 here corresponds to a job object. The subsequent job of job 1 is job 2. Jobs subsequent to job 2 are job 3 and job 4. Each job executes its own processing on the condition that data indicating the processing result is acquired from the preceding job.

前段にあたるジョブは、アイテムオブジェクトにデータを記録して、そのアイテムオブジェクトを後段のジョブに渡す。ジョブ間では、データはアイテムオブジェクトによってパッケージされたかたちで送受される。アイテムクラスは、バイナリ形式にてデータを格納するためのバイナリデータ配列を持つ。このバイナリデータ配列に受け渡し対象となるデータが格納される。詳細なデータ構造については図17に関連して詳述する。ジョブ1とジョブ2、ジョブ2とジョブ3、ジョブ2とジョブ4のように前後段の関係にあるジョブ間には、それぞれアイテムオブジェクトが所定個数ずつ設定される。図14においては、各ジョブ間について、それぞれ5個ずつ、計15個のアイテムオブジェクトが生成されている。丸印がアイテムオブジェクトを示し、斜線が施されているアイテムオブジェクトは、データが記録済であることを示す。   The job corresponding to the preceding stage records data in the item object, and passes the item object to the succeeding job. Between jobs, data is sent and received in a form packaged by item objects. The item class has a binary data array for storing data in binary format. Data to be transferred is stored in this binary data array. A detailed data structure will be described in detail with reference to FIG. A predetermined number of item objects are set between jobs in the preceding and following stages, such as job 1 and job 2, job 2 and job 3, and job 2 and job 4. In FIG. 14, a total of 15 item objects are generated, 5 for each job. A circle indicates an item object, and an item object that is shaded indicates that data has been recorded.

ジョブ1とジョブ2の関係においては、前段にあたるジョブ1にはアイテムオブジェクトを一時的に保持するためのプールオブジェクト210が生成される。プールクラスは、アイテムオブジェクトを所定数を上限として保持するためのクラスである。ジョブ2とジョブ3、ジョブ2とジョブ4のそれぞれの関係についてもプールオブジェクト212、プールオブジェクト214が生成される。プールオブジェクト210には、ジョブ1とジョブ2の関係について設定された所定個数のアイテムオブジェクトが格納される。プールオブジェクト212やプールオブジェクト214についても同様である。なお、ジョブ2は、プールオブジェクト212とプールオブジェクト214のように後段のジョブの数に対応した数だけプールオブジェクトを生成せず、共用のプールオブジェクトを一つだけ生成するとしてもよい。この場合、ジョブ2は共用のプールオブジェクトから取得したアイテムオブジェクトに処理結果を記録して、ジョブ3やジョブ4に転送する。ジョブ3やジョブ4は、ジョブ2から受け取ったアイテムオブジェクトからデータを読み出した後は、この共用プールオブジェクトにアイテムオブジェクトを戻す。このように、後段に複数のジョブがある場合にも、1つのプールオブジェクトでアイテムオブジェクトを管理してもよい。   In the relationship between job 1 and job 2, a pool object 210 for temporarily holding an item object is generated in job 1, which is the preceding stage. The pool class is a class for holding a predetermined number of item objects as an upper limit. A pool object 212 and a pool object 214 are also generated for the relationship between job 2 and job 3, and job 2 and job 4, respectively. The pool object 210 stores a predetermined number of item objects set for the relationship between job 1 and job 2. The same applies to the pool object 212 and the pool object 214. Note that the job 2 may not generate as many pool objects as the pool object 212 and the pool object 214 corresponding to the number of jobs in the subsequent stage, but may generate only one shared pool object. In this case, job 2 records the processing result in the item object acquired from the shared pool object, and transfers it to job 3 or job 4. Job 3 and job 4 return the item object to the shared pool object after reading data from the item object received from job 2. As described above, even when there are a plurality of jobs in the subsequent stage, the item object may be managed by one pool object.

ジョブ1は、自処理を実行するとプールオブジェクト210からアイテムオブジェクトを取り出し、その処理結果を記録する。具体的には、取り出したアイテムオブジェクトのバイナリデータ配列に処理結果を示すデータを記録するが、このような記録方法のことを単に「アイテムオブジェクトに記録する」とよぶことにする。ジョブ1は、処理結果を記録したアイテムオブジェクトを、後段にあたるジョブ2との関係で設定されているキューオブジェクト220に投入する。ジョブ2は、キューオブジェクト220からアイテムオブジェクトを取り出し、ジョブ1の処理結果を示すデータを取得する。こうして、ジョブ2は、ジョブ1の処理結果を示すデータに基づいて自処理を実行する。ジョブ2は、データを取得すると、ジョブ1から受け取ったアイテムオブジェクトをプールオブジェクト210に戻す。したがって、ジョブ1とジョブ2の間では、最初に生成された5個のアイテムオブジェクトを再利用しつつ、キューオブジェクト220を介してデータが転送されることになる。同様に、ジョブ2とジョブ3との関係においてはキューオブジェクト222、ジョブ2とジョブ4との関係においてはキューオブジェクト224が設定される。   When job 1 executes its own processing, it retrieves the item object from the pool object 210 and records the processing result. Specifically, data indicating the processing result is recorded in the binary data array of the extracted item object. Such a recording method is simply referred to as “recording in the item object”. The job 1 inputs the item object in which the processing result is recorded to the queue object 220 set in relation to the job 2 in the subsequent stage. The job 2 takes out the item object from the queue object 220 and acquires data indicating the processing result of the job 1. Thus, job 2 executes its own processing based on the data indicating the processing result of job 1. When job 2 acquires the data, it returns the item object received from job 1 to pool object 210. Therefore, between the job 1 and the job 2, data is transferred via the queue object 220 while reusing the five item objects generated first. Similarly, a queue object 222 is set for the relationship between job 2 and job 3, and a queue object 224 is set for the relationship between job 2 and job 4.

ジョブ1はプールオブジェクト210にアイテムオブジェクトが無いときやキューオブジェクト220がアイテムオブジェクトで一杯のときにはブロックされる。同様に、ジョブ2はキューオブジェクト220が空のときにはブロックされる。ジョブ2とジョブ3、ジョブ2とジョブ4との関係についても同様である。
以上に示した処理方法を採用する理由について説明する。
Job 1 is blocked when there is no item object in the pool object 210 or when the queue object 220 is full of item objects. Similarly, job 2 is blocked when queue object 220 is empty. The same applies to the relationship between job 2 and job 3, and job 2 and job 4.
The reason why the processing method described above is employed will be described.

(1)ジョブ間ごとにアイテムオブジェクトをあらかじめ用意する。
仮に、ジョブ1の処理結果が記録されたアイテムオブジェクトをジョブ2が取得し、ジョブ2がこのアイテムオブジェクトにジョブ2の処理結果を上書きして更にジョブ3に渡すとする。このように、1つのアイテムオブジェクトがジョブ1からジョブ2、ジョブ3へと順次転送されていくモデルの場合、各ジョブがブロックされやすくなる。なぜならば、ジョブ1は、ジョブ3がアイテムオブジェクトをジョブ1に返還するか、新たにアイテムオブジェクトを生成しなければ、次の処理結果をジョブ2に渡せなくなるからである。アイテムオブジェクトの生成するというアプローチは、次の、(2)に示す理由により望ましくない。
これに対して、ジョブ1とジョブ2、ジョブ2とジョブ3、ジョブ2とジョブ4の関係ごとにあらかじめアイテムオブジェクトを用意しておけば、ジョブ1は、ジョブ3やジョブ4の処理状態に直接的な影響を受けることなく自処理を実行できる。ジョブ間ごとにアイテムオブジェクトを用意することにより、ジョブ間におけるデータ受け渡し処理をシンプルにすると共に、ブロッキングの発生を抑制できる。
(1) An item object is prepared in advance for each job.
Suppose that job 2 acquires an item object in which the processing result of job 1 is recorded, and job 2 overwrites the processing result of job 2 on this item object and passes it to job 3. As described above, in the model in which one item object is sequentially transferred from job 1 to job 2 and job 3, each job is likely to be blocked. This is because job 1 cannot transfer the next processing result to job 2 unless job 3 returns the item object to job 1 or creates a new item object. The approach of generating item objects is not desirable for the following reason (2).
On the other hand, if an item object is prepared in advance for each relationship between job 1 and job 2, job 2 and job 3, and job 2 and job 4, job 1 is directly in the processing state of job 3 or job 4. The self-processing can be executed without being affected by the effects. By preparing an item object for each job, data passing processing between jobs can be simplified and blocking can be suppressed.

(2)アイテムオブジェクトを再利用する。
ジョブ1はジョブ2へのデータ転送時にアイテムオブジェクトを生成し、ジョブ2はジョブ1からデータを取得するとそのアイテムオブジェクトを破棄(destroy)して、メモリ領域を解放するとしてもよい。しかし、多くのバッチ処理を実行するエンタープライズシステムにおいてこのような方法を採用した場合、アイテムオブジェクトの生成・破棄にともなうオーバーヘッドがシステム全体のパフォーマンスを悪化させかねない。
そこで、ジョブ間ごとにあらかじめアイテムオブジェクトを生成し、これをジョブ間で再利用することによりアイテムオブジェクトの生成・破棄にともなう処理コストを低減している。アイテムオブジェクトの生成コストはエンタープライズシステム204の実行開始時、アイテムオブジェクトの破棄コストは実行終了時に局在化されるため、スループットを向上させることができる。
(2) Reuse item objects.
Job 1 may generate an item object at the time of data transfer to job 2, and when job 2 acquires data from job 1, the item object may be destroyed and the memory area may be released. However, when such a method is adopted in an enterprise system that executes many batch processes, the overhead associated with the creation and destruction of item objects may deteriorate the performance of the entire system.
In view of this, an item object is generated in advance for each job and reused between jobs, thereby reducing processing costs associated with the generation and destruction of the item object. Since the generation cost of the item object is localized at the start of execution of the enterprise system 204 and the destruction cost of the item object is localized at the end of execution, the throughput can be improved.

(3)ジョブ間で再利用対象となるアイテムオブジェクトの数を複数個とする。
前後段のジョブ間でデータ送受のために利用されるアイテムオブジェクトは、複数個、たとえば、5個生成される。アイテムオブジェクトの数は、ジョブの性質やテスト実行の結果に応じて好適な数を求めればよい。仮に、ジョブ1とジョブ2の間でデータを送受するためのアイテムオブジェクトが1つだけの場合、ジョブ2がアイテムオブジェクトからデータを読み出しているときには、ジョブ1はそのアイテムオブジェクトが返還されるまで新たな処理結果をアイテムオブジェクトに記録できない。このため、ジョブ1の処理状態は後段のジョブ2の処理状態の影響を受けやすくなる。
これに対して、複数個のアイテムオブジェクトを再利用対象とすれば、ジョブ1の処理とジョブ2の処理を非同期実行しやすくなる。特にマルチスレッドモデルにおいて、ジョブ間ごとに複数個のアイテムオブジェクトを再利用することにより、システム全体としてのスループットを向上させることができる。
(3) A plurality of item objects are reused between jobs.
A plurality of, for example, five item objects used for data transmission / reception between the preceding and succeeding jobs are generated. What is necessary is just to obtain | require suitable number of item objects according to the property of a job, or the result of test execution. If there is only one item object for sending and receiving data between job 1 and job 2, when job 2 is reading data from the item object, job 1 will be new until the item object is returned. Process results cannot be recorded in the item object. For this reason, the processing state of job 1 is easily affected by the processing state of job 2 in the subsequent stage.
On the other hand, if a plurality of item objects are to be reused, job 1 processing and job 2 processing can be easily executed asynchronously. Particularly in the multi-thread model, the throughput of the entire system can be improved by reusing a plurality of item objects between jobs.

(4)キューオブジェクトを介してアイテムオブジェクトを転送する。
ジョブ1からキューを介さずにアイテムオブジェクトを直接ジョブ2に渡すとすれば、ジョブ1はジョブ2がアイテムオブジェクトを受け取り可能な状態となるまでブロックされることになる。これに対して、キューオブジェクトは、前段のジョブと後段のジョブを非同期的に動作させるため、システム全体としてのスループットを向上させることができる。
(4) The item object is transferred via the queue object.
If the item object is directly passed from job 1 to job 2 without going through the queue, job 1 will be blocked until job 2 is ready to receive the item object. On the other hand, since the queue object operates the preceding job and the succeeding job asynchronously, the throughput of the entire system can be improved.

なお、本発明者が簡単なDFDを定義してシングルスレッドモデルにてテスト実行してみたところ、上記(2)、(3)の方式を採用する場合には合計処理時間は13.3秒であった。これに対し上記(2)、(3)の機能を無効化した場合、同じDFDについてのシステムの合計処理時間は80.5秒であった。特に、アイテムオブジェクトの生成や破棄にともなう処理コストをシステム実行開始時と実行終了時に限定できることが、全体としてのスループット向上に大きく寄与している。   In addition, when the present inventor defined a simple DFD and executed a test using a single thread model, the total processing time was 13.3 seconds when the methods (2) and (3) were adopted. there were. On the other hand, when the functions (2) and (3) are disabled, the total processing time of the system for the same DFD is 80.5 seconds. In particular, the ability to limit the processing costs associated with the creation and destruction of item objects at the start and end of system execution contributes greatly to improving overall throughput.

図15は、アイテムオブジェクトに処理結果を記録してキューに投入する過程に対応したソースコードを示す図である。
同図に示すソースコードは、MiseMaMatcherクラス408が、自処理が完了したときに呼び出すdoProcessMatching関数を示す。doProcessMatching関数が実行されると、プールオブジェクトからアイテムオブジェクトrecordが取得される(S364)。プールオブジェクトにアイテムオブジェクトがなければブロックされる。取得されたアイテムオブジェクトrecordには、処理結果が書き込まれ(S366)、キューオブジェクトに投入される(S368)。キューが一杯のときには、S368の処理はブロックされる。
FIG. 15 is a diagram showing source code corresponding to the process of recording the processing result in the item object and putting it in the queue.
The source code shown in the figure shows a doProcessMatching function that the MiseMaMatcher class 408 calls when its own processing is completed. When the doProcessMatching function is executed, the item object record is acquired from the pool object (S364). If there is no item object in the pool object, it is blocked. The processing result is written in the acquired item object record (S366), and is input to the queue object (S368). When the queue is full, the process of S368 is blocked.

図16は、キューからアイテムオブジェクトを取得して前段のジョブの処理結果を取得する過程に対応したソースコードを示す図である。
MiseMaMatcherオブジェクトの後段のジョブオブジェクトは、図4によるとMiseUriageTotalSinkオブジェクトである。同図に示すソースコードは、MiseUriageTotalSinkの処理オブジェクトとなるMTRecordStreamSinkクラス516が、自処理の開始に際して呼び出すdoTask関数を示す。まず、前段のジョブオブジェクトとの関係で設定されているキューオブジェクトからアイテムオブジェクトrecordを取得する(S370)。キューが空であれば、S370の処理はブロックされる。
FIG. 16 is a diagram illustrating source code corresponding to the process of acquiring the item object from the queue and acquiring the processing result of the preceding job.
The job object subsequent to the MiseMaMatcher object is a MiseUriageTotalSink object according to FIG. The source code shown in the figure shows a doTask function that the MTRecordStreamSink class 516 serving as a processing object of MiseUriageTotalSink calls at the start of its own processing. First, the item object record is acquired from the queue object set in relation to the previous job object (S370). If the queue is empty, the process of S370 is blocked.

そのあと、MiseUriageTotalSinkクラス410のメンバ関数であるdoWrite関数を実行し、doWrite関数によって、MiseUriageTotalSinkクラス410で実装された具体的な出力処理が実行される(S372)。次に、RecordUtil.releaseIfNeeded関数が実行され、前段のジョブのプールオブジェクトにS370で取得したアイテムオブジェクトを返還している(S374)。   After that, the doWrite function which is a member function of the MiseUriageTotalSink class 410 is executed, and the specific output processing implemented in the MiseUriageTotalSink class 410 is executed by the doWrite function (S372). Next, the RecordUtil.releaseIfNeeded function is executed, and the item object acquired in S370 is returned to the pool object of the preceding job (S374).

図17は、アイテムオブジェクトの構造を説明するための模式図である。
アイテムオブジェクトは、前後段のジョブ間のみならず、MiseMaSourceクラス406やUriageSourceクラス400がノード端末200やデータベース206からデータを取得するときにも利用される。ここでは、データA、データB、データCおよびデータDの4種類のデータの構造体として示されるデータXを対象として説明する。データXは、データA、データB、データYを含み、データYはデータCとデータDを含む。データA〜データDのように基本単位となるデータのことを「要素データ」、データXやデータYのように、要素データを複数含んで構成される構造体型のデータのことを「集合データ」とよぶことにする。
FIG. 17 is a schematic diagram for explaining the structure of an item object.
The item object is used not only between the preceding and succeeding jobs but also when the MiseMaSource class 406 or the UriageSource class 400 acquires data from the node terminal 200 or the database 206. Here, description will be made on data X shown as a structure of four types of data, data A, data B, data C, and data D. Data X includes data A, data B, and data Y, and data Y includes data C and data D. “Element data” refers to basic data such as data A to data D, and “aggregate data” refers to structure type data including a plurality of element data such as data X and data Y. I will call it.

オブジェクト指向言語で記述されたコンピュータプログラムの場合、ファイルやデータベースからデータを読み出すときには、通常、読み出したデータに応じて型変換処理が実行される。たとえば、バイナリ形式で読み出したデータAのデータ型が整数型として定義されていれば、データAを整数として保持するためのメモリ領域を確保した上で、データAをメモリに記録する。また、データXのような集合データであれば、データXのデータ構造に対応してメモリを確保し、各要素データが記録される。データXの場合であれば、データA、B、C、D、Y、Xの5つのデータ型に対応して、数値データや文字列データ、あるいは、構造体データとしてメモリに記録されることになる。データ型に対応して一種のデータオブジェクトを生成することにより、プログラマがデータを扱いやすくなっている。しかし、本発明者は、多くのバッチ処理を実行するエンタープライズシステムにおいては、型変換処理による処理コストがシステム全体としてのパフォーマンスを大きく低下させかねないと想到した。   In the case of a computer program written in an object-oriented language, when data is read from a file or database, a type conversion process is usually executed according to the read data. For example, if the data type of the data A read in binary format is defined as an integer type, the data A is recorded in the memory after securing a memory area for holding the data A as an integer. In the case of collective data such as data X, a memory is secured corresponding to the data structure of data X, and each element data is recorded. In the case of data X, numerical data, character string data, or structure data is recorded in the memory corresponding to the five data types of data A, B, C, D, Y, and X. Become. By creating a kind of data object corresponding to the data type, the programmer can easily handle the data. However, the present inventor has realized that in an enterprise system that executes many batch processes, the processing cost of the type conversion process may greatly reduce the performance of the entire system.

そこで、本実施例においては、データベース206として形成されるファイルシステムから読み出したデータや、ジョブの処理結果を示すデータは、アイテムオブジェクトのバイナリデータ配列にバイナリ形式のまま格納するものとしている。すなわち、ファイルシステムからデータを取得するときには、データの型変換処理を実行しない。ここでは、図14のジョブ1が、所定のデータベースからデータXを読み出す場合を例として説明する。   Therefore, in this embodiment, data read from the file system formed as the database 206 and data indicating job processing results are stored in the binary format of the item object in binary format. That is, when data is acquired from the file system, data type conversion processing is not executed. Here, a case where job 1 in FIG. 14 reads data X from a predetermined database will be described as an example.

ジョブ1とデータベースとの関係において、1個のアイテムオブジェクトRIXが生成されているとする。ジョブ1は、データベースからデータXを取得すると、そのままアイテムオブジェクトRIXのバイナリデータ配列にデータXを記録する。データXは、計64バイトのデータであり、24バイトのデータA、16バイトのデータB、8バイトのデータC、16バイトのデータDの4種類の要素データを含む。ジョブ1がデータベースから取得するデータXのデータ構造は、ジョブ1にとって既知であるとする。そのため、アイテムクラスRIXにおいては、バイナリデータ配列のサイズが、あらかじめ64バイトに設定されている。   Assume that one item object RIX is generated in relation to the job 1 and the database. When the job 1 acquires the data X from the database, the job 1 records the data X in the binary data array of the item object RIX as it is. The data X is a total of 64 bytes of data, and includes four types of element data: 24-byte data A, 16-byte data B, 8-byte data C, and 16-byte data D. It is assumed that the data structure of the data X acquired by the job 1 from the database is known to the job 1. Therefore, in the item class RIX, the size of the binary data array is set to 64 bytes in advance.

アイテムクラスRIXは、更に、オフセット値とサイズ値、バイナリデータ配列へのポインタ(pointer)を保持する。オフセット値は、管理対象となるデータXのバイナリデータ配列における開始位置、サイズ値はデータXのサイズを示す。データXは、バイナリデータ配列の1バイト目から64バイト目までのデータなので、オフセット値は0、サイズ値は64(バイト)となる。データXは、データA、データB、データYを含むため、アイテムクラスRIXがインスタンス化されるときには、データA、データB、データYを管理するためのアイテムクラスRIA、RIB、RIYも付随してインスタンス化される。アイテムオブジェクトRIXは、下位のアイテムオブジェクトRIA、RIB、RIYにアクセスするためのポインタもメンバ変数として保持する。   The item class RIX further holds an offset value, a size value, and a pointer to a binary data array. The offset value indicates the start position in the binary data array of the data X to be managed, and the size value indicates the size of the data X. Since the data X is data from the first byte to the 64th byte of the binary data array, the offset value is 0 and the size value is 64 (bytes). Since the data X includes data A, data B, and data Y, when the item class RIX is instantiated, item classes RIA, RIB, and RIY for managing the data A, data B, and data Y are also attached. Instantiated. The item object RIX also holds pointers for accessing lower-level item objects RIA, RIB, and RIY as member variables.

アイテムクラスRIAはデータAを管理する。データAの実体は上位のアイテムクラスRIXのバイナリデータ配列に格納されている。アイテムクラスRIAは、データAについてのオフセット値、サイズ値およびデータAを格納するバイナリデータ配列へのポインタを保持する。アイテムオブジェクトRIAのオフセット値は0、サイズ値は24となる。バイナリデータ配列の1バイト目から23バイト目までが、データAだからである。処理オブジェクトは、たとえば、
int dataA = RIX.RIA.getNum();
のような形式にて、アイテムオブジェクトRIXを介して、アイテムオブジェクトRIAのgetNum関数により、データAを整数値として取り出すことができる。処理オブジェクトがデータAを必要としたときに、バイナリデータ配列中のデータAが抽出され、getNum関数による型変換処理が実行されることになる。いいかえれば、データAを取り出す必要が生じない限り、データAはバイナリデータの一部として扱われる。たとえば、データXの複製やデータXと別のデータとの比較の場合には、データAの型変換は実行する必要がない。
Item class RIA manages data A. The substance of data A is stored in the binary data array of the upper item class RIX. The item class RIA holds an offset value for the data A, a size value, and a pointer to a binary data array that stores the data A. The offset value of the item object RIA is 0, and the size value is 24. This is because the data from the first byte to the 23rd byte of the binary data array. The processing object is, for example,
int dataA = RIX.RIA.getNum ();
The data A can be extracted as an integer value by the getNum function of the item object RIA via the item object RIX in the format as shown in FIG. When the processing object requires data A, data A in the binary data array is extracted, and type conversion processing by the getNum function is executed. In other words, data A is treated as a part of binary data unless it is necessary to extract data A. For example, in the case of copying data X or comparing data X with another data, type conversion of data A need not be executed.

少なくとも、データベースからデータXを取り出す段階では、データXに関して型変換処理を実行する必要がない。このような処理方式により型変換にともなう処理負荷を抑制している。実際、本発明者が簡単なDFDについてのシステムをテスト実行してみたところ、データベースからのデータ読み出し時に型変換処理を実行しない上記方式を採用すれば13.3秒の処理時間ですむところ、常に型変換処理を実行する方式に変更すると、37.1秒の処理時間がかかった。オブジェクト指向言語においては、「データをユーザが取り扱いやすいかたちに構造化する」のが基本的な思想となる。これに対して、本発明者は、型変換処理によるデータの構造化するための処理負荷が、オブジェクトの生成・破棄と同様に、エンタープライズシステムではスループットの低下要因となりやすいと考えた。そこで、上記したように、実際に必要になるまで型変換処理を実行せず、必要でない限りバイナリデータのままでデータを取り扱うというアプローチによって、システム全体のスループットを向上させることに成功した。   At least in the stage of extracting the data X from the database, it is not necessary to perform the type conversion process on the data X. The processing load accompanying the type conversion is suppressed by such a processing method. Actually, when the present inventor tried to test a simple DFD system, if the above method that does not execute the type conversion process when reading data from the database is adopted, the processing time of 13.3 seconds is always required. Changing to a method that executes type conversion processing took 37.1 seconds of processing time. In object-oriented languages, the basic idea is to “structure data in a way that users can easily handle”. On the other hand, the present inventor considered that the processing load for structuring data by the type conversion process is likely to cause a decrease in throughput in the enterprise system, as in the case of object generation / discard. Therefore, as described above, we succeeded in improving the throughput of the entire system by an approach that does not execute the type conversion process until it is actually needed and handles the data as binary data unless necessary.

以下同様に、アイテムクラスRIBはデータBを管理する。オフセット値は24、サイズ値は16となる。アイテムクラスRIYは、データCおよびデータDの構造体であるデータYを管理するクラスである。オフセット値は40、サイズ値は24となる。データYは、要素データであるデータCとデータDを含む構造体なので、アイテムクラスRIYがインスタンス化されるときには、データC、データDを管理するためのアイテムクラスRIC、RIDも付随してインスタンス化される。アイテムオブジェクトRIYは、下位のアイテムオブジェクトRIC、RIDにアクセスするためのポインタをメンバ変数として保持する。
たとえば、処理オブジェクトは、
string dataD = RIX.RIY.RID.getString();
のような形式にて、アイテムオブジェクトRIXを介してアイテムオブジェクトRIDのgetString関数により、データDを文字列型として取り出すことができる。
Similarly, the item class RIB manages the data B. The offset value is 24 and the size value is 16. The item class RIY is a class for managing data Y that is a structure of data C and data D. The offset value is 40 and the size value is 24. Since the data Y is a structure including data C and data D as element data, when the item class RIY is instantiated, the item classes RIC and RID for managing the data C and data D are also instantiated. Is done. The item object RIY holds a pointer for accessing the lower item objects RIC and RID as a member variable.
For example, the processing object is
string dataD = RIX.RIY.RID.getString ();
In such a format, the data D can be extracted as a character string type by the getString function of the item object RID via the item object RIX.

ジョブ1とジョブ2のように、ジョブ間におけるデータの送受についても同様である。ジョブ1は、ジョブ1とジョブ2との関係で生成されるアイテムオブジェクトのバイナリデータ配列に処理結果を示すデータを記録して、キューオブジェクト220に投入する。このとき、ジョブ2は、アイテムオブジェクトからバイナリデータを読み出して、バイナリデータに含まれる要素データのうち、型変換が必要なデータだけについて型変換処理を実行すればよい。このような処理方法によれば、スループットを向上させつつ、データ取り扱い時の利便性を担保することができる。型変換処理にともなう処理コストは、通常、微々たるものであるが、大量のデータをバッチ処理するエンタープライズシステム204の場合には、無視しがたいものとなる。必要なときだけ型変換を実行するジョブ管理装置100は、このような処理コストを最小限度に抑制することができる。   The same applies to data transmission / reception between jobs as in job 1 and job 2. The job 1 records the data indicating the processing result in the binary data array of the item object generated by the relationship between the job 1 and the job 2 and inputs it to the queue object 220. At this time, the job 2 may read the binary data from the item object and execute the type conversion process only on the data that needs the type conversion among the element data included in the binary data. According to such a processing method, it is possible to ensure convenience when handling data while improving throughput. The processing cost associated with the type conversion processing is usually insignificant, but is difficult to ignore in the case of the enterprise system 204 that batch-processes a large amount of data. The job management apparatus 100 that executes type conversion only when necessary can suppress such processing costs to a minimum.

以上の実施例に示したジョブ管理装置100によれば、モデルオブジェクトとコントロールオブジェクトによって、ジョブの静的な関係定義と、ジョブの動的な処理定義を明確に分離できる。
COBOLなどの手続き型言語の場合、これら2種類の定義は一体としてなされることが多かった。そのため、開発者は、ジョブの静的な関係定義と動的な処理定義を同時に意識しながらシステムを設計する必要があった。これに対して、本実施例にて示したフレームワークによれば、これら2種類の定義を明確に分離できる。そのため、ジョブの処理定義に過度に影響されることなく、ジョブの関係定義を行うことができる。また、その逆も真である。このような分離設計を可能とするフレームワークは、エンタープライズシステム204の拡張性・保守性・堅牢性を高める上で効果がある。
According to the job management apparatus 100 shown in the above embodiment, the static relation definition of the job and the dynamic process definition of the job can be clearly separated by the model object and the control object.
In the case of a procedural language such as COBOL, these two types of definitions are often made as a unit. For this reason, the developer has to design the system while being aware of the static relation definition of the job and the dynamic process definition at the same time. On the other hand, according to the framework shown in the present embodiment, these two types of definitions can be clearly separated. For this reason, it is possible to define job relations without being excessively influenced by the job process definition. The reverse is also true. A framework that enables such a separation design is effective in enhancing the expandability, maintainability, and robustness of the enterprise system 204.

たとえば、一部のジョブオブジェクトにだけ処理を注入することにより、エンタープライズシステム204の一部の機能だけのテストを、コントロールオブジェクト側の変更操作だけで実現できる。
具体例として、100個のジョブオブジェクトによって構成されるエンタープライズシステム204のうち、3個のジョブオブジェクトの機能だけをテストしたい場合について説明する。このような場合、まず、100個のジョブオブジェクトを生成しておく。そして、実際には、この3個のジョブオブジェクトにだけ処理を注入する。次に、さきほどの3個のジョブオブジェクトを含む5個のジョブオブジェクトの機能をテストしたい場合には、生成済の100個のジョブオブジェクトのうち、今度は5個のジョブオブジェクトに処理を注入する。すなわち、はじめに100個のジョブオブジェクトを生成しておけば、2回目のテストのために新たにテスト対象として加わった2個のジョブオブジェクトを生成する必要がない。このような処理方法によると、最初に全てのジョブオブジェクトを生成しておけば、テスト対象の変更により新たなインスタンス化処理を実行しなくて済むというメリットがある。
For example, by injecting processing only to a part of job objects, only a part of the functions of the enterprise system 204 can be tested only by a change operation on the control object side.
As a specific example, a case where only the functions of three job objects in the enterprise system 204 configured by 100 job objects are to be tested will be described. In such a case, first, 100 job objects are generated. In practice, processing is injected only into these three job objects. Next, when it is desired to test the function of the five job objects including the three job objects, the processing is injected into five job objects among the already generated 100 job objects. That is, if 100 job objects are generated first, it is not necessary to generate two job objects newly added as test targets for the second test. According to such a processing method, if all job objects are generated first, there is an advantage that it is not necessary to execute a new instantiation process due to a change of a test target.

本実施例に示すエンタープライズシステム204の場合、ジョブオブジェクトはすべてモデルクラスによって生成され、他のジョブクラスから生成されることはない。このため、ジョブオブジェクトの生成に関しても、ジョブクラスに先天的な依存関係を持たさなくて済む。これにより、各ジョブクラスの独立性を高めることができる。また、プログラマは、UriageProcessingModelクラス440を参照することにより、処理対象となるジョブクラスを一元的に参照できるため、ソースコードの可読性を高める効果もある。   In the case of the enterprise system 204 shown in the present embodiment, all job objects are generated by model classes and are not generated from other job classes. For this reason, it is not necessary to have an innate dependency in the job class for the generation of the job object. Thereby, the independence of each job class can be improved. In addition, the programmer can refer to the UriageProcessingModel class 440 so that the job class to be processed can be referred to in an integrated manner, thereby improving the readability of the source code.

また、図6に関連して説明したように、ジョブクラスは典型的な4つのジョブベースクラスのいずれかを継承するかたちで定義されているため、何十、何百、何千というジョブオブジェクトを制御する場合であっても、ジョブクラスの設計負担が大幅に軽減される。これは、処理クラスやモデルクラスなど他のクラスについても同様である。   In addition, as described with reference to FIG. 6, since job classes are defined by inheriting one of the typical four job base classes, dozens, hundreds, and thousands of job objects are included. Even in the case of control, the job class design burden is greatly reduced. The same applies to other classes such as a processing class and a model class.

本実施例においては、マルチスレッドモデルとして、複数のジョブを別々のワーカスレッドで実行している。そのため、コントロールクラスや処理クラスを設計するプログラマはジョブの依存関係をほとんど意識する必要がない。各ジョブは前段のジョブや後段のジョブの処理状態に応じて自動的に実行状態と待機状態のいずれかに遷移するため、複数のジョブが関係クラスにおいて定義された依存関係にしたがって実行されることになる。マルチスレッドモデルは、DFDにおいてフローが枝分かれするほど、全体としてのスループットを向上させる上で有効となる。   In this embodiment, as a multi-thread model, a plurality of jobs are executed by different worker threads. Therefore, programmers who design control classes and processing classes need hardly be aware of job dependencies. Each job automatically transitions to either the execution state or standby state depending on the processing status of the preceding and succeeding jobs, so that multiple jobs are executed according to the dependencies defined in the relationship class. become. The multi-thread model is more effective in improving the overall throughput as the flow branches in the DFD.

ジョブ管理装置100では、シングルスレッドモデルとマルチスレッドモデルを実行時に簡単に切り換えることができる。DFDにおける依存関係によっては、シングルスレッドモデルの方が、マルチスレッドモデルよりもシステム全体のスループットが高くなることもある。モデルクラスとコントロールクラスが明確に分離されているために、このようなマルチスレッドとシングルスレッドの切り換えを簡単に設定できる。このため、DFDの定義がなされた後や変更後でも、好適な実行モデルを適宜選択できることになる。   In the job management apparatus 100, the single thread model and the multi-thread model can be easily switched at the time of execution. Depending on the dependency in DFD, the single thread model may have a higher overall system throughput than the multi-thread model. Since the model class and the control class are clearly separated, switching between multithreading and single threading can be easily set. For this reason, a suitable execution model can be selected as appropriate even after the DFD is defined or changed.

ジョブ管理装置100では、ジョブオブジェクトはアイテムオブジェクトを介してデータを取り扱っている。アイテムクラスという所定クラスによってデータを取り扱うためのインタフェースがフォーマット化されている。データを扱うジョブクラスと、具体的な処理内容が定義される処理クラスと共に、ジョブクラスが取り扱うデータを格納するためのアイテムクラスを定義することによって、プログラム全体としての可読性を高める効果がある。たとえば、UriageProcessingModelクラス440に新しいジョブクラスが追加されたときにも、そのジョブクラスから出力されるデータや入力されるデータも、アイテムクラスのインタフェースを使って扱える。このように、アイテムクラスによりデータを取り扱うためのインタフェースを統一することにより、エンタープライズシステム204の機能拡張や変更が容易となる。   In the job management apparatus 100, job objects handle data via item objects. An interface for handling data is formatted according to a predetermined class called an item class. By defining an item class for storing data handled by the job class together with a job class that handles data and a processing class that defines specific processing contents, there is an effect of improving the readability of the entire program. For example, even when a new job class is added to the UriageProcessingModel class 440, data output from the job class and input data can be handled using the item class interface. In this way, by unifying the interface for handling data by item class, it becomes easy to expand or change the function of the enterprise system 204.

COBOLのような手続き型言語に比べて、JAVA(登録商標)のようなオブジェクト指向言語は、コードの再利用性・保守性・堅牢性などの諸点において優れている。その反面、手続き型言語よりもオーバーヘッドが発生しやすいという難点がある。本実施例においては、オブジェクト指向言語の優位性を確保しつつ、このようなオーバーヘッドを抑制するために、主として、以下のような方式を採用している。
1.複数のアイテムオブジェクトを初期生成しておき、これらを循環的に再利用することにより、アイテムオブジェクトの生成・破棄にともなう処理コストを抑制する。
2.アイテムオブジェクトの受け渡しのためのキューを用意することにより、各ジョブの非同期性を高める。
3.アイテムオブジェクトはバイナリ形式にてデータを取り扱い、抽出が必要なときだけ型変換処理を実行することにより、型変換にともなう処理コストを低減する。
本実施例に示したジョブ管理装置100によれば、オブジェクト指向の枠組みを維持することによりオブジェクト指向言語の優位性を活かしつつも、データの送受や変換に関するオーバーヘッドの発生を抑制することにより、手続き型言語並のスループットと、オブジェクト指向言語の利点を両立させている。
Compared to a procedural language such as COBOL, an object-oriented language such as JAVA (registered trademark) is superior in terms of code reusability, maintainability, and robustness. On the other hand, there is a difficulty that overhead is generated more easily than procedural languages. In the present embodiment, in order to suppress such overhead while securing the superiority of the object-oriented language, the following method is mainly adopted.
1. By initially generating a plurality of item objects and reusing them cyclically, processing costs associated with the generation and destruction of the item objects are suppressed.
2. By preparing a queue for passing item objects, the asynchronous nature of each job is improved.
3. Item objects handle data in a binary format, and perform type conversion processing only when extraction is necessary, thereby reducing processing costs associated with type conversion.
According to the job management apparatus 100 shown in the present embodiment, while maintaining the object-oriented framework and utilizing the superiority of the object-oriented language, the generation of overhead associated with data transmission / reception and conversion is suppressed, thereby reducing the procedure. It combines the throughput of a type language with the advantages of an object-oriented language.

なお、ジョブ管理装置100の機能は、複数のハードウェア資源によって実現されてもよい。たとえば、ジョブオブジェクトは、複数のジョブ実行装置に分散配置されてもよい。このような態様によれば、ジョブ実行装置Aでジョブオブジェクトαの処理を実行しつつ、ジョブ実行装置Bでジョブオブジェクトβの処理を実行するという処理方法が可能となる。これにより、時間的な効率化だけでなく、処理負荷の分散も効率的に行うことができる。コントロールクラスは、ジョブ実行装置群において処理負荷が局所化しないように、他のジョブ実行装置よりも処理負荷が軽い状態にあるジョブ実行装置に対して優先的にジョブを割り当ててもよい。従来、ジョブの分散配置を実現するためには、複数のジョブ実行装置への分散配置を前提とした設計が必要であったが、本実施例に示した設計方法によれば、ジョブ管理装置100から外部のジョブ実行装置にジョブの実行主体を移行させるのが容易となる。   Note that the function of the job management apparatus 100 may be realized by a plurality of hardware resources. For example, job objects may be distributed and arranged in a plurality of job execution devices. According to such an aspect, a processing method is possible in which the job execution apparatus B executes the process of the job object β while the job execution apparatus B executes the process of the job object β. Thereby, not only the time efficiency but also the processing load can be distributed efficiently. The control class may preferentially assign jobs to job execution apparatuses that are lighter in processing load than other job execution apparatuses so that the processing load is not localized in the job execution apparatus group. Conventionally, in order to realize the distributed arrangement of jobs, a design on the premise of distributed arrangement to a plurality of job execution apparatuses has been required. Therefore, it is easy to transfer a job execution subject from an external job execution device to an external job execution device.

以上、実施の形態をもとに本発明を説明した。なお本発明はこの実施の形態に限定されることなく、そのさまざまな変形例もまた、本発明の態様として有効である。たとえば、本実施例においては、エンタープライズシステムを想定して説明したが、より具体的には、電子商取引、物流管理などへの応用が考えられる。また、本実施例において示したフレームワークは、ワークフロー管理のように、複数のジョブを定義して制御するというモデルに広く応用可能である。   The present invention has been described above based on the embodiment. The present invention is not limited to this embodiment, and various modifications thereof are also effective as aspects of the present invention. For example, in the present embodiment, the description has been made assuming an enterprise system, but more specifically, application to electronic commerce, logistics management, and the like can be considered. Further, the framework shown in this embodiment can be widely applied to a model in which a plurality of jobs are defined and controlled as in workflow management.

請求項に記載のジョブオブジェクト生成部の機能は、本実施例においては主としてUriageProcessingModelクラス440によって実現される。請求項に記載のジョブリスト情報生成部の機能は、本実施例においては主としてUriageProcessingModelクラス440やConnectionクラス430によって実現される。請求項に記載の処理注入部と実行制御部の機能は、本実施例においては、主としてMultiThreadFlowControllerクラス452によって実現される。したがって、請求項に記載のモデルオブジェクト生成機能は、本実施例においては主としてモデル管理部140、とりわけ、UriageProcessingModelクラス440によって実現される。請求項に記載のコントロールオブジェクト生成機能は、本実施例においてはフロー制御部150、とりわけ、MultiThreadFlowControllerクラス452によって実現される。請求項に記載の処理関数は、本実施例においては、たとえば、図13にて示したdoTask関数が相当する。請求項に記載のアイテムオブジェクト生成部の機能は、各ジョブオブジェクトのコンストラクタや初期化用関数によって実現される。請求項に記載のアイテムオブジェクト保持部の機能は、プールクラスによって実現される。請求項に記載のキュー生成部の機能は、コントロールクラスによって実現され、キューの機能はキュークラスによって実現される。
このほかにも、請求項に記載の各構成要件が果たすべき機能は、本実施例において示された各機能ブロックの単体もしくはそれらの連係によって実現されることも当業者には理解されるところである。
The function of the job object generation unit described in the claims is mainly realized by the UriageProcessingModel class 440 in this embodiment. The function of the job list information generation unit described in the claims is realized mainly by the UriageProcessingModel class 440 and the Connection class 430 in this embodiment. The functions of the processing injection unit and the execution control unit described in the claims are mainly realized by the MultiThreadFlowController class 452 in this embodiment. Therefore, the model object generation function described in the claims is realized mainly by the model management unit 140, in particular, the UriageProcessingModel class 440 in this embodiment. The control object generation function described in the claims is realized by the flow control unit 150, particularly, the MultiThreadFlowController class 452 in the present embodiment. The processing function described in the claims corresponds to, for example, the doTask function shown in FIG. 13 in this embodiment. The function of the item object generation unit described in the claims is realized by a constructor or an initialization function of each job object. The function of the item object holding unit described in the claims is realized by a pool class. The function of the queue generation unit described in the claims is realized by the control class, and the function of the queue is realized by the queue class.
In addition, it should be understood by those skilled in the art that the functions to be fulfilled by the constituent elements described in the claims are realized by the individual functional blocks shown in the present embodiment or their linkage. .

以上の実施の形態および変形例から把握される発明のいろいろな態様をすでに特許請求の範囲に記載したものも含む形にて以下に例示する。   Various aspects of the invention grasped from the above embodiments and modifications will be exemplified below in the form including those already described in the claims.

A1.前段にあたるジョブの出力データに基づいて後段にあたるジョブが実行されるように依存関係が定められた複数のジョブを実行するための装置であって、
ジョブのタイプに応じてあらかじめ定義されたクラスから、ジョブオブジェクトを生成するジョブオブジェクト生成部と、
各ジョブオブジェクトの依存関係を示すジョブリスト情報を生成するジョブリスト情報生成部と、
ジョブの処理内容を示す処理関数を、ジョブオブジェクトが生成された後に設定する処理注入部と、
前記ジョブリスト情報を参照してジョブオブジェクトを選択し、そのジョブオブジェクトについて設定された処理関数を実行させる実行指示部と、
を備えることを特徴とするジョブ管理装置。
A1. An apparatus for executing a plurality of jobs whose dependencies are determined so that a job corresponding to the subsequent stage is executed based on output data of the job corresponding to the preceding stage,
A job object generation unit that generates a job object from a predefined class according to the type of job,
A job list information generation unit for generating job list information indicating the dependency of each job object;
A processing injection unit for setting a processing function indicating the processing content of the job after the job object is generated;
An execution instruction unit that selects a job object with reference to the job list information and executes a processing function set for the job object;
A job management apparatus comprising:

A2.前記実行指示部によって選択されたジョブオブジェクトの処理関数は、前記ジョブリスト情報に基づいて次に出力データを渡すべきジョブを特定し、特定したジョブについての処理関数を実行させることを特徴とするA1に記載のジョブ管理装置。   A2. The processing function of the job object selected by the execution instruction unit specifies a job to which output data is to be passed next based on the job list information, and executes the processing function for the specified job. The job management device described in 1.

A3.ジョブオブジェクトは、他のジョブオブジェクトによって生成されることはなく、前記ジョブオブジェクト生成部によって直接生成されることを特徴とするA1またはA2に記載のジョブ管理装置。   A3. The job management apparatus according to A1 or A2, wherein the job object is not generated by another job object but directly generated by the job object generation unit.

A4.前記ジョブオブジェクト生成部と前記ジョブリスト情報生成部の各機能をその機能の一部として含むオブジェクトとしてモデルオブジェクトを生成するモデルオブジェクト生成部と、
前記処理注入部と前記実行指示部の各機能をその機能の一部として含むオブジェクトとしてコントロールオブジェクトを生成するコントロールオブジェクト生成部と、を更に備え、
前記コントロールオブジェクトは、前記モデルオブジェクトを処理対象とすることによって、前記処理注入部と前記実行指示部の各機能を発揮させることを特徴とするA1からA3のいずれかに記載のジョブ管理装置。
A4. A model object generation unit that generates a model object as an object including each function of the job object generation unit and the job list information generation unit as a part of the function;
A control object generation unit that generates a control object as an object including each function of the processing injection unit and the execution instruction unit as part of the function;
The job management apparatus according to any one of A1 to A3, wherein the control object exhibits the functions of the processing injection unit and the execution instruction unit by setting the model object as a processing target.

A5.ジョブオブジェクトは、処理関数をメンバ関数として含む処理オブジェクトと関連づけられ、
前記処理注入部は、ジョブオブジェクトの生成後に、ジョブオブジェクトに処理オブジェクトを設定することにより、ジョブオブジェクトについての処理関数を設定することを特徴とするA1からA4のいずれかに記載のジョブ管理装置。
A5. A job object is associated with a processing object that includes a processing function as a member function,
The job management apparatus according to any one of A1 to A4, wherein the processing injection unit sets a processing function for a job object by setting the processing object to the job object after the job object is generated.

A6.前記処理注入部は、ジョブオブジェクトが基づくクラスのタイプに応じて、設定すべき処理オブジェクトを選択することを特徴とするA5に記載のジョブ管理装置。   A6. The job management apparatus according to A5, wherein the processing injection unit selects a processing object to be set according to a class type on which the job object is based.

A7.各処理関数は時間的に並行して実行可能であって、
所定の処理関数は、前記ジョブリスト情報を参照して次に実行すべき複数の処理関数を特定し、前記複数の処理関数を時間的に並行して実行させることを特徴とするA1からA6のいずれかに記載のジョブ管理装置。
A7. Each processing function can be executed in parallel in time,
A predetermined processing function refers to the job list information, specifies a plurality of processing functions to be executed next, and executes the plurality of processing functions in parallel in time. The job management apparatus according to any one of the above.

A8.前記ジョブオブジェクト生成部は、ネットワークを介して接続された複数の外部装置に対して複数のジョブオブジェクトを分散配置可能であり、
前記複数の外部装置に分散配置された各ジョブオブジェクトの処理関数は時間的に並行して実行可能であることを特徴とするA1からA7のいずれかに記載のジョブ管理装置。
A8. The job object generation unit can distribute a plurality of job objects to a plurality of external devices connected via a network,
The job management apparatus according to any one of A1 to A7, wherein processing functions of the job objects distributed and arranged in the plurality of external apparatuses can be executed in parallel in time.

A9.組織業務の構成単位としてのジョブに対応するジョブオブジェクトを、ジョブのタイプに応じてあらかじめ定義されたクラスから生成するステップと、
各ジョブオブジェクトの依存関係を示すジョブリスト情報を生成するステップと、
ジョブの処理内容を示す処理関数を、ジョブオブジェクト生成後に設定するステップと、
前記ジョブリスト情報を参照してジョブオブジェクトを選択し、そのジョブオブジェクトについて設定された処理関数を実行させるステップと、
を備えることを特徴とするジョブ管理方法。
A9. Generating a job object corresponding to a job as a structural unit of organizational work from a predefined class according to the type of job;
Generating job list information indicating the dependency of each job object;
A step of setting a processing function indicating job processing contents after generating a job object;
Selecting a job object with reference to the job list information and executing a processing function set for the job object;
A job management method comprising:

A10.前段にあたるジョブの出力データに基づいて後段にあたるジョブが実行されるように、複数のジョブの依存関係を定義するオブジェクトとしてモデルオブジェクトを生成する機能と、
各ジョブの処理内容を定義するコントロールオブジェクトを生成する機能と、
コントロールオブジェクトの第1のメンバ関数を実行することにより、モデルオブジェクトにおいて定義されるジョブの処理内容を設定する機能と、
コントロールオブジェクトの第2のメンバ関数を実行することにより、第1のジョブについての処理を実行させる機能と、
前記依存関係にしたがって、前記第1のジョブの出力データを渡すべき第2のジョブを特定する機能と、
前記第2のジョブについての処理を実行させる機能と、
をコンピュータに発揮させることにより、複数のジョブを依存関係にしたがって実行させることを特徴とするジョブ管理プログラム。
A10. A function for generating a model object as an object for defining dependency relationships of a plurality of jobs so that a job corresponding to the subsequent stage is executed based on output data of the job corresponding to the preceding stage;
A function that generates a control object that defines the processing content of each job,
A function for setting processing contents of a job defined in the model object by executing the first member function of the control object;
A function for executing processing on the first job by executing the second member function of the control object;
A function for specifying a second job to which the output data of the first job should be passed according to the dependency relationship;
A function of executing processing for the second job;
A job management program that causes a computer to execute a plurality of jobs according to the dependency relationship.

エンタープライズシステムのハードウェア構成図である。It is a hardware block diagram of an enterprise system. ジョブ管理装置の機能ブロック図である。It is a functional block diagram of a job management apparatus. 本実施例におけるデータフローダイアグラムを示す図である。It is a figure which shows the data flow diagram in a present Example. 図3のDFDに対応するジョブクラスの依存関係を示す図である。FIG. 4 is a diagram illustrating a dependency relationship of job classes corresponding to the DFD of FIG. 3. ジョブ管理装置の基本的な機能を実現するためのクラスの関係を示す模式図である。It is a schematic diagram which shows the relationship of the class for implement | achieving the basic function of a job management apparatus. ジョブクラスとモデルクラスの関係を示すクラス図である。It is a class diagram which shows the relationship between a job class and a model class. 処理クラスの継承に関するクラス図である。It is a class diagram regarding inheritance of a processing class. エンタープライズシステムの実行開始にあたって、最初に実行される関数を示す図である。It is a figure which shows the function performed first in the start of execution of an enterprise system. モデルオブジェクト生成時に実行されるソースコードを示す図である。It is a figure which shows the source code performed at the time of model object generation. コントロールオブジェクト生成時とデータフローの実行開始に際して実行されるソースコードを示す図である。It is a figure which shows the source code performed at the time of a control object production | generation and the start of execution of a data flow. 図10のS320およびS330までの処理に対応するソースコードを示す図である。It is a figure which shows the source code corresponding to the process to S320 and S330 of FIG. 図10のS340の処理に対応するソースコードを示す図である。It is a figure which shows the source code corresponding to the process of S340 of FIG. 図12のS344の処理に対応するソースコードを示す図である。It is a figure which shows the source code corresponding to the process of S344 of FIG. ジョブオブジェクト間におけるデータ送受方法を説明するための模式図である。It is a schematic diagram for demonstrating the data transmission / reception method between job objects. アイテムオブジェクトに処理結果を記録してキューに投入する過程に対応したソースコードを示す図である。It is a figure which shows the source code corresponding to the process which records a process result on an item object and throws into a queue. キューからアイテムオブジェクトを取得して前段のジョブの処理結果を取得する過程に対応したソースコードを示す図である。It is a figure which shows the source code corresponding to the process of acquiring an item object from a queue and acquiring the processing result of the preceding stage job. アイテムオブジェクトの構造を説明するための模式図である。It is a schematic diagram for demonstrating the structure of an item object.

符号の説明Explanation of symbols

100 ジョブ管理装置、 110 ユーザインタフェース処理部、 120 通信部、 130 データ処理部、 140 モデル管理部、 150 フロー制御部、 200 ノード端末、 204 エンタープライズシステム、 206 データベース、 300 売上データ、 302 売上集約処理、 304 地区別売上データ、 306 店マスタデータ、 308 店名追加処理、 310 店別売上データ、 312 データフローダイアグラム、 400 UriageSourceクラス、 402 UriageAggregatorクラス、 404 AreaUriageTotalSinkクラス、 406 MiseMaSourceクラス、 408 MiseMaMatcherクラス、 410 MiseUriageTotalSinkクラス、 420 ジョブクラス群、 430 Connectionクラス、 440 UriageProcessingModelクラス、 450 SingleThreadFlowControllerクラス、 452 MultiThreadFlowControllerクラス、 460 ProcessingModelクラス、 480 RecordStreamSourceクラス、 482 RecordStreamAggregatorクラス、 484 RecordStreamMatcherクラス、 486 RecordStreamSinkクラス、 490 Nodeクラス、 500 NodeFlowControllerクラス、 502 MTNodeFlowControllerクラス、 510 MTRecordStreamSourceクラス、 512 MTRecordStreamMatcherクラス、 514 MTRecordStreamAggregatorクラス、 516 MTRecordStreamSinkクラス。   100 job management device, 110 user interface processing unit, 120 communication unit, 130 data processing unit, 140 model management unit, 150 flow control unit, 200 node terminal, 204 enterprise system, 206 database, 300 sales data, 302 sales aggregation processing, 304 Sales data by district, 306 store master data, 308 store name addition processing, 310 store sales data, 312 data flow diagram, 400 UriageSource class, 402 UriageAggregator class, 404 AreaUriageTotalSink class, 406 MiseMaSource class, 408 MiseMaMatcher class, 410 MiseUriageTotalSink class , 420 job classes, 430 Connection class, 440 UriageProcessingModel class, 450 SingleThreadFlowController class Class, 452 MultiThreadFlowController class, 460 ProcessingModel class, 480 RecordStreamSource class, 482 RecordStreamAggregator class, 484 RecordStreamMatcher class, 486 RecordStreamSink class, 490 Node class, 500 NodeFlowController class, 502 MTNodeFlowController class, 510 MTRecordStreamSource class, 512 MTRecordStreamMatcherRecord class 516 MTRecordStreamSink class.

Claims (7)

前段にあたるジョブの出力データに基づいて後段にあたるジョブが実行されるように依存関係が定められた複数のジョブを実行するための装置であって、
ジョブのタイプに応じてあらかじめ定義されたクラスから、ジョブオブジェクトを生成するジョブオブジェクト生成部と、
各ジョブオブジェクトのデータの利用関係である依存関係を示すジョブリスト情報を生成するジョブリスト情報生成部と、
ジョブの処理した結果を返す処理関数を、ジョブオブジェクトが生成された後に当該ジョブオブジェクトの変数に注入する処理注入部と、
複数の処理関数に対して別々のスレッドを割り当てることにより、複数の処理関数を時間的に並行して実行させる実行指示部と、を備え、
前段にあたるジョブオブジェクトと後段にあたるジョブオブジェクトの関係において、前記後段にあたるジョブオブジェクトの処理関数であって、当該後段にあたるジョブオブジェクトが生成された後に注入された処理関数は、前記前段にあたるジョブオブジェクトの処理関数であって、当該前段にあたるジョブオブジェクトが生成された後に注入された処理関数が生成する出力データを変数として所定の処理を実行し、出力データが未生成の段階においては出力データが生成されるまで待機することを特徴とするジョブ管理装置。
An apparatus for executing a plurality of jobs whose dependencies are determined so that a job corresponding to the subsequent stage is executed based on output data of the job corresponding to the preceding stage,
A job object generation unit that generates a job object from a predefined class according to the type of job,
A job list information generation unit that generates job list information indicating a dependency relationship that is a usage relationship of data of each job object;
A processing injection unit that injects a processing function that returns a processing result of the job into a variable of the job object after the job object is generated;
An execution instructing unit that executes the plurality of processing functions in parallel in time by assigning different threads to the plurality of processing functions,
In front falls job object and subsequent falls relationship job object, a processing function of the subsequent stage corresponding to the job object, the process function job object corresponding to the subsequent stage is injected after being generated, the processing functions of the job object corresponding to the preceding stage The predetermined processing is executed using the output data generated by the processing function injected after the job object corresponding to the preceding stage is generated as a variable until the output data is generated in the stage where the output data is not generated. A job management apparatus characterized by waiting.
データを送受するためにあらかじめ定義されたクラスから、アイテムオブジェクトを生成するアイテムオブジェクト生成部と、
前段にあたるジョブオブジェクトと後段にあたるジョブオブジェクトのセットごとに設定され、アイテムオブジェクトを保持するアイテムオブジェクト保持部と、を更に備え、
前記アイテムオブジェクト生成部は、前段にあたるジョブオブジェクトと後段にあたるジョブオブジェクトのセットごとにアイテムオブジェクトを生成して、対応するアイテムオブジェクト保持部に生成したアイテムオブジェクトを格納し、
前段にあたるジョブオブジェクトの処理関数は、後段にあたるジョブオブジェクトとの関係で設定されたアイテムオブジェクト保持部からアイテムオブジェクトを取り出して出力データを記録した上で、後段にあたるジョブオブジェクトにアイテムオブジェクトを転送し、
前記後段にあたるジョブオブジェクトの処理関数は、転送された前記アイテムオブジェクトから出力データを読み出したあと、前記アイテムオブジェクトを前記アイテムオブジェクト保持部に戻すことを特徴とする請求項1に記載のジョブ管理装置。
An item object generation unit that generates an item object from a predefined class for sending and receiving data;
An item object holding unit that is set for each set of job objects corresponding to the previous stage and job objects corresponding to the subsequent stage, and holds the item object;
The item object generation unit generates an item object for each set of job objects corresponding to the preceding stage and job objects corresponding to the subsequent stage, and stores the generated item objects in the corresponding item object holding unit,
The processing function of the job object corresponding to the previous stage takes out the item object from the item object holding unit set in relation to the job object corresponding to the subsequent stage, records the output data, and then transfers the item object to the job object corresponding to the subsequent stage.
The job management apparatus according to claim 1, wherein the processing function of the job object corresponding to the latter stage reads the output data from the transferred item object, and then returns the item object to the item object holding unit.
前記アイテムオブジェクト保持部は、複数個のアイテムオブジェクトを保持可能であって、
前記アイテムオブジェクト生成部は、前段にあたるジョブオブジェクトと後段にあたるジョブオブジェクトのセットに対応して複数個のアイテムオブジェクトを生成して、対応するアイテムオブジェクト保持部に前記複数個のアイテムオブジェクトを格納することを特徴とする請求項2に記載のジョブ管理装置。
The item object holding unit can hold a plurality of item objects,
The item object generation unit generates a plurality of item objects corresponding to a set of job objects corresponding to the preceding stage and a job object corresponding to the subsequent stage, and stores the plurality of item objects in the corresponding item object holding unit. The job management apparatus according to claim 2, wherein:
前段にあたるジョブオブジェクトの処理関数から後段にあたるジョブオブジェクトの処理関数に転送されるアイテムオブジェクトを所定の上限個数まで保持するキューを、前段にあたるジョブオブジェクトと後段にあたるジョブオブジェクトのセットごとに生成するキュー生成部、を更に備え、
前段にあたるジョブオブジェクトの処理関数は後段にあたるジョブオブジェクトの処理関数に対して前記キューを介して、アイテムオブジェクトを転送し、
前記前段にあたるジョブオブジェクトの処理関数は、前記キューに投入されているアイテムオブジェクトの数が前記所定の上限個数に達しているときには前記キューに空きができるまで待機し、
前記後段にあたるジョブオブジェクトの処理関数は、前記キューにアイテムオブジェクトが存在しないときには、前記前段にあたるジョブオブジェクトの処理関数がアイテムオブジェクトを投入するまで待機することを特徴とする請求項2または3に記載のジョブ管理装置。
A queue generation unit that generates a queue that holds up to a predetermined upper limit number of item objects transferred from a job object processing function corresponding to the preceding stage to a job object processing function corresponding to the subsequent stage, for each set of job objects corresponding to the previous stage and job objects corresponding to the subsequent stage. Further comprising
The job object processing function corresponding to the preceding stage transfers the item object to the job object processing function corresponding to the subsequent stage via the queue,
The processing function of the job object corresponding to the preceding stage waits until the queue becomes empty when the number of item objects put in the queue reaches the predetermined upper limit number,
The processing function of the job object corresponding to the subsequent stage waits until the processing function of the job object corresponding to the preceding stage inputs an item object when there is no item object in the queue. Job management device.
前記アイテムオブジェクト生成部は、データ型に関わらずバイナリ形式でデータを保持するためのバイナリデータ配列にデータを格納して管理するクラスからアイテムオブジェクトを生成することを特徴とする請求項2から4のいずれかに記載のジョブ管理装置。   5. The item object generation unit generates an item object from a class that stores and manages data in a binary data array for holding data in a binary format regardless of a data type. The job management apparatus according to any one of the above. 組織業務の構成単位としてのジョブに対応するジョブオブジェクトを、ジョブのタイプに応じてあらかじめ定義されたクラスから生成するステップと、
各ジョブオブジェクトのデータの利用関係である依存関係を示すジョブリスト情報を生成するステップと、
ジョブの処理した結果を返す処理関数を、ジョブオブジェクト生成後に当該ジョブオブジェクトの変数に注入するステップと、
複数の処理関数に対して別々のスレッドを割り当てることにより、複数の処理関数を時間的に並行して実行させるステップと、を備え、
前段にあたるジョブオブジェクトと後段にあたるジョブオブジェクトの関係において、前記後段にあたるジョブオブジェクトの処理関数であって、当該後段にあたるジョブオブジェクトが生成された後に注入された処理関数には、前記前段にあたるジョブオブジェクトの処理関数であって、当該前段にあたるジョブオブジェクトが生成された後に注入された処理関数が生成する出力データを変数として所定の処理を実行させ、出力データが未生成の段階においては出力データが生成されるまで待機させることを特徴とするジョブ管理方法。
Generating a job object corresponding to a job as a structural unit of organizational work from a predefined class according to the type of job;
Generating job list information indicating a dependency that is a usage relationship of data of each job object;
Injecting a processing function that returns the processing result of the job into the variable of the job object after generating the job object;
Allocating separate threads to the plurality of processing functions to execute the plurality of processing functions in parallel in time, and
In the relationship between the job object corresponding to the previous stage and the job object corresponding to the subsequent stage, the processing function of the job object corresponding to the subsequent stage, and the processing function injected after the job object corresponding to the subsequent stage is generated , the processing of the job object corresponding to the previous stage A function that executes predetermined processing using output data generated by a processing function injected after the job object corresponding to the preceding stage is generated as a variable, and output data is generated when the output data is not generated A job management method characterized by waiting until
前段にあたるジョブの出力データに基づいて後段にあたるジョブが実行されるように、複数のジョブのデータの利用関係である依存関係を定義するオブジェクトとしてモデルオブジェクトを生成する機能と、
各ジョブの処理内容を定義するコントロールオブジェクトを生成する機能と、
コントロールオブジェクトの第1のメンバ関数を実行することにより、ジョブの処理した結果を返す処理関数をジョブごとに当該ジョブオブジェクトの変数に注入する機能と、
コントロールオブジェクトの第2のメンバ関数を実行することにより、複数のジョブの処理関数に別々のスレッドを割り当て、複数の処理関数を時間的に並行して実行させる機能と、
前段にあたるジョブと後段にあたるジョブの関係において、前記後段にあたるジョブの処理関数であって、当該後段にあたるジョブオブジェクトが生成された後に注入された処理関数には前記前段にあたるジョブの処理関数であって、当該前段にあたるジョブオブジェクトが生成された後に注入された処理関数が生成する出力データを変数として所定の処理を実行させ、出力データが未生成の段階においては出力データが生成されるまで待機させる機能と、
をコンピュータに発揮させることにより、複数のジョブを依存関係にしたがって実行させることを特徴とするジョブ管理プログラム。
A function for generating a model object as an object for defining a dependency that is a usage relation of data of a plurality of jobs, so that a job corresponding to the subsequent stage is executed based on output data of the job corresponding to the preceding stage;
A function that generates a control object that defines the processing content of each job,
A function for injecting a processing function for returning a job processing result into a variable of the job object for each job by executing the first member function of the control object;
A function of assigning different threads to processing functions of a plurality of jobs by executing a second member function of the control object, and executing the processing functions in parallel in time;
In relation falls jobs and subsequent job corresponding to the previous stage, a processing function of the subsequent stage corresponding to the job, the processing function job object corresponding to the subsequent stage is injected after being generated, a processing function of the previous stage corresponding to the job A function that executes predetermined processing using output data generated by a processing function injected after the job object corresponding to the preceding stage is generated as a variable, and waits until output data is generated when output data is not generated When,
A job management program that causes a computer to execute a plurality of jobs according to the dependency relationship.
JP2006089277A 2006-03-28 2006-03-28 Job management apparatus and job management method Expired - Fee Related JP5033343B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006089277A JP5033343B2 (en) 2006-03-28 2006-03-28 Job management apparatus and job management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006089277A JP5033343B2 (en) 2006-03-28 2006-03-28 Job management apparatus and job management method

Publications (2)

Publication Number Publication Date
JP2007265029A JP2007265029A (en) 2007-10-11
JP5033343B2 true JP5033343B2 (en) 2012-09-26

Family

ID=38637952

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006089277A Expired - Fee Related JP5033343B2 (en) 2006-03-28 2006-03-28 Job management apparatus and job management method

Country Status (1)

Country Link
JP (1) JP5033343B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6708919B2 (en) 2015-08-03 2020-06-10 富士通株式会社 Information processing program, information processing apparatus, and record data processing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3349547B2 (en) * 1993-05-10 2002-11-25 株式会社日立製作所 Scheduling system
EP0935192A1 (en) * 1998-02-09 1999-08-11 Sony Europa B.V. Method and system for communication between application programs and a network
JP2000112770A (en) * 1998-09-30 2000-04-21 Matsushita Electric Ind Co Ltd Program translating device
JP3663950B2 (en) * 1999-01-20 2005-06-22 株式会社デンソー Electronic control unit for automobile
JP2002297394A (en) * 2001-04-02 2002-10-11 Canon Sales Co Inc Information processor, and method and system for processing information
JP4286481B2 (en) * 2001-12-07 2009-07-01 株式会社野村総合研究所 Clustering system

Also Published As

Publication number Publication date
JP2007265029A (en) 2007-10-11

Similar Documents

Publication Publication Date Title
US10713608B2 (en) Systems and methods for a real-time workflow platform
JP5140067B2 (en) A framework for modeling continuations in a workflow
JP4806240B2 (en) Componentized and extensible workflow model
JP5710852B2 (en) A framework for seamless authoring and editing of workflows at design and runtime
JP5173128B2 (en) A unified model for authoring and executing flow-based and constraint-based workflows
US20100281462A1 (en) Systems and methods for generating source code for workflow platform
US8589864B2 (en) Automating the creation of an application provisioning model
US20100042670A1 (en) Integrated development engine for a cloud computing environment
JP2009532754A (en) Abstract execution model for continuation-based meta-runtime
US7490098B2 (en) Apparatus, system, and method for processing hierarchical data in disparate data repositories
US7640538B2 (en) Virtual threads in business process programs
JP2004520635A (en) Object-oriented software application with application framework for oil company model assets
AU2005221076A1 (en) Task execution using graphical representation of task dependency
JPH0764778A (en) Object-oriented computer system and method for execution of object
JPH0635709A (en) Object class specifying device, widget and realizing method thereof
JP5007060B2 (en) Job management apparatus and job management method
JP6691554B2 (en) System and method for isolating web user interface applications from the runtime engine included in the underlying persistence framework and cloud-based integration services
JP5033343B2 (en) Job management apparatus and job management method
US20200293383A1 (en) System and Method for Developing Modularized Application
KR20010110097A (en) Archiving in workflow-management-systems
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
JP5007041B2 (en) Job management apparatus and job management method
Shi et al. Business Objects-A New Business Process Modeling Approach
Andrews Design and Development of a Run-time Object Design and Instantiation Framework for BPM Systems
US20240143487A1 (en) Secure testing of attachment functionality of objects

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080908

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110513

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110524

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110714

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120228

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120522

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20120529

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120626

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120702

R150 Certificate of patent or registration of utility model

Ref document number: 5033343

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150706

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees