JP4265559B2 - Data processing apparatus, data processing server, data processing system, and data processing program - Google Patents

Data processing apparatus, data processing server, data processing system, and data processing program Download PDF

Info

Publication number
JP4265559B2
JP4265559B2 JP2005100026A JP2005100026A JP4265559B2 JP 4265559 B2 JP4265559 B2 JP 4265559B2 JP 2005100026 A JP2005100026 A JP 2005100026A JP 2005100026 A JP2005100026 A JP 2005100026A JP 4265559 B2 JP4265559 B2 JP 4265559B2
Authority
JP
Japan
Prior art keywords
data
unit
processing
reception
transmission source
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
JP2005100026A
Other languages
Japanese (ja)
Other versions
JP2006277675A (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2005100026A priority Critical patent/JP4265559B2/en
Publication of JP2006277675A publication Critical patent/JP2006277675A/en
Application granted granted Critical
Publication of JP4265559B2 publication Critical patent/JP4265559B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、複数の相手から受け取ったデータに対する処理を行うデータ処理装置およびデータ処理サーバとこれらの相手とデータ処理装置あるいはデータ処理サーバからなるデータ処理システムおよびそのデータ処理プログラムに関する。   The present invention relates to a data processing device and a data processing server that perform processing on data received from a plurality of partners, a data processing system including these partners and a data processing device or a data processing server, and a data processing program thereof.

近年、ネットワーク機器とネットワーク接続サービスの高速化および低価格化が進み、ネットワークを用いた通信が多く行われている。これに伴い、ネットワークサーバの処理能力向上が求められている。ネットワークサーバには、たとえば、様々なアプリケーションをネットワークを介して提供するアプリケーションサーバや、金融機関で入出金といったひとまとまりの処理としてのトランザクション処理を行うトランザクションサーバやデータベースサーバなどがある。これらは、ネットワークに接続するクライアントから要求を受け、それに対する処理を行うことでサービスを提供している。このようなネットワークサーバでは、演算処理能力の向上はもちろんのこと、同時に起こり得る複数のクライアントからの処理要求に関するデータ受信およびその処理結果としてのデータ送信といった通信処理を効率よく行うことも重要である。   In recent years, network devices and network connection services have been increased in speed and price, and many communications using networks have been performed. Along with this, there is a demand for improving the processing capacity of network servers. Examples of the network server include an application server that provides various applications via a network, a transaction server that performs transaction processing as a batch process such as deposit and withdrawal at a financial institution, and a database server. These services are provided by receiving a request from a client connected to a network and performing processing on the request. In such a network server, it is important not only to improve the arithmetic processing capability but also to efficiently perform communication processing such as data reception regarding processing requests from a plurality of clients that can occur simultaneously and data transmission as a result of the processing. .

そこで、複数のタスクを生成することにより通信の多重処理を実現する手法が提案されている(たとえば特許文献1参照)。この提案のコンピュータはタスク生成部を備え、たとえば、他のコンピュータにデータの送信を行うときには新規にタスクを生成して、データの送信処理をそのタスクに任せるようになっている。したがって、このコンピュータでは、このデータの送信処理が完了する前でも、別の異なる処理を並列して行うことができる。つまり、ネットワークサーバにおいては複数のタスクを生成することにより、複数のクライアントとの通信処理を同時に行う、通信の多重処理が実現される。これにより、より多くの処理要求を受け、要求に応じたサービスを提供することが可能になる。   In view of this, a method has been proposed in which multiple processes of communication are realized by generating a plurality of tasks (see, for example, Patent Document 1). The proposed computer includes a task generation unit. For example, when data is transmitted to another computer, a new task is generated, and data transmission processing is left to the task. Therefore, in this computer, even before this data transmission process is completed, different processes can be performed in parallel. That is, by generating a plurality of tasks in the network server, a communication multiplex process that simultaneously performs a communication process with a plurality of clients is realized. This makes it possible to receive more processing requests and provide services according to the requests.

このような複数のタスクにより異なる複数の処理を行うマルチタスク処理は、CPU(Central Processing Unit)の処理を時分割して、複数の処理対象に順番に割り当てることで、それぞれが同時に行われているように見せるものである。この時分割される一連の処理が、タスクあるいはプロセスと呼ばれている。マルチタスクで動作するOS(Operating System)は、実際にはこのタスクあるいはプロセスをさらに同時に処理可能な一連の処理として、入力、計算、ファイル操作等の各処理に分割されたスレッドという単位で切り替えて、マルチスレッドとして動作を行っている。このタスクやプロセスおよびスレッドは、コンテキスト(context)と呼ばれている。各コンテキストには、スタック、レジスタ、実行カウンタ等の処理の実行状態を表わすものがそれぞれ固有に割り当てられている。これにより、他のコンテキストで進行する処理からの影響を受けず、独立して処理を行うことができる。また、コンテキストを増やすことによって、複数のCPUを持つコンピュータにおいて同時に処理できる対象を増やし、より多くのCPUにより多くの処理を割り当てることができる。   In such multitask processing that performs different processing by multiple tasks, the processing of the CPU (Central Processing Unit) is time-divided and sequentially assigned to multiple processing targets, and each is performed simultaneously. It looks like this. A series of processes divided at this time is called a task or a process. The OS (Operating System) operating in multitasking is actually switched as a series of processes that can process this task or process at the same time, in units of threads divided into processes such as input, calculation, and file operation. It is operating as a multi-thread. These tasks, processes and threads are called contexts. Each context is uniquely assigned to indicate an execution state of processing such as a stack, a register, and an execution counter. As a result, the processing can be performed independently without being influenced by the processing progressing in another context. Further, by increasing the context, the number of objects that can be processed simultaneously in a computer having a plurality of CPUs can be increased, and more processes can be assigned to more CPUs.

図10は、ネットワークサーバが複数のコネクションを1つのコンテキストで制御する様子を表わしたものである。複数のコンテキストによる処理を説明する前に、まず、1つのコンテキストによる処理について説明を行う。第1〜第3のコネクション1011〜1013は、ネットワークサーバ102にそれぞれデータ1031〜1033を送信し、それに対する処理結果1041〜1043を処理待ち1051〜1053の後に受け取るようになっている。第1のコネクション1011について詳細に説明する。第1のコネクション1011は、ネットワークサーバ102にデータ1031を送信し、それに対する処理結果1041を処理待ち1051の後に受け取るようになっている。データ1031は一旦、バッファメモリ(バッファ)106にバッファリング1071されて、処理手段108のコンテキスト(C)109に受け渡される。コンテキスト109ではデータ処理1111が行われ、その処理結果1041が要求元の第1のコネクション1011に送り返されるようになっている。コンテキスト109では、第1のコネクション1011からデータ1031が到着していなければ、データ待ち1101を行い、到着後にデータ処理1111が完了するまで、他のコネクションに対する処理を行わない。このように1つのコネクションに対するデータ待ちとデータ処理からなる処理に専有された状態をブロックといい、このような受信方式をブロック受信方式という。つまり、第1のコネクションによるブロック1121は、この図に示すようにデータ待ち1101とデータ処理1111を併せたものになる。ここでは、受信方式に着目するため、処理結果1041の送信については説明を簡単にするためにOSによる処理を介さないように説明している。同様に説明を簡単にするために、バッファメモリ106の処理を1つの流れで説明しているが、実際にはマルチタスクのOSにより複数のバッファリングを同時に行うことができるようになっている。第2および第3のコネクション1012、1013についても、同様に処理が行われる。処理手段108はプログラムにより構成されるのが通常で、このようなネットワークサーバ102においてはサーバプログラムとよばれる。 FIG. 10 shows how the network server controls a plurality of connections in one context. Before describing processing by a plurality of contexts, first, processing by one context will be described. The first to third connection 101 1-101 3 each network server 102 transmits the data 103 1 to 103 3, receives the processing result 104 1-104 3 against it after waiting for processing 105 1-105 3 as It has become. It will be described in detail for the first connection 101 1. The first connection 101 1 transmits the data 103 1 to the network server 102 and receives the processing result 104 1 for the data 103 1 after the processing wait 105 1 . The data 103 1 is once buffered 107 1 in the buffer memory (buffer) 106 and transferred to the context (C) 109 of the processing means 108. In the context 109, data processing 111 1 is performed, and the processing result 104 1 is sent back to the first connection 101 1 of the request source. In the context 109, if the data 103 1 has not arrived from the first connection 101 1 , the data waiting 110 1 is performed, and processing for other connections is not performed until the data processing 111 1 is completed after the arrival. A state exclusively used for processing consisting of data waiting and data processing for one connection is called a block, and such a reception method is called a block reception method. That is, the block 112 1 by the first connection is a combination of the data waiting 110 1 and the data processing 111 1 as shown in FIG. Here, in order to focus on the receiving system, the transmission of the processing result 104 1 are described as not through the processing by the OS in order to simplify the description. Similarly, in order to simplify the explanation, the processing of the buffer memory 106 is described with one flow. However, in practice, a plurality of buffering operations can be performed simultaneously by a multitasking OS. The same processing is performed for the second and third connections 101 2 and 101 3 . The processing means 108 is usually constituted by a program, and such a network server 102 is called a server program.

ここでは、サーバプログラムを実行するコンテキスト109は1つで、第1〜第3のコネクション1011〜1013に対する処理がこの順番で行われるよう予め決められている。したがって、この図に示すように、たとえば第3のコネクション1013からのデータ1033がバッファメモリ106によりバッファリング1073され、すぐに処理を始められる状態になっても、コンテキスト109では予め決められた順番どおり第1のコネクション1011に対する処理の次は、第2のコネクション1012に対する処理を行うようになっている。このため、第2のコネクション1012からのデータ1032の到着が遅れると、第3のコネクション1013が処理結果1043を得られる時間も遅れてしまう。つまり、他のコネクションの影響を受け、各コネクションが処理結果を得るまでの処理待ちの時間に不平等が生じてしまう。そこで、ブロック受信方式で複数のコネクションを同時に扱うネットワークサーバは、第1の提案のように複数のコンテキストを生成することで実現される。 Here, there is one context 109 for executing the server program, and it is determined in advance that the processing for the first to third connections 101 1 to 101 3 is performed in this order. Accordingly, as shown in this figure, for example, data 103 3 from the third connection 101 3 are buffered 107 3 by the buffer memory 106, also ready to begin processing immediately, the context 109 is determined in advance After the processing for the first connection 101 1 in the order described, the processing for the second connection 101 2 is performed. Therefore, when the arrival of the data 103 2 from the second connection 101 2 is delayed, a third connection 101 3 will also delay time obtained by the processing result 104 3. In other words, due to the influence of other connections, inequality occurs in the waiting time until each connection obtains a processing result. Therefore, a network server that handles a plurality of connections at the same time by the block reception method is realized by generating a plurality of contexts as in the first proposal.

図11は、ネットワークサーバが複数のコネクションを複数のコンテキストで制御する様子を表わしたものである。この図11で図10と同一の部分には同一の符号を付しており、これらの説明を適宜省略する。ネットワークサーバ102Aの処理手段108Aは、第1〜第3のコンテキスト1091〜1093で同時に、第1〜第3のコネクション1011〜1013に対するそれぞれのデータ処理1111〜1113を別々に行わせるようになっている。したがって、処理待ち時間は、それぞれ対応するコネクションに起因するものであって、他のコネクションからの影響を受けない。ブロック受信方式では複数のコンテキストを設けることにより通信の多重処理を実現することができる。 FIG. 11 shows how the network server controls a plurality of connections in a plurality of contexts. In FIG. 11, the same parts as those in FIG. 10 are denoted by the same reference numerals, and description thereof will be omitted as appropriate. Processing means 108A of network server 102A simultaneously in the first to third context 109 1-109 3, perform respective data processing 111 1-111 3 for the first to third connection 101 1-101 3 separately It comes to let you. Therefore, the processing waiting time is caused by the corresponding connection, and is not affected by other connections. In the block reception method, communication multiple processing can be realized by providing a plurality of contexts.

このように、ブロック受信方式では複数のコンテキストを設けることにより通信の多重処理が実現され、他のコネクションに影響しない処理を可能としている。しかし、ブロック受信方式で通信の多重処理を行うには、扱う接続先の数に応じた複数のコンテキストが必要とされる。各コンテキストはそれぞれ他のコンテキストの処理に影響を受けず、独自に処理を行っている。このためコンテキストごとに他のプログラムの進行状態により書き換えられることのない専用のメモリ領域を必要とする。したがって、リソースの面から扱うことのできるコネクションの数が限られてしまう。   In this way, in the block reception method, multiple processing of communication is realized by providing a plurality of contexts, and processing that does not affect other connections is possible. However, in order to perform communication multiplex processing by the block reception method, a plurality of contexts corresponding to the number of connection destinations to be handled are required. Each context is independently influenced by the processing of other contexts. For this reason, a dedicated memory area that is not rewritten by the progress state of another program is required for each context. Therefore, the number of connections that can be handled in terms of resources is limited.

そこで、ネットワークサーバでは非ブロック受信方式を用いるのが通常である。この方式では、各接続先から処理可能な受信データがバッファメモリにバッファリング済みかどうかを走査する手段と組み合わせて通信の多重処理を可能にしている。この手段はセレクタと呼ばれOSにより提供されている。セレクタはネットワークサーバのサーバプログラムにより呼び出され、走査の結果が1つ以上の事象を含むまで、繰り返し走査を行い、事象が発生するとその結果をサーバプログラムに返すようになっている。   Therefore, it is usual to use a non-block reception method in the network server. In this method, multiple processing of communication is possible in combination with means for scanning whether received data that can be processed from each connection destination has been buffered in the buffer memory. This means is called a selector and is provided by the OS. The selector is called by the server program of the network server and repeatedly scans until the scan result includes one or more events. When an event occurs, the result is returned to the server program.

図12は、ネットワークサーバが複数のコネクションを1つのコンテキストとセレクタにより非ブロック受信方式で制御する様子を表わしたものである。この図12で図10と同一の部分には同一の符号を付しており、これらの説明を適宜省略する。ネットワークサーバ102Bでは、セレクタ120がバッファメモリ106に第1〜第3のコネクション1011〜1013からのデータ1031〜1033のうちバッファリング済みのものがあるかを走査するようになっている。この図に示すように、処理手段108Bでは、コンテキスト109が新たな処理を行うことができる状態にあるとセレクタ120による走査1211〜1216が行われるようになっている。セレクタ120の最初の走査1211によっては、データが見つからない。そのため、引き続き走査1212が行われる。この段階で第1のコネクション1011のデータ1031が見つかる。処理手段108Bは、セレクタ120のこの走査結果に基づき、コンテキスト109にデータ1031の受信およびそのデータ処理1111を行わせる。その後、処理結果1041が第1のコネクション1011に送り返される。次に行われる走査1213によって、第3のコネクション1013のデータ1033が見つかり、同様に処理される。セレクタ120は再びデータが見つかるまで走査1214〜1216を繰り返す。走査1216によって第2のコネクション1012のデータ1032が見つかると、再び同様に処理が行われる。バッファメモリ106に複数のデータがバッファリングされているとき、セレクタ120はその中で一番早くバッファリングされたものだけを見つけるようにしてもよいし、すべてを見つけるようにしてもよい。後者の場合、処理手段108Bがコンテキスト109の処理状態をみて、1つ処理が完了するたびに、次の処理を行わせるようにする。ブロック受信は受信データが到着するまで待つのに対して、このように非ブロック受信方式は、セレクタを使用することで特定のコネクションで受信の待ち合わせをせずに、すぐに処理可能なデータを得ることができるため、一定の短い時間で処理を行うことが可能である。
特開2003−58384号公報(段落0023、図1)
FIG. 12 shows a state in which the network server controls a plurality of connections by using one context and a selector by a non-block receiving method. In FIG. 12, the same parts as those in FIG. 10 are denoted by the same reference numerals, and description thereof will be omitted as appropriate. In the network server 102B, the selector 120 scans the buffer memory 106 for data that has been buffered among the data 103 1 to 103 3 from the first to third connections 101 1 to 101 3 . . As shown in this figure, in the processing means 108B, scanning 121 1 to 121 6 by the selector 120 is performed when the context 109 is ready to perform a new process. Depending on the first scan 121 1 of the selector 120, no data is found. Therefore, scanning 121 2 is continued. Data 103 1 of the first connection 101 1 at this stage is found. Based on the scanning result of the selector 120, the processing unit 108B causes the context 109 to receive the data 103 1 and perform data processing 111 1 thereof. Thereafter, the processing result 104 1 is sent back to the first connection 101 1 . By scanning 121 3 next carried out, the third connection 101 third data 103 3 is found, are processed similarly. The selector 120 repeats the scanning 121 4-121 6 until again the data. When the second connection 101 and second data 103 2 are found by scanning 121 6, processing is performed in the same manner again. When a plurality of pieces of data are buffered in the buffer memory 106, the selector 120 may find only the one buffered earliest among them or may find all of them. In the latter case, the processing unit 108B looks at the processing state of the context 109, and causes each process to be performed each time one process is completed. Block reception waits until received data arrives. In this way, the non-block reception method uses a selector to obtain data that can be processed immediately without waiting for reception on a specific connection. Therefore, it is possible to perform processing in a certain short time.
JP 2003-58384 A (paragraph 0023, FIG. 1)

ところで、非ブロック受信方式では、複数のコネクションを制御することができるものの、セレクタが走査するコネクションの数がたとえば数千や数万というように膨大な数になると、走査によるオーバーヘッドが問題になってくる。つまり、コネクションから見ると、データを送信しても、それが処理手段に受け渡され処理が行われるのは、走査によりデータが見つけられてからになるため、走査時間のタイムラグができる。したがって、データがOSによりバッファメモリにバッファリングされるとすぐに処理が行われるブロック方式に比べて、処理結果が得られるまでの時間が増すことになってしまう。これは無通信あるいは通信頻度の低いコネクションではあまり問題とならないが、送信するデータ数に伴って処理時間が増すため、通信頻度が高いコネクションでは処理効率の点で問題が大きい。また、走査でバッファメモリにデータが見つかるとその結果を報告する処理が行われるため、頻繁にデータを送信してくるコネクションが1つでも存在すると、走査結果の報告もその都度行われなければならない。したがって、通信頻度の低いコネクションだけに対して、データが見つかるまで走査を繰り返す場合に比べて、負担が大きくなってしまう。   By the way, in the non-block reception method, although a plurality of connections can be controlled, if the number of connections scanned by the selector becomes a large number such as thousands or tens of thousands, scanning overhead becomes a problem. come. In other words, when viewed from the connection, even if data is transmitted, the data is transferred to the processing means and processed after the data is found by scanning, so that there is a time lag in scanning time. Therefore, as compared with the block method in which processing is performed as soon as data is buffered in the buffer memory by the OS, the time until the processing result is obtained increases. This is not a problem for connections with no communication or a low communication frequency, but the processing time increases with the number of data to be transmitted, so a problem is large in terms of processing efficiency for a connection with a high communication frequency. In addition, when data is found in the buffer memory by scanning, processing for reporting the result is performed. Therefore, if there is even one connection that frequently transmits data, the scanning result must be reported each time. . Therefore, the burden is increased compared to the case where scanning is repeated until data is found only for connections with low communication frequency.

以上、ネットワークサーバの通信制御を例に挙げて説明した。これ以外にも、複数の相手に対する処理を行うような装置で、同時に起こり得るこれらの相手からの処理要求およびそれに関するデータを効率的に受け取って処理する必要がある例は多く存在している。いずれの例の場合も、相手の数を制限しないために非ブロック受信方式を用いると、処理を頻繁に要求する相手に対しては処理効率について同様の問題があった。   The network server communication control has been described above as an example. In addition to this, there are many examples in which it is necessary to efficiently receive and process processing requests from these partners and data related to them that can occur at the same time in an apparatus that performs processing for a plurality of partners. In any case, when the non-block reception method is used in order to limit the number of opponents, there is a similar problem with respect to processing efficiency for an opponent who frequently requests processing.

そこで、本発明の目的は、処理を行う対象となる相手の数を制限せず、処理効率の低下を軽減したデータ処理装置、データ処理サーバ、データ処理システムおよびデータ処理方法を提供することにある。   Accordingly, an object of the present invention is to provide a data processing device, a data processing server, a data processing system, and a data processing method that can reduce a decrease in processing efficiency without limiting the number of counterparts to be processed. .

本発明では、(イ)通信ネットワークを介して1処理単位ずつのデータとしての単位データを順次受信する単位データ受信手段と、(ロ)この単位データ受信手段が受信した単位データの送信元を判別する送信元判別手段と、(ハ)前記した送信元ごとに前記した単位データの受信頻度を監視する受信頻度監視手段と、(ニ)前記した単位データ受信手段が受信した単位データを一時格納するデータ格納手段と、(ホ)それぞれ所望の時間にわたって1つずつの送信元が専有する形で、同一送信元から間欠的にあるいは連続して送られてくる任意数の前記した単位データの処理を、その送信元に対するデータ待ちが発生したときその送信元についてのデータが処理されるまで他の送信元に対する処理を行わないことで同一送信元からの単位データの受信頻度が高い場合にスループットの高い通信を可能にする1または複数の第1のデータ処理手段と、(へ)前記した単位データを1単位として各送信元が時分割で専有する形で、前記した単位データを処理する1または複数の第2のデータ処理手段と、(ト)前記した単位データ受信手段が前記した単位データを受信するたびに前記した送信元判別手段の判別結果に応じて前記したデータ格納手段に格納された単位データを、前記した単位データ受信手段の受信した単位データの受信頻度の高い送信元から順に前記した第1のデータ処理手段に割り当てて受け渡す第1のデータ受け渡し手段と、(チ)この第1のデータ受け渡し手段により前記した第1のデータ処理手段に受け渡されず前記したデータ格納手段に格納されている単位データの有無を判別するデータ有無判別手段と、(リ)このデータ有無判別手段の判別結果がデータ有りのとき、前記したデータ格納手段からこの単位データを前記した第2のデータ処理手段に受け渡す第2のデータ受け渡し手段とをデータ処理装置が具備する。 In the present invention, (a) unit data receiving means for sequentially receiving unit data as data for each processing unit via a communication network, and (b) determining the transmission source of unit data received by the unit data receiving means (C) a reception frequency monitoring unit that monitors the reception frequency of the unit data described above for each transmission source; and (d) temporarily storing unit data received by the unit data reception unit. Data storage means, and (e) processing of any number of the unit data described above that are transmitted intermittently or continuously from the same transmission source in a form that one transmission source occupies for a desired time. When the data waiting for the transmission source occurs, the unit data from the same transmission source is not processed until the data for the transmission source is processed. Motor 1 or a plurality of first data processing means for enabling a high throughput communication when the receiving frequency is high, in the form of proprietary by each source is time division as a unit the unit data mentioned above (to) , one or a plurality of second data processing means for processing the unit data described above, according to (g) the result of the determination to the source discriminating means each time the above-mentioned unit data receiving means receives unit data described above First, the unit data stored in the data storage unit is assigned to the first data processing unit in order from the transmission source having the high reception frequency of the unit data received by the unit data receiving unit, and the first data is transferred. Data transfer means; and (h) a unit stored in the data storage means without being transferred to the first data processing means by the first data transfer means. A data presence / absence determining means for determining the presence / absence of data; and (i) when the determination result of the data presence / absence determining means is data, the unit data is transferred from the data storage means to the second data processing means. The data processing device includes second data transfer means.

また、本発明では、(イ)通信ネットワークを介してクライアントから1処理単位ずつのデータとしての単位データを順次受信する単位データ受信手段と、(ロ)この単位データ受信手段が受信した単位データのクライアントを判別するクライアント判別手段と、(ハ)このクライアント判別手段の判別したクライアントごとに前記した単位データの受信頻度を監視する受信頻度監視手段と、(ニ)前記した単位データ受信手段が受信した単位データを一時格納するデータ格納手段と、(ホ)それぞれ所望の時間にわたって1つずつのクライアントが専有する形で、同一クライアントから間欠的にあるいは連続して送られてくる任意数の前記した単位データの処理を、そのクライアントに対するデータ待ちが発生したときそのクライアントについてのデータが処理されるまで他のクライアントに対する処理を行わないことで同一クライアントからの単位データの受信頻度が高い場合にスループットの高い通信を可能にする1または複数の第1のデータ処理手段と、(へ)前記した単位データを1単位として各クライアントが時分割で専有する形で、前記した単位データを処理する1または複数の第2のデータ処理手段と、(ト)前記した単位データ受信手段が前記した単位データを受信するたびに前記したクライアント判別手段の判別結果に応じて前記したデータ格納手段に格納された単位データを、前記した単位データ受信手段の受信した単位データの受信頻度の高いクライアントから順に前記した第1のデータ処理手段に割り当てて受け渡す第1のデータ受け渡し手段と、(チ)この第1のデータ受け渡し手段により前記した第1のデータ処理手段に受け渡されず前記したデータ格納手段に格納されている単位データの有無を判別するデータ有無判別手段と、(リ)このデータ有無判別手段の判別結果がデータ有りのとき、前記したデータ格納手段からこの単位データを前記した第2のデータ処理手段に受け渡す第2のデータ受け渡し手段とをデータ処理サーバが具備する。In the present invention, (a) unit data receiving means for sequentially receiving unit data as data for each processing unit from the client via the communication network; and (b) unit data received by the unit data receiving means. Client discrimination means for discriminating clients, (c) reception frequency monitoring means for monitoring the reception frequency of the unit data for each client determined by the client discrimination means, and (d) received by the unit data reception means Data storage means for temporarily storing unit data; and (e) any number of the above-mentioned units that are intermittently or continuously sent from the same client in a form that each client occupies for a desired time. Data processing to the client when data waiting for that client occurs One or a plurality of first data processing means for enabling high-throughput communication when the frequency of receiving unit data from the same client is high by not performing processing for other clients until the current data is processed (F) One or a plurality of second data processing means for processing the unit data in a form that each client occupies in a time-sharing manner with the unit data as one unit, and (g) reception of the unit data as described above Each time the unit receives the unit data, the unit data stored in the data storage unit according to the determination result of the client determination unit is changed to the reception frequency of the unit data received by the unit data reception unit. First data transfer means for assigning and transferring to the first data processing means in order from the highest client; Data presence / absence determining means for determining presence / absence of unit data stored in the data storage means not transferred to the first data processing means by the first data transfer means; The data processing server includes a second data transfer means for transferring the unit data from the data storage means to the second data processing means when the determination result of the determination means is data.

更に本発明では、(イ)通信ネットワークと、(ロ)請求項1記載のデータ処理装置と、(ハ)前記した通信ネットワークを介してこのデータ処理装置にデータを送信するデータ送信手段を備えた1または複数のデータ処理要求装置とをデータ処理システムが具備する。The present invention further includes (a) a communication network, (b) a data processing device according to claim 1, and (c) a data transmission means for transmitting data to the data processing device via the communication network. The data processing system includes one or more data processing requesting devices.

更にまた、本発明では、コンピュータに、データ処理プログラムとして、(イ)通信ネットワークを介して1処理単位ずつのデータとしての単位データを順次受信する単位データ受信処理と、(ロ)この単位データ受信処理で受信した単位データの送信元を判別する送信元判別処理と、(ハ)前記した送信元ごとに前記した単位データの受信頻度を監視する受信頻度監視処理と、(ニ)前記した単位データ受信処理で受信した単位データを一時格納するデータ格納処理と、(ホ)それぞれ所望の時間にわたって1つずつの送信元が専有する形で、同一送信元から間欠的にあるいは連続して送られてくる任意数の前記した単位データの処理を、その送信元に対するデータ待ちが発生したときその送信元についてのデータが処理されるまで他の送信元に対する処理を行わないことで同一送信元からの単位データの受信頻度が高い場合にスループットの高い通信を可能にする1または複数の第1のデータ処理と、(へ)前記した単位データを1単位として各送信元が時分割で専有する形で、前記した単位データを処理する1または複数の第2のデータ処理と、(ト)前記した単位データ受信処理で前記した単位データを受信するたびに前記した送信元判別処理の判別結果に応じて前記したデータ格納処理で格納された単位データを、前記した単位データ受信処理で受信した単位データの受信頻度の高い送信元から順に前記した第1のデータ処理に割り当てて受け渡す第1のデータ受け渡し処理と、(チ)この第1のデータ受け渡し処理により前記した第1のデータ処理に受け渡されず前記したデータ格納処理で格納されたままの単位データの有無を判別するデータ有無判別処理と、(リ)このデータ有無判別処理の判別結果がデータ有りのとき、前記したデータ格納処理で格納した単位データを前記した第2のデータ処理に受け渡す第2のデータ受け渡し処理とを実行させることを特徴としている。Furthermore, according to the present invention, (b) unit data reception processing for sequentially receiving unit data as data for each processing unit via a communication network as a data processing program; A transmission source determination process for determining the transmission source of the unit data received in the process; (c) a reception frequency monitoring process for monitoring the reception frequency of the unit data for each transmission source; and (d) the unit data described above. Data storage processing for temporarily storing unit data received in the reception processing, and (e) each transmission source occupies a desired time and is sent intermittently or continuously from the same transmission source. The processing of an arbitrary number of the above unit data is performed until other data is processed until the data for the transmission source is processed when the data waiting for the transmission source occurs. One or a plurality of first data processing that enables high-throughput communication when the frequency of receiving unit data from the same transmission source is high by not performing processing on the source; Each transmission source as a unit is dedicated in a time-sharing manner, one or a plurality of second data processes for processing the unit data, and (g) each time the unit data is received in the unit data reception process. First, the unit data stored in the data storage process according to the determination result of the transmission source determination process described above in order from the transmission source having the highest reception frequency of the unit data received in the unit data reception process. And (h) the first data transfer process which is not transferred to the first data process described above. Data presence / absence determination processing for determining the presence / absence of unit data as stored in the data storage processing, and (i) unit data stored in the data storage processing described above when the determination result of the data presence / absence determination processing is data And a second data transfer process for transferring the data to the second data process described above.

以上説明したように本発明では、複数の送信元からデータを受信して処理することができるだけでなく、データを頻繁に送信してくる送信元には、その送信元が専有できる処理手段を割り当て、効率よく処理することも可能となっている。さらに、各送信元との通信頻度を調べ、頻度に応じて割り当てを変更することができるので、例えば、送信元の多くが無通信あるいは送信頻度の低いものであっても、頻繁にデータを送信してくる送信元が1つでも存在すると、データが受信済みかどうかを走査するのにかかるオーバーヘッドが問題になるという状況を回避することができる。 As described above, according to the present invention, not only can data be received and processed from a plurality of transmission sources, but a processing means that can be used exclusively by the transmission source is assigned to a transmission source that frequently transmits data. It is also possible to process efficiently. In addition, since the frequency of communication with each transmission source can be checked and the assignment can be changed according to the frequency, for example, even if many of the transmission sources are not communicating or have low transmission frequency, data is frequently transmitted. If even one transmission source exists, it is possible to avoid a situation in which the overhead for scanning whether data has been received becomes a problem .

以下実施例につき本発明を詳細に説明する。   Hereinafter, the present invention will be described in detail with reference to examples.

図1は、本発明の一実施例のデータ処理システムの構成の概要を表わしたものである。このデータ処理システム200は、サーバ201とLAN(Local Area Network)やインターネット等の通信ネットワーク202を介して接続する第1〜第nのクライアント2031〜203nとからなっている。このように、サーバ201は第1〜第nのクライアント2031〜203nと相互に通信を行っているが、これらの通信を同時に成立させるために、通信の多重処理が行われている。 FIG. 1 shows an outline of the configuration of a data processing system according to an embodiment of the present invention. The data processing system 200 is comprised of a server 201 and a LAN (Local Area Network) or the first to the client 203 1 ~203 n of the n connected through the communication network 202 such as the Internet. As described above, the server 201 communicates with the first to n-th clients 203 1 to 203 n, and in order to establish these communications simultaneously, multiple processing of communication is performed.

サーバ201の構成について説明する。サーバ201は、第1〜第mのCPU(中央処理装置)2111〜211mを備えている。これら第1〜第mのCPUの2111〜211mは、それぞれ並列に処理を行うことができるようになっている。そこで本明細書では、これらを単に「CPU211」として説明する。CPU211はデータバス等のバス212を通じて通信多重処理方式のサーバ201内の各部と接続されている。このうち、ROM(リード・オンリ・メモリ)213は、不揮発性データあるいは制御プログラムを格納している。RAM(ランダム・アクセス・メモリ)214はCPU211が各種制御を実行する際に必要となるデータを一時的に格納するようになっている。ハード・ディスク・ドライブ(HDD)215は、このサーバ201の制御を行うためのOS(Operating System)やアプリケーションプログラムが格納された磁気記憶装置である。表示部216は液晶あるいは有機パネルを使用したモニタを備え、情報を視覚的に表示するようになっている。操作部217は、キーボード、マウスおよびスイッチボタンを備え各種操作を受け付けるようになっている。時計回路218は時間を計時し、サーバ201の通信した時刻がこれにより分かるようになっている。通信制御部219は、通信ネットワーク202に接続するようになっている。ハード・ディスク・ドライブ215、表示部216および操作部217はそれぞれ通信制御部219を介して、サーバ201の外部に接続された形態であってもよい。 The configuration of the server 201 will be described. The server 201 includes first to m-th CPUs (central processing units) 211 1 to 211 m . These first to m-th CPUs 211 1 to 211 m can perform processing in parallel. Therefore, in the present specification, these will be described simply as “CPU 211”. The CPU 211 is connected to each unit in the communication multiprocessing server 201 through a bus 212 such as a data bus. Of these, a ROM (Read Only Memory) 213 stores nonvolatile data or a control program. A RAM (Random Access Memory) 214 temporarily stores data required when the CPU 211 executes various controls. A hard disk drive (HDD) 215 is a magnetic storage device in which an OS (Operating System) and application programs for controlling the server 201 are stored. The display unit 216 includes a monitor using a liquid crystal or an organic panel, and displays information visually. The operation unit 217 includes a keyboard, a mouse, and a switch button, and accepts various operations. The clock circuit 218 measures the time so that the time when the server 201 communicates can be known. The communication control unit 219 is connected to the communication network 202. The hard disk drive 215, the display unit 216, and the operation unit 217 may be connected to the outside of the server 201 via the communication control unit 219.

サーバ201では、複数の独立した通信相手としての第1〜第nのクライアント2031〜203nに対する処理を同時に行う場合に、それぞれの処理の実行内容が、他の処理の実行内容に影響を及ぼさないように、複数のコンテキストで処理を行うようになっている。複数のコンテキストを実現するには、マルチスレッドを利用する方式や、マルチプロセスで共有メモリを使用する方式がある。複数のスレッド間あるいは複数のプロセス間で相互にデータを共有することで、複数のスレッドあるいは複数のプロセスが、それぞれ同じデータを参照して、同じプログラムを実行することができる。このようにして、複数のコンテキストにより通信の多重処理が実現されている。同じプロセスのスレッド同士はメモリを共有しているので、スレッド間でデータを共有するのは比較的容易である。このため、本実施例ではマルチスレッドを使用する方式で説明を行うことにするが、マルチプロセスで共有メモリを使用する方法でも同様の実施が可能である。 In the server 201, in the case of performing a plurality of independent first to processing to the client 203 1 ~203 n of the n as a communication partner at the same time, it executes the contents of each process, affecting the execution contents of another process As a result, processing is performed in multiple contexts. In order to realize a plurality of contexts, there are a method using a multi-thread and a method using a shared memory in a multi-process. By sharing data among a plurality of threads or between a plurality of processes, a plurality of threads or a plurality of processes can execute the same program by referring to the same data. In this way, communication multiplex processing is realized by a plurality of contexts. Since threads in the same process share memory, it is relatively easy to share data between threads. For this reason, in the present embodiment, description will be made with a method using multi-threads, but the same implementation is possible with a method using shared memory in multi-processes.

図2は、データ処理システムを構成するサーバ上で動作するサーバプログラムで構成されるサーバプログラム部を表わしたものである。図1と共に説明を行う。サーバプログラム部301は、サーバ201に実装されるプログラムで実現する回路部分で、通信の多重処理を行うことができる。サーバ201と第1〜第nのクライアント2031〜203nの通信は、実際にはこのサーバプログラム部301と第1〜第nのクライアント2031〜203nに実装される各クライアントプログラムによって実現される図示しないクライアントプログラム部との通信であり、このようなサーバプログラム部301とクライアントプログラム部によって、データ処理システム200が実現されている。 FIG. 2 shows a server program unit composed of a server program that operates on a server constituting the data processing system. A description will be given with FIG. The server program unit 301 is a circuit part realized by a program installed in the server 201 and can perform multiple processing of communication. The communication between the server 201 and the first to nth clients 203 1 to 203 n is actually realized by the client program installed in the server program unit 301 and the first to nth clients 203 1 to 203 n. The data processing system 200 is realized by the server program unit 301 and the client program unit.

サーバプログラム部301は、事象待ちスレッド311、非ブロック受信スレッド312、ブロック受信スレッド313およびアプリケーションスレッド314という複数のスレッド上でそれぞれ対応する処理を行うようになっている。さらに、サーバ201を運用するのに必要なプログラムとデータを利用者ごとにひとまとまりとしたユーザオブジェクト321およびこのサーバ201が通信中のクライアントごとにそのクライアントとのコネクションに関するプログラムとデータをひとまとまりとしたコネクションオブジェクト322という2種類のオブジェクトを備える。これらはそれぞれデータ部としてユーザオブジェクトのデータ部323、コネクションオブジェクトのデータ部324を保持している。これらのユーザオブジェクトのデータ部323およびコネクションオブジェクトのデータ部324に基づき、ユーザオブジェクトのプログラム部325、コネクションオブジェクトのプログラム部326がそれぞれ動作する。これと共に、通信制御アクセスライブラリ330、実行スレッド制御部331、事象待ち制御部332、非ブロック受信制御部333、ブロック受信制御部334およびユーザプログラムによって実現されるユーザプログラム部335も動作するようになっている。本実施例では、多重通信処理により複数の接続先からデータを受信するという本発明を実施するために必要最小限のオブジェクトだけを挙げて説明を行っている。実際には、これ以外の目的のものについては、個別にオブジェクトを追加して利用することができる。たとえば、金融機関の入出金処理を扱うサーバであれば、クライアントごとにその計算処理や計算処理に必要なデータをまとめたオブジェクトを追加する。   The server program unit 301 performs corresponding processing on a plurality of threads, that is, an event waiting thread 311, a non-block receiving thread 312, a block receiving thread 313, and an application thread 314. Further, a user object 321 that collects a program and data necessary for operating the server 201 for each user, and a program and data related to a connection with the client for each client with which the server 201 is communicating are collected. The connection object 322 includes two types of objects. Each of these holds a data part 323 of a user object and a data part 324 of a connection object as data parts. Based on the user object data part 323 and the connection object data part 324, the user object program part 325 and the connection object program part 326 operate. At the same time, the communication control access library 330, the execution thread control unit 331, the event waiting control unit 332, the non-block reception control unit 333, the block reception control unit 334, and the user program unit 335 realized by the user program also operate. ing. In this embodiment, only the minimum necessary objects for carrying out the present invention of receiving data from a plurality of connection destinations by multiplex communication processing are described. Actually, objects for other purposes can be added and used individually. For example, in the case of a server that handles a deposit / withdrawal process of a financial institution, an object that summarizes the calculation process and data necessary for the calculation process is added for each client.

それぞれのプログラム部およびスレッドについて説明を行う。   Each program part and thread will be described.

通信制御アクセスライブラリ330は、サーバプログラム部301上で動作するすべてのプログラムから呼び出し可能なプログラム部となっている。通信制御アクセスライブラリ330は、サーバ201上で動作するすべてのプログラムに対して、外部のプログラムとデータの送受信を行うための、インタフェースを提供している。具体的には、サーバ201とクライアント203間の通信路としてのコネクションの接続、切断を行い、データの送受信を行っている。通信制御アクセスライブラリ330は、例えば、BSD SOCKET(Berkeley Software Distribution socket)をベースとしたもので実現することができる。   The communication control access library 330 is a program part that can be called from all programs operating on the server program part 301. The communication control access library 330 provides an interface for exchanging data with an external program for all programs running on the server 201. Specifically, the connection as a communication path between the server 201 and the client 203 is connected and disconnected, and data is transmitted and received. The communication control access library 330 can be realized based on, for example, BSD SOCKET (Berkeley Software Distribution socket).

実行スレッド制御部331も、サーバプログラム部301上で動作するすべてのプログラムから呼び出し可能なプログラムによって実現されている。実行スレッド制御部331は、それぞれ異なるスレッド上で動作するプログラム部からプログラム部へと処理要求を伝えることができる。また、処理要求されたプログラム部の使用できるスレッドが全て使用中で、新たに処理要求を受け取ることができないとき、実行スレッド制御部331はこの処理要求を図示しないキューに保存するようになっている。   The execution thread control unit 331 is also realized by a program that can be called from all programs operating on the server program unit 301. The execution thread control unit 331 can transmit a processing request from a program unit operating on a different thread to the program unit. In addition, when all the threads that can be used by the requested program unit are in use and a new processing request cannot be received, the execution thread control unit 331 stores the processing request in a queue (not shown). .

事象待ち制御部332は、事象待ちスレッド311上で動作するプログラムによって実現されている。事象待ち制御部332は、各クライアントプログラム部から接続の要求を受け、通信制御アクセスライブラリ330によって、そのコネクションの接続を行わせる。また、そのコネクションごとに対応するコネクションオブジェクト322をそれぞれ作成する。そして、ブロック受信スレッド313の空き状況や図示しない各クライアントプログラム部との通信頻度に従って、データ受信を非ブロック受信制御部333またはブロック受信制御部334のどちらで行わせるか決定する。この決定方法については後に具体的に説明を行う。事象待ち制御部332は、また、非ブロック受信制御部333に割り当てたクライアントプログラム部について、データの受信処理が可能なコネクション一覧を作成する多重受信待ちを行う。多重受信待ちについても後に具体的に説明を行う。さらに、事象待ち制御部332は、クライアントプログラム部から通信の切断要求も受け、切断処理を行う。   The event waiting control unit 332 is realized by a program operating on the event waiting thread 311. The event waiting control unit 332 receives a connection request from each client program unit, and causes the communication control access library 330 to connect the connection. In addition, a connection object 322 corresponding to each connection is created. Then, it is determined whether the non-block reception control unit 333 or the block reception control unit 334 receives data according to the availability of the block reception thread 313 and the communication frequency with each client program unit (not shown). This determination method will be specifically described later. The event wait control unit 332 also waits for multiple reception for creating a list of connections that can receive data for the client program unit assigned to the non-block reception control unit 333. The multiple reception waiting will be specifically described later. Furthermore, the event waiting control unit 332 also receives a communication disconnection request from the client program unit, and performs a disconnection process.

事象待ち制御部332によってブロック受信方式が選択されているコネクションのコネクションオブジェクト322への参照は、ブロック受信コネクション管理テーブル342に格納されている。このブロック受信コネクション管理テーブル342には、コネクションごとにそのコネクションからデータを受け取った時刻が管理されている。この受信時刻は受信を行うたびに時計回路218の計時する時刻で更新され、常に一番最後に受信を行った時刻の情報となっている。   The reference to the connection object 322 of the connection for which the block reception method is selected by the event waiting control unit 332 is stored in the block reception connection management table 342. The block reception connection management table 342 manages the time at which data is received from the connection for each connection. This reception time is updated with the time measured by the clock circuit 218 every time reception is performed, and is always information on the time of reception at the end.

また、非ブロック受信方式が選択されているコネクションへのコネクションオブジェクト322への参照は、非ブロック受信コネクション管理テーブル341に格納されている。この非ブロック受信コネクション管理テーブル341にも、ブロック受信コネクション管理テーブル342と同様にコネクションごとに最新の受信時刻が管理されている。事象待ち制御部332は、このテーブルに格納されたコネクションについて、受信可能なコネクション一覧を作成する多重受信待ちを行っている。   Further, the reference to the connection object 322 to the connection for which the non-block reception method is selected is stored in the non-block reception connection management table 341. Similarly to the block reception connection management table 342, the latest reception time is managed for each connection in the non-block reception connection management table 341 as well. The event wait control unit 332 waits for multiple reception for creating a list of receivable connections for the connections stored in this table.

ブロック受信制御部334は、ブロック受信スレッド313上で動作するプログラムによって実現されており、事象待ち制御部332によって割り当てられたコネクションについて受信処理を行っている。ブロック受信制御部334は、一度割り当てられたコネクションから連続してデータを受信するように動作する。ブロック受信制御部334は、ブロック受信スレッド313において受信したデータを、実行スレッド制御部331を介して、ユーザプログラム部335に受け渡す。これにより、受信処理の後に引き続く他の処理を、ユーザプログラム部335にアプリケーションスレッド314で行わせ、ブロック受信制御部334はブロック受信スレッド313上で直ちに次の受信処理を行うことができる。したがって、連続して通信が行われる場合は少ないオーバーヘッドで通信処理を行うことができる。   The block reception control unit 334 is realized by a program that operates on the block reception thread 313, and performs a reception process on the connection assigned by the event wait control unit 332. The block reception control unit 334 operates so as to continuously receive data from a connection once allocated. The block reception control unit 334 passes the data received by the block reception thread 313 to the user program unit 335 via the execution thread control unit 331. This allows the user program unit 335 to perform other processing subsequent to the reception processing by the application thread 314, and the block reception control unit 334 can immediately perform the next reception processing on the block reception thread 313. Therefore, when continuous communication is performed, communication processing can be performed with little overhead.

非ブロック受信制御部333は、非ブロック受信スレッド312上で動作するプログラムによって実現されている。事象待ち制御部332によって割り当てられたコネクションについて受信データが存在するときにその受信処理を行っている。本実施例では、事象待ち制御部332により、常に受信可能になってから非ブロック受信制御部333が受信動作を行うようになっている。もし受信データが存在しないときに受信を行うと、非ブロック受信方式では受信データが無いという結果が直ちに返却される。ブロック受信制御部334と同様に、非ブロック受信制御部333は非ブロック受信スレッド312において受信したデータをユーザプログラム部335に受け渡し、自らは受信処理以外の処理を行わないようになっている。   The non-block reception control unit 333 is realized by a program that operates on the non-block reception thread 312. When reception data exists for the connection assigned by the event wait control unit 332, the reception processing is performed. In this embodiment, the event waiting control unit 332 allows the non-block reception control unit 333 to perform a reception operation after reception is always possible. If reception is performed when there is no reception data, the result that there is no reception data is immediately returned in the non-block reception method. Similar to the block reception control unit 334, the non-block reception control unit 333 passes the data received by the non-block reception thread 312 to the user program unit 335 and does not perform any processing other than the reception process.

ユーザプログラム部335は、アプリケーションスレッド314上で動作するプログラムによって実現されており、実行スレッド制御部331を介して、ブロック受信制御部334および非ブロック受信制御部333から受け取ったクライアントプログラム部からの受信データと処理要求に応じた処理を行うようになっている。受信以外の処理時間が極端に長いデータが存在する可能性もあり、データごとに処理時間が不均一な場合でも、このようにユーザプログラム部335が受信とは別のスレッドで処理を行うことで、受信に用いられるスレッドには影響が及ばないようになっている。もちろん、このようなデータ処理は、アプリケーションスレッド314で行わず、そのままブロック受信スレッド313および非ブロック受信スレッド312で行うようにすることもできる。サーバプログラム部301以外にサーバ201上でCPUやメモリなどのリソースを使用して動作しているプログラムが存在する場合、スレッドの数、つまり実行多重度の数は、たとえば、サーバプログラム部301が始動したときのCPU211の使用率に基づいて決定するようにして、サーバ201全体的に処理能力が低下するのを防ぐ。また、ユーザプログラム部335でのデータ処理においても、データ受信と同様、アプリケーションスレッド314を1つのコネクションに専有させ処理を行わせるものと、それ以外とに分離することもできる。   The user program unit 335 is realized by a program operating on the application thread 314, and received from the client program unit received from the block reception control unit 334 and the non-block reception control unit 333 via the execution thread control unit 331. Processing is performed according to data and processing requests. There is a possibility that data having an extremely long processing time other than reception may exist. Even when the processing time is not uniform for each data, the user program unit 335 performs processing in a thread different from reception in this way. The thread used for reception is not affected. Of course, such data processing may be performed by the block reception thread 313 and the non-block reception thread 312 without being performed by the application thread 314. When there is a program operating on the server 201 using resources such as a CPU and a memory other than the server program unit 301, the number of threads, that is, the number of execution multiplicity, for example, is started by the server program unit 301. In such a case, it is determined based on the usage rate of the CPU 211 at the time, and the processing capacity of the entire server 201 is prevented from being lowered. Also, in the data processing in the user program unit 335, as in the case of data reception, the application thread 314 can be dedicated to one connection for processing and the other can be separated.

図3は、サーバプログラム部全体の処理の流れを表わしたものである。図1および図2と共に説明を行う。サーバプログラム部301は、サーバ201のOSからサーバとしてコネクションを制御する処理を開始する要求を受信すると(ステップS401:Y)、まず1つのスレッド上でサーバプログラム部301の動作を開始させる(ステップS402)。このスレッドは説明のために初期スレッドと呼ぶことにする。初期スレッドはOSがサーバプログラム部301の処理を開始するときに生成されるものであってもよいし、あるいは元々OSが行う様々な処理用に確保していたスレッドのうちの1つであってもよい。サーバプログラム部301は事象待ちスレッド311、ブロック受信スレッド313、非ブロック受信スレッド312、およびアプリケーションスレッドといった各スレッドを生成し(ステップS403)、各スレッド上で、それぞれのプログラム部が動作を開始する(ステップS404)。ここから、サーバプログラム部301の処理は各スレッドにまたがって複数のプログラム部により並列で行われるようになり(ステップS405)、OSから停止要求を受信するまで動作し続ける(ステップS406:N)。この並列で行われる各プログラム部の処理については、後で別途説明を行う。初期スレッドは図2には図示しないスレッドとしてそのままサーバプログラム部301の全体を制御するために確保しておいてもよいし、必要なければ他のプログラムの処理を行うために使用するようにしてもよい。サーバプログラム部301はOSから停止要求を受信すると(ステップS406:Y)、各プログラム部を停止させ(ステップS407)、全体的に動作を終了する(エンド)。スレッドの数に応じて同時に行うことができる処理の数は増すが、スレッド数を必要以上に増やすと、CPUの処理能力が分散されることになり、スレッド1つ1つの処理能力が低下してしまう。したがって、サーバプログラム部301は、必要なときにだけスレッドを生成し、不必要なときには削除するような構成にしてもよい。しかし、この場合でも、事象待ちスレッド311は、クライアントからの接続要求を受けるために常に存在している方がのぞましい。ところで、スレッドの生成および削除を行うために必要な処理は一般的に多く、頻繁にこれを行うと結局CPU211の負荷を増すことになってしまう。このため、サーバプログラム部301は、その起動時に全てのスレッドを生成すると、停止するまでそのまま動作させ続けたほうが効率的である。本明細書でも、サーバプログラム部301の動作中にスレッドの生成および削除は行わない場合について説明を行う。   FIG. 3 shows the processing flow of the entire server program unit. The description will be made with reference to FIGS. When the server program unit 301 receives a request to start connection control processing as a server from the OS of the server 201 (step S401: Y), the server program unit 301 first starts the operation of the server program unit 301 on one thread (step S402). ). This thread will be referred to as the initial thread for purposes of explanation. The initial thread may be generated when the OS starts processing of the server program unit 301, or is one of threads originally reserved for various processing performed by the OS. Also good. The server program unit 301 generates threads such as an event waiting thread 311, a block reception thread 313, a non-block reception thread 312, and an application thread (step S403), and each program unit starts operating on each thread (step S403). Step S404). From here, the processing of the server program unit 301 is performed in parallel by a plurality of program units across each thread (step S405), and continues to operate until a stop request is received from the OS (step S406: N). The processing of each program unit performed in parallel will be separately described later. The initial thread may be reserved for controlling the entire server program unit 301 as a thread (not shown in FIG. 2), or may be used for processing other programs if not necessary. Good. When the server program unit 301 receives a stop request from the OS (step S406: Y), the server program unit 301 stops each program unit (step S407) and ends the operation as a whole (end). Depending on the number of threads, the number of processes that can be performed simultaneously increases, but if the number of threads is increased more than necessary, the processing capacity of the CPU will be distributed, and the processing capacity of each thread will decrease. End up. Therefore, the server program unit 301 may be configured to generate a thread only when necessary and delete it when unnecessary. However, even in this case, it is desirable that the event waiting thread 311 is always present in order to receive a connection request from the client. By the way, there are generally many processes necessary for creating and deleting threads, and if this is done frequently, the load on the CPU 211 will eventually increase. For this reason, if all the threads are generated at the time of starting the server program unit 301, it is more efficient to continue the operation until it stops. Also in this specification, a case where a thread is not generated or deleted during the operation of the server program unit 301 will be described.

図4は、サーバプログラム部の行う処理のうちの事象待ち制御部の処理の流れを表わしたものである。図1および図2と共に説明を行う。事象待ち制御部332はサーバプログラム部301により、事象待ちスレッド311上で始動すると、まずクライアント203からの接続要求を受けるための準備を行い、着信待ちの状態を開始する(ステップ451)。着信待ちの開始は、通信制御アクセスライブラリ330を起動することで実行される。実際には、例えば、TCP/IP(Transmission Control Protocol/Internet Protocol)プロトコルを用いる場合は、指定したポート番号でサーバソケットを作成し、クライアント203からの着信を待つ状態を作り出す。TCP/IPでは、1つのIPアドレスは複数のポートから構成され、通信を行うには、IPアドレスとポート番号の指定を行う。例えば、1つのコンピュータでブラウザとメーラのような複数のプログラム部により通信を行う場合がある。このとき、どのプログラム部のための通信データかを指定するために、プログラムにポート番号が割り当てられている。ソケットとはIPアドレスとポート番号の組を指したものである。つまり、ソケットはプログラム部が他の装置のプログラムにより実現されるプログラム部と通信を行うときの、仮想的なインタフェースとして動作している。前述したように、通信制御アクセスライブラリ330は、BSD SOCKETをベースとしたもので実現することができ、これは現在主流のソケットである。この着信を待つものは、サーバソケットを示すファイル記述子やソケットオブジェクトとしても扱われるが、ここでは、これらを総称して着信待ちオブジェクトと呼ぶ。   FIG. 4 shows the flow of processing of the event waiting control unit among the processing performed by the server program unit. The description will be made with reference to FIGS. When the event waiting control unit 332 is started on the event waiting thread 311 by the server program unit 301, the event waiting control unit 332 first prepares to receive a connection request from the client 203 and starts waiting for an incoming call (step 451). The start of waiting for an incoming call is executed by activating the communication control access library 330. Actually, for example, when the TCP / IP (Transmission Control Protocol / Internet Protocol) protocol is used, a server socket is created with a designated port number, and a state of waiting for an incoming call from the client 203 is created. In TCP / IP, one IP address is composed of a plurality of ports, and in order to perform communication, an IP address and a port number are designated. For example, communication may be performed by a plurality of program units such as a browser and a mailer on one computer. At this time, a port number is assigned to the program in order to designate the program data for which program unit. A socket refers to a set of an IP address and a port number. That is, the socket operates as a virtual interface when the program unit communicates with a program unit realized by a program of another device. As described above, the communication control access library 330 can be realized based on BSD SOCKET, which is currently a mainstream socket. Those waiting for an incoming call are also handled as a file descriptor or a socket object indicating a server socket. Here, these are collectively called an incoming call waiting object.

事象待ち制御部332は停止要求を受信すると(ステップS452:Y)、その処理を終了する(エンド)。停止要求を受信しないうちは(ステップS452:N)、事象待ちスレッド311上で処理を続行し、まず、非ブロック受信のための多重受信待ちを行う(ステップS453)。多重受信待ちとは、非ブロック受信コネクション管理テーブル341に登録された、非ブロック受信に割り当てられたコネクションを対象にして行われ、データが受信可能になるまで待つ処理である。これは、例えば、UNIX(登録商標)(UNiplexed Information and Computing System) OSでは「select()」や「poll()」という名前のシステムコールやライブラリとして、サンマイクロシステム(Sun Microsystems)社のプログラミング言語であるJAVA(登録商標)ではセレクタという名前のサービスとして提供されている。具体的には、これらの関数やサービスは、サーバプログラム部301により呼び出されると、OSの実行によりバッファリングしたコネクションからのデータが、バッファメモリに存在するかどうかを走査し、1つ以上のデータを見つけた時点で、それをサーバプログラム部301に返却するようにして動作している。データが見つからなければ、見つかるまで走査が繰り返される。ここでは、このセレクタを利用してOSの実行によりバッファメモリにコネクションからの受信データがバッファリングされたかどうかを走査し、多重受信待ちの結果を得るとして説明を行うことにする。   When receiving the stop request (step S452: Y), the event waiting control unit 332 ends the processing (end). While the stop request is not received (step S452: N), the processing is continued on the event waiting thread 311, and first, multiple reception waiting for non-block reception is performed (step S453). The wait for multiple reception is a process performed for a connection assigned to non-block reception registered in the non-block reception connection management table 341 and waiting until data can be received. For example, in UNIX (UNiplexed Information and Computing System) OS, as a system call or library named “select ()” or “pol ()”, a programming language of Sun Microsystems, Inc. JAVA (registered trademark) is provided as a service named selector. Specifically, when these functions and services are called by the server program unit 301, the data from the connection buffered by the execution of the OS is scanned in the buffer memory to scan one or more data. When it is found, it is operated so as to return it to the server program unit 301. If no data is found, the scan is repeated until it is found. Here, the description will be made on the assumption that the received data from the connection is buffered in the buffer memory by executing the OS using this selector, and the result of waiting for multiple reception is obtained.

図5は、多重受信待ちの結果の例を表わしたものである。図2と共に説明を行う。多重受信待ちの結果は、接続中のコネクションそれぞれに対して、バッファメモリにOSの実行によりバッファリングしたデータの有無を表わす情報で構成されている。セレクタによる走査結果が報告されるときは、必ず1つ以上のコネクションからサーバプログラム部301がすぐに受信可能なデータが存在するときである。この図5の例では、クライアントxからのデータがすでにバッファメモリに存在することを表わしている。また、クライアントyからのデータはまだ存在しない。このような情報が接続するクライアントの分、得られるようになっている。   FIG. 5 shows an example of a result of waiting for multiple reception. This will be described with reference to FIG. The result of waiting for multiple reception is composed of information indicating the presence / absence of data buffered by execution of the OS in the buffer memory for each connection being connected. The scanning result by the selector is always reported when there is data that the server program unit 301 can immediately receive from one or more connections. The example of FIG. 5 represents that data from the client x already exists in the buffer memory. Also, there is no data from client y yet. Such information can be obtained for the connected clients.

図4に戻って、図5の多重受信待ちの結果の例を基にして説明を続ける。ステップS451の着信待ちおよびステップS453の多重受信待ちを開始した結果、新たなクライアントから接続を要求されたか、あるいは多重受信待ちの結果が報告された場合には、それぞれに応じた処理が行われる。そこで、処理対象が発生すると、これが2つのうちのどちらであるかを判断する判断処理が行われる(ステップS454)。これらの処理対象に応じた処理やそれに関するデータをまとめて処理対象オブジェクトとする。処理対象オブジェクトが着信待ちオブジェクトの場合(Y)、接続要求元のクライアントに対するコネクションオブジェクト322を作成し、その参照を非ブロック受信コネクション管理テーブル341に格納する(ステップS455)。一方、処理対象オブジェクトが着信待ちオブジェクトではない場合(ステップS454:N)、つまり、セレクタによる走査結果を受けた場合、図5を例とすると、クライアントxからのデータ受信を非ブロック受信制御部333またはブロック受信制御部334のどちらで行わせるか決定する処理を行う。まず、ブロック受信スレッド313に空きがあるかどうかを調べる(ステップS456)。空きがあれば(Y)、実行スレッド制御部331を介して処理要求をブロック受信制御部334に行い、ブロック受信スレッド313上で処理させるようにして(ステップS457)、このクライアントxとのコネクションをブロック受信コネクション管理テーブル342に登録する。ブロック受信スレッド313に空きがなければ(ステップS456:N)、受信処理を非ブロック受信スレッド312で行うようにする。非ブロック受信制御部333は複数のスレッドで順次受信処理を行うがスレッド数以上のコネクションを扱っている状態のとき、実際の受信処理が開始されるまで待ち時間が発生する。そこで、非ブロック受信制御部334に受信処理要求を送信する前に受信時刻を更新しておく(ステップS458)。その後、実行スレッド制御部331を介し、非ブロック受信スレッド312に対し受信処理の要求を送信する(ステップS459)。   Returning to FIG. 4, the description will be continued based on the example of the result of waiting for multiple reception in FIG. As a result of starting the waiting for incoming call in step S451 and waiting for multiple reception in step S453, when a connection is requested from a new client or a result of waiting for multiple reception is reported, processing corresponding to each is performed. Therefore, when a processing target is generated, a determination process is performed to determine which of the two is to be processed (step S454). The processing according to these processing targets and the data related thereto are collectively set as a processing target object. If the object to be processed is an incoming call waiting object (Y), a connection object 322 is created for the connection requesting client, and the reference is stored in the non-blocking reception connection management table 341 (step S455). On the other hand, when the object to be processed is not an incoming call waiting object (step S454: N), that is, when a scanning result is received by the selector, taking the example of FIG. Or the process which determines which of the block reception control parts 334 performs is performed. First, it is checked whether or not the block reception thread 313 has a vacancy (step S456). If there is a vacancy (Y), a processing request is sent to the block reception control unit 334 via the execution thread control unit 331 and processed on the block reception thread 313 (step S457), and the connection with this client x is established. Register in the block reception connection management table 342. If there is no empty block reception thread 313 (step S456: N), reception processing is performed by the non-block reception thread 312. The non-block reception control unit 333 sequentially performs reception processing with a plurality of threads, but when waiting for connections exceeding the number of threads, a waiting time occurs until actual reception processing is started. Therefore, the reception time is updated before the reception processing request is transmitted to the non-block reception control unit 334 (step S458). Thereafter, a request for reception processing is transmitted to the non-block reception thread 312 via the execution thread control unit 331 (step S459).

このようにして、コネクションオブジェクトを作成してその参照を非ブロック受信コネクション管理テーブルに格納するか、ブロック受信制御部334または非ブロック受信制御部333に処理を割り当てるかした後(ステップS455、ステップS457、ステップS459)、処理対象オブジェクトを全て処理済みであれば(ステップS460:Y)、スレッドの停止要求を受信しないかぎり(ステップS452:N)、ステップS453の多重受信待ちの再開から処理を繰り返す。また、処理対象オブジェクトが残っていれば(ステップS460:N)、全てなくなるまでステップS454からの処理を繰り返す。ここでは、クライアントから接続要求を受けた場合、ステップS455でコネクションオブジェクト作成後、参照を非ブロック受信コネクション管理テーブル341に格納するとした。しかし、ブロック受信スレッド313に空きがあれば、このコネクションオブジェクト322をブロック受信コネクション管理テーブル342に登録して、ブロック受信制御部334で行うようにしてもよい。しかし、接続だけ事前に行い、通信を行わないケースもあるため、接続の時点では非ブロック受信スレッド312で通信制御を行うことが望ましい。一般に、接続の処理は相手を認識し接続可否を判断する必要があるため通信そのものの処理に比べ処理量が多い。このため、サーバ201としては、事前接続を行いコネクションを維持するという形態をとる方が、より多くのコネクションに対して高いスループット(Throughput)を実現して、効率よい運用が可能になる。したがって、非ブロック受信方式で同時に扱えるコネクション数に対する自由度を維持しながらも、ブロック受信方式を一部のコネクションに適用することで、全体としての性能を向上させる本発明においては、接続時点ではブロック受信方式を選択するのではなく非ブロック受信方式を選択しておき、実際の通信が発生したときにブロック受信制御を選択することが効果的である。   In this way, after creating the connection object and storing the reference in the non-block reception connection management table or assigning the process to the block reception control unit 334 or the non-block reception control unit 333 (steps S455 and S457). In step S459), if all the processing target objects have been processed (step S460: Y), the process is repeated from the restart of waiting for multiple reception in step S453 unless a thread stop request is received (step S452: N). If there are still objects to be processed (step S460: N), the processing from step S454 is repeated until all the objects are removed. Here, when a connection request is received from a client, a reference is stored in the non-block reception connection management table 341 after creating a connection object in step S455. However, if there is an empty block reception thread 313, the connection object 322 may be registered in the block reception connection management table 342 and performed by the block reception control unit 334. However, since there is a case where only connection is performed in advance and communication is not performed, it is desirable to perform communication control by the non-block receiving thread 312 at the time of connection. In general, connection processing requires a larger amount of processing than communication itself because it is necessary to recognize the other party and determine whether or not connection is possible. For this reason, as the server 201, when the connection is made in advance and the connection is maintained, a high throughput (Throughput) is realized with respect to more connections, and an efficient operation becomes possible. Therefore, in the present invention that improves the overall performance by applying the block reception method to some connections while maintaining the degree of freedom for the number of connections that can be handled simultaneously by the non-block reception method, in the present invention, the block is blocked at the time of connection. It is effective to select a non-block reception method instead of selecting a reception method, and to select block reception control when actual communication occurs.

図6は、サーバプログラム部の行う処理のうちブロック受信制御部の処理の流れを表わしたものである。図1および図2と共に説明を行う。ブロック受信制御部334はサーバプログラム部301によりブロック受信スレッド313上で始動すると、まず事象待ち制御部332から実行スレッド制御部331を介して処理要求が送られるのを待つ(ステップS501)。ブロック受信制御部334は停止要求を受信すると(ステップS502:Y)、その処理を終了する(エンド)。停止要求を受信しないうちは(ステップS502:N)、ブロック受信スレッド313上で処理を続行し、処理要求を受信するまで待機する(ステップS503:N)。事象待ち制御部332の図4のステップS457の処理により、受信可能データをブロック受信で受信処理するようブロック受信制御部334に処理要求が送られると、この処理要求を受信し(ステップS503:Y)、データ受信を行う(ステップS504)。これは通常のブロック受信方式で行われるため、データを待ち合わせる待ち時間を有する受信処理である。この待ち時間には所定の値(制限時間)が設定されている。   FIG. 6 shows the flow of processing of the block reception control unit among the processing performed by the server program unit. The description will be made with reference to FIGS. When the server program unit 301 starts on the block reception thread 313, the block reception control unit 334 first waits for a processing request to be sent from the event wait control unit 332 via the execution thread control unit 331 (step S501). When receiving the stop request (step S502: Y), the block reception control unit 334 ends the processing (end). While the stop request is not received (step S502: N), the processing is continued on the block reception thread 313 and waits until the processing request is received (step S503: N). When the processing request is sent to the block reception control unit 334 so as to receive the receivable data by block reception by the processing of step S457 of FIG. 4 of the event waiting control unit 332, this processing request is received (step S503: Y ), Data reception is performed (step S504). Since this is performed by the normal block reception method, it is a reception process having a waiting time for waiting for data. A predetermined value (time limit) is set for this waiting time.

事象待ち制御部332は、図4のステップS454で受信可能データが処理対象として存在するとして、ステップS457に至りブロック受信制御部334に処理要求を送信している。したがって、事象待ち制御部332から処理要求を受信した直後のデータ受信は、即座に行われる。しかし、通常のブロック受信制御部334の動作では、データ受信を行うまでに時間が掛かる場合もある。これが所定の値を超えてタイムアウトになると(ステップS505:Y)、このクライアント203からのデータ受信は非ブロック受信方式で行うように、コネクションへの参照をブロック受信コネクション管理テーブル342から非ブロック受信コネクション管理テーブル341へと移動させる(ステップS506)。これにより、このブロック受信スレッド313は空きスレッドとなり、ステップS501の処理に戻って、次のコネクションが割り当てられるのを待つようになる。   The event waiting control unit 332 determines that the receivable data exists as a processing target in step S454 in FIG. 4, reaches step S457, and transmits a processing request to the block reception control unit 334. Therefore, data reception immediately after receiving a processing request from the event wait control unit 332 is performed immediately. However, in the normal operation of the block reception control unit 334, it may take time to receive data. When this exceeds a predetermined value and a time-out occurs (step S505: Y), reference to the connection is made from the block reception connection management table 342 so that the data reception from the client 203 is performed in the non-block reception method. Move to the management table 341 (step S506). As a result, the block reception thread 313 becomes an empty thread, and the process returns to step S501 to wait for the next connection to be allocated.

一方、タイムアウトすることなく受信が行われると(ステップS505:N)、続いてその受信データが正常なものかどうかの判断処理が行われる(ステップS507)。受信結果が正常でなかった場合(N)、その原因を記録したエラーログを作成し(ステップS508)、そのコネクションへの参照をブロック受信コネクション管理テーブル342から削除する(ステップS509)。これにより、このブロック受信スレッド313は空きスレッドとなり、ステップS501の処理に戻る。受信が異常と判断される原因としては、例えば、データの送信元であるクライアント203側がデータ受信処理が行われる前にコネクションを切断した場合、受信したもののその受信結果が異常である場合が考えられる。このようにして作成されたエラーログは、サーバ201の管理者あるいはクライアント203の利用者に通知するなどして利用することができる。   On the other hand, if reception is performed without time-out (step S505: N), subsequently, a determination process is performed to determine whether the received data is normal (step S507). If the reception result is not normal (N), an error log recording the cause is created (step S508), and the reference to the connection is deleted from the block reception connection management table 342 (step S509). As a result, the block reception thread 313 becomes an empty thread, and the process returns to step S501. Possible causes of the reception being abnormal include, for example, the case where the client 203 as the data transmission source disconnects the connection before the data reception processing is performed, but the reception result is abnormal although received. . The error log created in this way can be used by notifying the administrator of the server 201 or the user of the client 203.

受信が正常に行われれば(ステップS507:Y)、受信時刻を更新する(ステップS510)。続いて受信したデータを処理要求と共に実行スレッド制御部331を介して、アプリケーションスレッド314上のユーザプログラム335に受け渡す(ステップS511)。ここでスレッド停止要求を受信すれば(ステップS512:Y)、処理を終了し(エンド)、受信しなければ(ステップS512:N)、ステップS504に戻って次のデータ受信を行う処理を繰り返す。   If the reception is performed normally (step S507: Y), the reception time is updated (step S510). Subsequently, the received data is transferred together with the processing request to the user program 335 on the application thread 314 via the execution thread control unit 331 (step S511). If a thread stop request is received (step S512: Y), the process ends (end). If not received (step S512: N), the process returns to step S504 to repeat the process of receiving the next data.

図7は、サーバプログラム部の行う処理のうち非ブロック受信制御部の処理の流れを表わしたものである。図1および図2と共に説明を行う。非ブロック受信制御部333はサーバプログラム部301により非ブロック受信スレッド312上で始動すると、まず事象待ち制御部332から実行スレッド制御部331を介して処理要求が送られるのを待つ(ステップS551)。非ブロック受信制御部333は停止要求を受信すると(ステップS552:Y)、その処理を終了する(エンド)。停止要求を受信しないうちは(ステップS552:N)、非ブロック受信スレッド312上で処理を続行し、処理要求を受信するまで待機する(ステップS553:N)。   FIG. 7 shows the flow of processing of the non-block reception control unit among the processing performed by the server program unit. The description will be made with reference to FIGS. When the non-block reception control unit 333 is started on the non-block reception thread 312 by the server program unit 301, the non-block reception control unit 333 first waits for a processing request from the event wait control unit 332 via the execution thread control unit 331 (step S551). When receiving the stop request (step S552: Y), the non-block reception control unit 333 ends the process (end). Until the stop request is received (step S552: N), the processing is continued on the non-blocking reception thread 312 and waits until the processing request is received (step S553: N).

事象待ち制御部332の図4のステップS459の処理により、受信可能データを非ブロック受信で受信処理するよう非ブロック受信制御部333に処理要求が送られると、この処理要求を受信し(ステップS553:Y)、データ受信を行う(ステップS554)。事象待ち制御部332は、図4のステップS454で受信可能データが処理対象として存在するとして、ステップS459に至り非ブロック受信制御部334に処理要求を送信している。したがって、非ブロック受信制御部334でのデータ受信は処理要求を受けるとすぐにそのデータの受信を行うようになっている。   When the processing request is sent to the non-blocking reception control unit 333 so as to receive the receivable data by non-blocking reception by the processing in step S459 of FIG. 4 of the event waiting control unit 332, the processing request is received (step S553). : Y), data reception is performed (step S554). The event waiting control unit 332 assumes that the receivable data exists as a processing target in step S454 of FIG. 4, and has reached step S459 and has transmitted a processing request to the non-block reception control unit 334. Therefore, data reception by the non-block reception control unit 334 is performed as soon as a processing request is received.

受信が正常に行われなければ(ステップS555:N)、その原因を記録したエラーログを作成する(ステップS556)。さらに、このコネクションへの参照を非ブロック受信コネクション管理テーブル341から削除し(ステップS557)、ステップS551の事象待ち制御部332からの処理要求を待つ処理に戻って、再び同様に非ブロック受信方式での受信処理を繰り返す。   If the reception is not performed normally (step S555: N), an error log recording the cause is created (step S556). Further, the reference to this connection is deleted from the non-blocking reception connection management table 341 (step S557), and the process returns to the process of waiting for the processing request from the event waiting control unit 332 in step S551, and again in the non-blocking reception method. Repeat the receiving process.

一方、受信が正常に行われれば(ステップS555:Y)、受信したデータを処理要求と共に実行スレッド制御部331を介して、アプリケーションスレッド314上のユーザプログラム335に受け渡す(ステップS558)。そして、この受信データがそのコネクションからの最後のデータであるかどうかを判断する処理を行う(ステップS559)。これは、ファイルの終端を表わすEOF(End of File)コードが、受信データとともに受け取った受信結果の概要を表わす情報に含まれているかどうかで分かるようになっている。最後のデータであれば(Y)、ステップS557の非ブロック受信コネクション管理テーブル341からこのコネクションへの参照を削除する処理を行った後に、一方、最後のデータでなければ(ステップS559:N)、そのままステップS551の事象待ち制御部332からの処理要求を待つ処理に戻って、再び同様に非ブロック受信方式での受信処理を繰り返す。   On the other hand, if the reception is normally performed (step S555: Y), the received data is transferred to the user program 335 on the application thread 314 via the execution thread control unit 331 together with the processing request (step S558). Then, a process of determining whether or not the received data is the last data from the connection is performed (step S559). This can be understood from whether or not an EOF (End of File) code representing the end of the file is included in the information representing the outline of the reception result received together with the received data. If it is the last data (Y), after performing the process of deleting the reference to this connection from the non-block reception connection management table 341 in step S557, on the other hand, if it is not the last data (step S559: N), Returning to the process of waiting for a process request from the event wait control unit 332 in step S551 as it is, the reception process by the non-block reception method is repeated again in the same manner.

このように、非ブロック受信制御部333は、1回、処理要求を受信するごとに、そのスレッドで処理するコネクションを切り替えるようになっている。これにより、少ない数のスレッドを、特定のコネクションに専有させることなく、多くのコネクションに開放することが可能である。なお、非ブロック受信制御部333の処理に、受信時刻を更新する処理が含まれないのは、図4の事象待ち制御部332の処理のステップS458によりすでに行われているためである。前述したように、非ブロック受信スレッド312の数は、非ブロック受信方式に割り当てられたコネクションの数より少い可能性があり、このとき、図7のような非ブロック受信制御部333の処理は開始されない。したがって、事象待ち制御部332の処理で、非ブロック受信制御部333に送信された処理要求は、非ブロック受信スレッド312上で実行中の処理が終了し、空きスレッドができるまで、実行スレッド制御部331のキューに保存される。このため、スレッド数以上のコネクションにおいて受信事象が同時に発生したときには待ちが発生するが、これらは順次受信処理されるので、ブロック受信方式のように1つのコネクションに専有されてしまうことはない。つまり、接続相手の数に制限されることがないので、サーバシステムとしてはより広い分野に利用できるという拡張性が備わったものとなる。   As described above, the non-block reception control unit 333 switches the connection to be processed by the thread every time a processing request is received. As a result, a small number of threads can be released to many connections without occupying a specific connection. The reason why the process of updating the reception time is not included in the process of the non-block reception control unit 333 is that the process has already been performed in step S458 of the process of the event waiting control unit 332 in FIG. As described above, the number of non-block reception threads 312 may be smaller than the number of connections assigned to the non-block reception method. At this time, the processing of the non-block reception control unit 333 as shown in FIG. Not started. Therefore, the processing request transmitted to the non-blocking reception control unit 333 by the processing of the event waiting control unit 332 is executed until the processing being executed on the non-blocking reception thread 312 ends and an empty thread is generated. It is stored in the queue 331. For this reason, when reception events occur simultaneously in connections exceeding the number of threads, waiting occurs. However, since these are sequentially received, they are not dedicated to one connection unlike the block reception method. In other words, since the number of connection partners is not limited, the server system can be used in a wider range of fields.

以上説明したように、本実施例によれば、多数のコネクションを同時に扱うサーバプログラム部301において、通信頻度に応じてブロック受信制御部334と非ブロック受信制御部333を選択することができるようにした。これにより、通信頻度の高いコネクションにはブロック受信制御部334でスループットの高い通信を行うことを可能にし、非ブロック受信制御部333でこれ以外のコネクションに対して通信の多重処理を行うことを可能にした。また、ブロック受信制御部334で制御するコネクション数を一定数以上にはしないことで、コンテキスト数の増加を抑え、サーバプログラム部301全体としての処理能力低下を防ぐこともできるようにした。さらに、ブロック受信制御部334に割り当てたコネクションからのデータ受信に制限時間を設け、タイムアウトすると非ブロック受信制御部333に割当を変更するようにした。サーバには、ブロック受信方式か非ブロック受信方式のどちらかのサーバプログラムが実装され、接続相手の数を制限しない場合、非ブロック受信方式をセレクタと組み合わせたものとなるのが一般的である。しかし、接続相手の中に1つでも高い頻度で通信を行うものがあると、セレクタの走査によるオーバーヘッドが問題になってしまう。しかし、本実施例によれば、通信頻度の高い接続相手には、ブロック受信方式を用いることができるので、セレクタによる走査は無通信あるいは通信頻度の低い接続相手のみに対して行われる。このため、走査オーバーヘッドを低減させることができる。このように、動的にコネクションの割当を変更することで、本発明のデータ処理サーバは、接続の可能なコネクション数に対して自由度を維持しつつ、同時に高い通信性能を実現することができる。   As described above, according to the present embodiment, the server program unit 301 that handles a large number of connections simultaneously can select the block reception control unit 334 and the non-block reception control unit 333 according to the communication frequency. did. As a result, it is possible for the block reception control unit 334 to perform high-throughput communication for connections with high communication frequency, and the non-block reception control unit 333 can perform communication multiplex processing for other connections. I made it. In addition, by preventing the number of connections controlled by the block reception control unit 334 from exceeding a certain number, it is possible to suppress an increase in the number of contexts and prevent a decrease in processing capacity of the server program unit 301 as a whole. Furthermore, a time limit is set for data reception from the connection allocated to the block reception control unit 334, and the allocation is changed to the non-block reception control unit 333 when a timeout occurs. When a server program of either a block reception system or a non-block reception system is installed in the server and the number of connection partners is not limited, the non-block reception system is generally combined with a selector. However, if one of the connection partners communicates at a high frequency, the overhead due to selector scanning becomes a problem. However, according to the present embodiment, since the block reception method can be used for a connection partner with high communication frequency, scanning by the selector is performed only for connection partners with no communication or low communication frequency. For this reason, scanning overhead can be reduced. In this way, by dynamically changing the connection allocation, the data processing server of the present invention can simultaneously realize high communication performance while maintaining a degree of freedom with respect to the number of connections that can be connected. .

従来、イベント型のプログラムを利用した非ブロック受信方式が提案されている。イベント型のプログラムでは、ある決まったイベントが発生することにより、プログラムの別の処理が誘発される仕組みになっている。たとえば、OSによりコネクションからのデータがバッファメモリにバッファリングされた、というイベントにより誘発されて、データ受信およびデータ処理が開始される。これによれば、セレクタによりバッファリング済みのデータの有無を走査する必要がない。このため、走査によるオーバーヘッドを省くことができ、通信頻度の高いコネクションに対しても、走査時間に影響される処理効率の悪化の問題を排除することができる。このイベントドリブンの通信プログラムを実現するものとして、たとえば、UNIX(登録商標)互換のOSであるBSD(Berkeley Software Distribution)では「kqueue」、同じくUNIX(登録商標)互換のOSであるLinuxでは「epool」、さらにマイクロソフト(Microsoft)社のOSであるウィンドウズ(登録商標)(Windows(登録商標))では「BeginRecv」や「EndRecv」といった関数が提供されている。このようなイベント型のプログラムは、各処理の呼び出し関係がはっきりしたブロック受信方式および非ブロック受信方式のプログラムとは構造が大きく異なっている。ところが、既存のアプリケーションには、セレクタを用いた非ブロック受信方式により設計されたプログラムで実現されているものが多い。これらを新たに呼び出し関係のはっきりしないイベント型のプログラムに変更するには、多大な労力が必要とされるが、本発明の通信制御方式を使用すれば、より少ない労力でイベント型のプログラムに匹敵する効率のよいデータ受信を行うことができる。また、イベント型のプログラムでは、OSあるいはライブラリが優先的に処理するコネクションを決定してしまう。ライブラリとは複数のプログラムにわたって汎用的に使われるデータや関数をまとめたもので、OSと同様、サーバプログラムとは別に構成されたものであるため、自由にその動作を変更することができない。本発明のデータ処理方法によれば、コネクションの使用頻度の計算をサーバプログラム上に実装でき、イベント型と同様に優先するコネクションを動的に変更することが可能なだけでなく、利用者が任意に優先させるコネクションを変えることもできる。   Conventionally, a non-block reception method using an event type program has been proposed. In an event-type program, when a certain event occurs, another process of the program is induced. For example, data reception and data processing are started by being triggered by an event that data from the connection is buffered in the buffer memory by the OS. According to this, it is not necessary to scan the presence / absence of data buffered by the selector. For this reason, overhead due to scanning can be eliminated, and the problem of deterioration in processing efficiency affected by scanning time can be eliminated even for connections with high communication frequency. As an implementation of the event-driven communication program, for example, “BSD” (Berkeley Software Distribution) compatible with UNIX (registered trademark) is “kqueue”, and Linux (Linux) is also compatible with “epool” (epool). In addition, functions such as “BeginRecv” and “EndRecv” are provided in Windows (registered trademark), which is an OS of Microsoft Corporation. Such an event-type program is significantly different in structure from a block reception type program and a non-block reception type program in which the calling relationship of each process is clear. However, many existing applications are realized by a program designed by a non-block reception method using a selector. It takes a lot of effort to change these to event-type programs with unclear calling relations, but if the communication control method of the present invention is used, it will be comparable to event-type programs with less effort. Efficient data reception. In an event type program, the OS or library preferentially processes connections to be processed. A library is a collection of general-purpose data and functions over a plurality of programs. Like a OS, a library is configured separately from a server program, and thus its operation cannot be freely changed. According to the data processing method of the present invention, the calculation of the connection usage frequency can be implemented on the server program, and not only the priority connection can be dynamically changed in the same manner as the event type, but also the user can arbitrarily You can also change the connection to give priority to.

ここでは、TCP/IPなどの通信プロトコルを使用し、LANやインターネットなどを介し互いに通信を行うプログラムのうち、サーバプログラムについて説明を行った。本発明は、多数のコネクションを同時に処理するプログラムにおいてより効果的であるが、クライアントプログラムにおいて同じ実装を行うことももちろん可能である。   Here, the server program is described among the programs that use a communication protocol such as TCP / IP and communicate with each other via a LAN, the Internet, or the like. The present invention is more effective in a program that processes a large number of connections simultaneously, but it is of course possible to implement the same implementation in a client program.

<本発明の変形例> <Modification of the present invention>

図8は、本発明の変形例のサーバプログラム部の行う処理のうちの事象待ち制御部の処理の流れを表わしたものである。この図8は実施例の図4に対応するものであり、図4と同一の部分は同一のステップ番号を付しており、適宜説明を省略する。またステップS454以前の処理は図示を省略している。実施例の事象待ち制御部332をこの変形例では事象待ち制御部332Aとしている。また、実施例のブロック受信制御部334をこの変形例ではブロック受信制御部334Aとしている。これらは、それぞれ実施例とは異なる処理を行うプログラムにより実現されているためである。図2と共に説明を行う。事象待ち制御部332Aは受信可能なデータがあると、そのデータ受信をブロック受信制御部334Aあるいは非ブロック受信制御部333のいずれかで行わせるかを、それぞれのコネクションの最新の受信時刻を元に判断するようになっている。図8のステップS456で、ブロック受信スレッド313に空きがない場合(N)、受信時刻の比較を行う(ステップS601)。受信時刻の比較には、ブロック受信コネクション管理テーブル342および非ブロック受信コネクション管理テーブル341の受信時刻が利用される。ここでは、受信可能データのある非ブロック受信制御部333に割り当てられたコネクションの受信時刻が、ブロック受信制御部334Aに割り当てられたいずれかのコネクションの受信時刻より新しいものであるかどうかで判断されることになる(ステップS602)。新しければ(Y)、ブロック受信制御部334Aに割り当てられたコネクションのうち、最も受信時刻の古いものと、割り当ての交換が行われ(ステップS603)、ステップS460の処理に進む。古ければ(ステップS602:N)、非ブロック受信制御部333に割り当てたままでその後の処理が行われる(ステップS458〜ステップS460)。   FIG. 8 shows the flow of processing of the event waiting control unit among the processing performed by the server program unit of the modification of the present invention. FIG. 8 corresponds to FIG. 4 of the embodiment, and the same parts as those in FIG. 4 are denoted by the same step numbers, and description thereof will be omitted as appropriate. In addition, the processes before step S454 are not shown. The event waiting control unit 332 of the embodiment is an event waiting control unit 332A in this modification. Further, the block reception control unit 334 of the embodiment is a block reception control unit 334A in this modification. This is because each of these is realized by a program that performs processing different from the embodiment. This will be described with reference to FIG. When there is receivable data, the event waiting control unit 332A determines whether the data reception is performed by the block reception control unit 334A or the non-block reception control unit 333 based on the latest reception time of each connection. It comes to judge. If there is no empty block reception thread 313 in step S456 of FIG. 8 (N), reception times are compared (step S601). The reception times of the block reception connection management table 342 and the non-block reception connection management table 341 are used for comparison of the reception times. Here, it is determined whether or not the reception time of the connection assigned to the non-block reception control unit 333 having receivable data is newer than the reception time of any one of the connections assigned to the block reception control unit 334A. (Step S602). If it is newer (Y), the connection exchanged with the connection with the oldest reception time among the connections allocated to the block reception control unit 334A is performed (step S603), and the process proceeds to step S460. If it is old (step S602: N), the subsequent processing is performed while being assigned to the non-block reception control unit 333 (steps S458 to S460).

図9は、変形例のサーバプログラム部の行う処理のうちブロック受信制御部の処理の流れを表わしたものである。この図9は実施例の図6に対応するものであり、図6と同一の部分は同一のステップ番号を付しており、適宜説明を省略する。図2と共に説明を行う。ブロック受信制御部334Aはデータ待ちを含むデータ受信処理を行っているときに(ステップS504)、タイムアウトしていなくても(ステップS505:N)、事象待ち制御部332Aにより非ブロック受信スレッド312に割り当ての変更を要求されると(ステップS610:Y)、参照を非ブロック受信コネクション管理テーブル342に参照を移し割り当てを変更する(ステップS506)。変更を要求されなければ(ステップS610:N)、そのままブロック受信方式でデータ受信が行われる。   FIG. 9 shows the flow of processing of the block reception control unit among the processing performed by the server program unit of the modification. FIG. 9 corresponds to FIG. 6 of the embodiment, and the same parts as those in FIG. 6 are denoted by the same step numbers, and description thereof will be omitted as appropriate. This will be described with reference to FIG. When the block reception control unit 334A is performing data reception processing including data waiting (step S504), even if the timeout has not occurred (step S505: N), the event waiting control unit 332A assigns it to the non-block reception thread 312. Is requested (step S610: Y), the reference is moved to the non-block reception connection management table 342 and the assignment is changed (step S506). If no change is requested (step S610: N), data reception is performed as it is using the block reception method.

この変形例のデータ処理サーバによれば、ブロック受信制御部334Aに割り当てられたコネクションがタイムアウトすることなく、頻繁に通信を行っている場合でも、非ブロック受信制御部333に割り当てられたコネクションのうち、より頻繁に通信を行っているものがあれば、割り当ての変更が可能である。しかし、本来、通信が頻繁でなく、たまたま連続でデータを受信した非ブロック受信制御部333に割り当てられたコネクションの場合も、割り当ての変更が行われることが考えられる。したがって、ブロック受信コネクション管理テーブル342および非ブロック受信コネクション管理テーブル341に過去1日、あるいは過去1時間といった期間の通信回数の情報を記録するようにしてもよい。この回数に応じて、受信制御の割り当てを行うことも可能である。   According to the data processing server of this modification, even if the connection assigned to the block reception control unit 334A does not time out and the communication is frequently performed, the connection assigned to the non-block reception control unit 333 If there is something that communicates more frequently, the assignment can be changed. However, it is conceivable that the assignment is also changed in the case of a connection assigned to the non-block reception control unit 333 that originally received data frequently and happens to be continuously transmitted. Therefore, information on the number of communications in a period such as the past day or the past hour may be recorded in the block reception connection management table 342 and the non-block reception connection management table 341. It is also possible to assign reception control according to this number of times.

本発明の一実施例によるデータ処理システムの構成の概要を表わした構成図である。It is a block diagram showing the outline | summary of the structure of the data processing system by one Example of this invention. データ処理システムを構成するサーバ上で動作するサーバプログラムで構成されるサーバプログラム部を表わした構成図である。It is a block diagram showing the server program part comprised by the server program which operate | moves on the server which comprises a data processing system. サーバプログラム部全体の処理の流れを表わした流れ図である。It is a flowchart showing the flow of processing of the whole server program part. サーバプログラム部の行う処理のうちの事象待ち制御部の処理の流れを表わした流れ図である。It is a flowchart showing the flow of the process of the event waiting control part among the processes which a server program part performs. 多重受信待ちの結果の例を表わした説明図である。It is explanatory drawing showing the example of the result of waiting for multiple reception. サーバプログラム部の行う処理のうちブロック受信制御部の処理の流れを表わした流れ図である。It is a flowchart showing the flow of the process of a block reception control part among the processes which a server program part performs. サーバプログラム部の行う処理のうち非ブロック受信制御部の処理の流れを表わした流れ図である。It is a flowchart showing the flow of the process of a non-block reception control part among the processes which a server program part performs. 本発明の変形例によるサーバプログラム部の行う処理のうちの事象待ち制御部の処理の流れを表わした流れ図である。It is a flowchart showing the flow of the process of the event waiting control part among the processes which the server program part by the modification of this invention performs. 本発明の変形例によるサーバプログラム部の行う処理のうちブロック受信制御部の処理の流れを表わした流れ図である。It is a flowchart showing the flow of the process of a block reception control part among the processes which the server program part by the modification of this invention performs. ネットワークサーバが複数のコネクションを1つのコンテキストで制御する様子を表わした説明図である。It is explanatory drawing showing a mode that a network server controls a some connection by one context. ネットワークサーバが複数のコネクションを複数のコンテキストで制御する様子を表わした説明図である。It is explanatory drawing showing a mode that a network server controls a some connection by a some context. ネットワークサーバが複数のコネクションを1つのコンテキストとセレクタにより非ブロック受信方式で制御する様子を表わした説明図である。It is explanatory drawing showing a mode that a network server controls a some connection by the non-block receiving system by one context and a selector.

符号の説明Explanation of symbols

200 データ処理システム
201 サーバ
203 クライアント
211 CPU
301 サーバプログラム部
311 事象待ちスレッド
312 非ブロック受信スレッド
313 ブロック受信スレッド
314 アプリケーションスレッド
321 ユーザオブジェクト
322 コネクションオブジェクト
330 通信制御アクセスライブラリ
331 実行スレッド制御部
332 事象待ち制御部
333 非ブロック受信制御
334 ブロック受信制御
335 ユーザプログラム部
341 非ブロック受信コネクション管理テーブル
342 ブロック受信コネクション管理テーブル
200 Data Processing System 201 Server 203 Client 211 CPU
301 server program unit 311 event waiting thread 312 non-block receiving thread 313 block receiving thread 314 application thread 321 user object 322 connection object 330 communication control access library 331 execution thread control unit 332 event waiting control unit 333 non-block receiving control 334 block receiving control 335 User program part 341 Non-block reception connection management table 342 Block reception connection management table

Claims (7)

通信ネットワークを介して1処理単位ずつのデータとしての単位データを順次受信する単位データ受信手段と、
この単位データ受信手段が受信した単位データの送信元を判別する送信元判別手段と、
前記送信元ごとに前記単位データの受信頻度を監視する受信頻度監視手段と、
前記単位データ受信手段が受信した単位データを一時格納するデータ格納手段と、
それぞれ所望の時間にわたって1つずつの送信元が専有する形で、同一送信元から間欠的にあるいは連続して送られてくる任意数の前記単位データの処理を、その送信元に対するデータ待ちが発生したときその送信元についてのデータが処理されるまで他の送信元に対する処理を行わないことで同一送信元からの単位データの受信頻度が高い場合にスループットの高い通信を可能にする1または複数の第1のデータ処理手段と、
前記単位データを1単位として各送信元が時分割で専有する形で、前記単位データを処理する1または複数の第2のデータ処理手段と、
前記単位データ受信手段が前記単位データを受信するたびに前記送信元判別手段の判別結果に応じて前記データ格納手段に格納された単位データを、前記単位データ受信手段の受信した単位データの受信頻度の高い送信元から順に前記第1のデータ処理手段に割り当てて受け渡す第1のデータ受け渡し手段と、
この第1のデータ受け渡し手段により前記第1のデータ処理手段に受け渡されず前記データ格納手段に格納されている単位データの有無を判別するデータ有無判別手段と、
このデータ有無判別手段の判別結果がデータ有りのとき、前記データ格納手段からこの単位データを前記第2のデータ処理手段に受け渡す第2のデータ受け渡し手段
とを具備することを特徴とするデータ処理装置。
Unit data receiving means for sequentially receiving unit data as data for each processing unit via a communication network;
Transmission source determination means for determining the transmission source of the unit data received by the unit data reception means;
Reception frequency monitoring means for monitoring the reception frequency of the unit data for each transmission source;
Data storage means for temporarily storing unit data received by the unit data receiving means;
Processing of an arbitrary number of unit data sent intermittently or continuously from the same transmission source in a form that one transmission source occupies for each desired time causes data waiting for that transmission source. One or a plurality of communications enabling high-throughput communication when the frequency of receiving unit data from the same transmission source is high by not performing processing for other transmission sources until the data for the transmission source is processed . First data processing means;
One or a plurality of second data processing means for processing the unit data in a form that each transmission source occupies in a time-sharing manner with the unit data as one unit;
Reception frequency of the received data unit of the transmission unit data stored in the data storage means according to the determination result of the original determination unit, said unit data receiving means each time the said unit data receiving means receives said unit data First data transfer means for assigning and transferring to the first data processing means in order from the highest transmission source;
Data presence / absence determining means for determining presence / absence of unit data stored in the data storage means without being delivered to the first data processing means by the first data delivery means;
A second data transfer means for transferring the unit data from the data storage means to the second data processing means when the determination result of the data presence / absence determination means is data. A data processing device.
前記第1のデータ処理手段および前記第2のデータ処理手段がそれぞれの処理を終了した単位データを受け取ってさらに別の処理を行う1または複数の第3のデータ処理手段を更に備えることを特徴とする請求項1記載のデータ処理装置。 The first data processing means and the second data processing means further include one or a plurality of third data processing means for receiving unit data for which the respective processing has been completed and performing further processing. The data processing apparatus according to claim 1 . 前記第1のデータ受け渡し手段は1または複数の前記第1のデータ処理手段のそれぞれに専有させる送信元を示す専有送信元テーブルを備え、前記データ受信手段が前記単位データを受信するたびに前記送信元判別手段の判別結果が示す送信元が、この専有送信元テーブルに含まれるかを検索し、含まれたときこの送信元に前記単位データを受け渡すことを特徴とする請求項1記載のデータ処理装置。 The first data transfer unit includes an exclusive transmission source table indicating a transmission source dedicated to each of the one or more first data processing units, and the transmission is performed each time the data reception unit receives the unit data. 2. The data according to claim 1, wherein a search is made as to whether or not a transmission source indicated by the determination result of the original determination means is included in the exclusive transmission source table, and when included, the unit data is transferred to the transmission source. Processing equipment. 前記送信元ごとに優先順位が付されており、前記第1のデータ受け渡し手段は、前記第1のデータ処理手段および前記第2のデータ処理手段のそれぞれの使用効率に応じて前記第1のデータ処理手段に受け渡す送信元を調整する受け渡し調整手段を具備することを特徴とする請求項1記載のデータ処理装置。 A priority is assigned to each of the transmission sources, and the first data transfer unit is configured to use the first data according to the usage efficiency of each of the first data processing unit and the second data processing unit. The data processing apparatus according to claim 1, further comprising a transfer adjustment unit that adjusts a transmission source to be transferred to the processing unit. 通信ネットワークを介してクライアントから1処理単位ずつのデータとしての単位データを順次受信する単位データ受信手段と、
この単位データ受信手段が受信した単位データのクライアントを判別するクライアント判別手段と、
このクライアント判別手段の判別したクライアントごとに前記単位データの受信頻度を監視する受信頻度監視手段と、
前記単位データ受信手段が受信した単位データを一時格納するデータ格納手段と、
それぞれ所望の時間にわたって1つずつのクライアントが専有する形で、同一クライアントから間欠的にあるいは連続して送られてくる任意数の前記単位データの処理を、そのクライアントに対するデータ待ちが発生したときそのクライアントについてのデータが処理されるまで他のクライアントに対する処理を行わないことで同一クライアントからの単位データの受信頻度が高い場合にスループットの高い通信を可能にする1または複数の第1のデータ処理手段と、
前記単位データを1単位として各クライアントが時分割で専有する形で、前記単位データを処理する1または複数の第2のデータ処理手段と、
前記単位データ受信手段が前記単位データを受信するたびに前記クライアント判別手段の判別結果に応じて前記データ格納手段に格納された単位データを、前記単位データ受信手段の受信した単位データの受信頻度の高いクライアントから順に前記第1のデータ処理手段に割り当てて受け渡す第1のデータ受け渡し手段と、
この第1のデータ受け渡し手段により前記第1のデータ処理手段に受け渡されず前記データ格納手段に格納されている単位データの有無を判別するデータ有無判別手段と、
このデータ有無判別手段の判別結果がデータ有りのとき、前記データ格納手段からこの単位データを前記第2のデータ処理手段に受け渡す第2のデータ受け渡し手段
とを具備することを特徴とするデータ処理サーバ
Unit data receiving means for sequentially receiving unit data as data for each processing unit from a client via a communication network;
Client determination means for determining a client of unit data received by the unit data receiving means;
A reception frequency monitoring means for monitoring the reception frequency of the unit data for each client determined by the client determination means;
Data storage means for temporarily storing unit data received by the unit data receiving means;
When each client waits for data to be processed, any number of the unit data sent intermittently or continuously from the same client in a form that each client occupies for a desired time. One or a plurality of first data processing means for enabling high-throughput communication when the frequency of receiving unit data from the same client is high by not performing processing for other clients until data about the client is processed When,
One or a plurality of second data processing means for processing the unit data in a form that each client occupies in a time-sharing manner with the unit data as one unit;
Each time the unit data receiving unit receives the unit data, the unit data stored in the data storage unit according to the determination result of the client determining unit is changed to the reception frequency of the unit data received by the unit data receiving unit. First data transfer means for assigning and transferring to the first data processing means in order from the highest client;
Data presence / absence determining means for determining presence / absence of unit data stored in the data storage means without being delivered to the first data processing means by the first data delivery means;
Second data transfer means for transferring the unit data from the data storage means to the second data processing means when the determination result of the data presence / absence determination means is data present
And a data processing server .
通信ネットワークと、
請求項1記載のデータ処理装置と、
前記通信ネットワークを介してこのデータ処理装置にデータを送信するデータ送信手段を備えた1または複数のデータ処理要求装置
とを具備することを特徴とするデータ処理システム
A communication network;
A data processing device according to claim 1;
One or more data processing requesting devices provided with data transmitting means for transmitting data to the data processing device via the communication network
And a data processing system .
コンピュータに、
通信ネットワークを介して1処理単位ずつのデータとしての単位データを順次受信する単位データ受信処理と、
この単位データ受信処理で受信した単位データの送信元を判別する送信元判別処理と、
前記送信元ごとに前記単位データの受信頻度を監視する受信頻度監視処理と、
前記単位データ受信処理で受信した単位データを一時格納するデータ格納処理と、
それぞれ所望の時間にわたって1つずつの送信元が専有する形で、同一送信元から間欠的にあるいは連続して送られてくる任意数の前記単位データの処理を、その送信元に対するデータ待ちが発生したときその送信元についてのデータが処理されるまで他の送信元に対する処理を行わないことで同一送信元からの単位データの受信頻度が高い場合にスループットの高い通信を可能にする1または複数の第1のデータ処理と、
前記単位データを1単位として各送信元が時分割で専有する形で、前記単位データを処理する1または複数の第2のデータ処理と、
前記単位データ受信処理で前記単位データを受信するたびに前記送信元判別処理の判別結果に応じて前記データ格納処理で格納された単位データを、前記単位データ受信処理で受信した単位データの受信頻度の高い送信元から順に前記第1のデータ処理に割り当てて受け渡す第1のデータ受け渡し処理と、
この第1のデータ受け渡し処理により前記第1のデータ処理に受け渡されず前記データ格納処理で格納されたままの単位データの有無を判別するデータ有無判別処理と、
このデータ有無判別処理の判別結果がデータ有りのとき、前記データ格納処理で格納した単位データを前記第2のデータ処理に受け渡す第2のデータ受け渡し処理
とを実行させることを特徴とするデータ処理プログラム
On the computer,
Unit data reception processing for sequentially receiving unit data as data for each processing unit via a communication network;
A transmission source determination process for determining the transmission source of the unit data received in the unit data reception process;
A reception frequency monitoring process for monitoring the reception frequency of the unit data for each transmission source;
A data storage process for temporarily storing the unit data received in the unit data reception process;
Processing of an arbitrary number of unit data sent intermittently or continuously from the same transmission source in a form that one transmission source occupies for each desired time causes data waiting for that transmission source. One or a plurality of communications enabling high-throughput communication when the frequency of receiving unit data from the same transmission source is high by not performing processing for other transmission sources until the data for the transmission source is processed. First data processing;
One or a plurality of second data processing for processing the unit data in such a manner that each transmission source occupies the unit data as a unit in a time division manner;
The reception frequency of the unit data received in the unit data reception process, the unit data stored in the data storage process according to the determination result of the transmission source determination process every time the unit data is received in the unit data reception process A first data transfer process that assigns and transfers to the first data process in order from the highest transmission source;
A data presence / absence determination process for determining the presence / absence of unit data that is not transferred to the first data process and stored in the data storage process by the first data transfer process;
A second data transfer process for transferring the unit data stored in the data storage process to the second data process when the determination result of the data presence / absence determination process is data present
And a data processing program .
JP2005100026A 2005-03-30 2005-03-30 Data processing apparatus, data processing server, data processing system, and data processing program Expired - Fee Related JP4265559B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005100026A JP4265559B2 (en) 2005-03-30 2005-03-30 Data processing apparatus, data processing server, data processing system, and data processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005100026A JP4265559B2 (en) 2005-03-30 2005-03-30 Data processing apparatus, data processing server, data processing system, and data processing program

Publications (2)

Publication Number Publication Date
JP2006277675A JP2006277675A (en) 2006-10-12
JP4265559B2 true JP4265559B2 (en) 2009-05-20

Family

ID=37212328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005100026A Expired - Fee Related JP4265559B2 (en) 2005-03-30 2005-03-30 Data processing apparatus, data processing server, data processing system, and data processing program

Country Status (1)

Country Link
JP (1) JP4265559B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008186388A (en) * 2007-01-31 2008-08-14 Mitsubishi Electric Corp Interprocessor communication control device
JP5614138B2 (en) * 2010-07-08 2014-10-29 富士通株式会社 Processor control program and control method thereof
JP6977650B2 (en) 2018-03-30 2021-12-08 富士通株式会社 Anomaly detection method, anomaly detection program, and anomaly detection device

Also Published As

Publication number Publication date
JP2006277675A (en) 2006-10-12

Similar Documents

Publication Publication Date Title
JP3382953B2 (en) Client management flow control method and apparatus on finite memory computer system
US8826284B1 (en) Scalable task scheduling
CN101211277B (en) Method of selecting one of execution schedules of guest OS and virtual machine monitor employing the method
CA2372092C (en) A queuing model for a plurality of servers
JP4144897B2 (en) Optimal server in common work queue environment
EP2551770B1 (en) Data share system, data process apparatus, and computer-readable recording medium
WO2019144965A1 (en) Mirror pull method and system therefor
CN101242392A (en) Method, device and system for processing series service message
JP2011065645A (en) Multi-core processor system
US20220318071A1 (en) Load balancing method and related device
JP4265559B2 (en) Data processing apparatus, data processing server, data processing system, and data processing program
WO2005116832A1 (en) Computer system, method, and program for controlling execution of job in distributed processing environment
CN112104679B (en) Method, apparatus, device and medium for processing hypertext transfer protocol request
CN111770026B (en) Network flow control method and device
US20150127799A1 (en) Hierarchical distribution of control information in a massively scalable network server
CN115576684A (en) Task processing method and device, electronic equipment and storage medium
JP4620097B2 (en) Virtual computer system and schedule adjustment method in the same system
JP2005309519A (en) Telegram relay program and device
US10877800B2 (en) Method, apparatus and computer-readable medium for application scheduling
JP2002342193A (en) Method, device and program for selecting data transfer destination server and storage medium with data transfer destination server selection program stored therein
JP4336763B2 (en) Job management system
JP2017033234A (en) Request reception system, request reception method and program
JP2015153330A (en) Virtual machine arrangement system and method
JP5488029B2 (en) Distributed processing system, distributed processing method, and program
JPH1196108A (en) Computer system and bus control device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080902

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081104

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4265559

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120227

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130227

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130227

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140227

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees