JP4623810B2 - Data distribution method - Google Patents

Data distribution method Download PDF

Info

Publication number
JP4623810B2
JP4623810B2 JP2000306270A JP2000306270A JP4623810B2 JP 4623810 B2 JP4623810 B2 JP 4623810B2 JP 2000306270 A JP2000306270 A JP 2000306270A JP 2000306270 A JP2000306270 A JP 2000306270A JP 4623810 B2 JP4623810 B2 JP 4623810B2
Authority
JP
Japan
Prior art keywords
client
block
data
blocks
distribution
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
JP2000306270A
Other languages
Japanese (ja)
Other versions
JP2002116932A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2000306270A priority Critical patent/JP4623810B2/en
Publication of JP2002116932A publication Critical patent/JP2002116932A/en
Application granted granted Critical
Publication of JP4623810B2 publication Critical patent/JP4623810B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、ネットワークを利用したデータの配信技術に関する。
【0002】
【従来の技術】
LANを構成するクライアント/サーバシステムなどにおいて、ネットワークを利用してデータを配信する場合は、先ず、データを受けようとするクライアントがネットワークを介してサーバに接続し、データの配信を要求する。これに対し、サーバは、要求に合うデータをデータベースから個別に読み出し、配信していた。また、サーバにおいて、通常は、データベースから読み出したデータを一旦溜め込むキャッシュまたはバッファの大きさは、配信するデータベースのサイズより小さいので、データベースからの読み出しと送信を何度か繰り返して、1つのデータ配信を完了する。
【0003】
【発明が解決しようとする課題】
多数のクライアントからデータ配信の要求が集中すると、サーバ側ではデータベースアクセスの負荷が増大する。このとき、第2のクライアントが要求するデータがたまたまキャッシュ上に存在すれば、直ちにそのデータを配信することができる。しかし、キャッシュの大きさをそれほど大きく取れないことや、多数のクライアントから時間的にばらばらに要求がくることなどにより、どうしてもデータベースアクセスが頻繁に発生する。そして、その結果、同時期にデータ配信を要求するクライアントの数にほぼ比例して、それぞれのクライアントに対するデータ配信の時間が長くなってしまう。これは同じデータベースに対して複数のクライアントから配信要求を受けた場合にも起こる問題である。
【0004】
図3(a)に、同じデータベースに対して3つのクライアントから次々に配信要求が来た場合のタイミングチャートを示す。C1からC3はクライアントを表し、「A」は配信要求の到着、「R」はデータベースアクセス、即ちデータベースからの読み出しを表す。そして、「D1」から「D4」が、その時点でバッファ上に分割して読み出されたデータブロックを表している。これはまた、それぞれのクライアントにとっては、配信されるデータブロックを表している。尚、ここでは、読み出しバッファが1つだけの最も単純な構成を想定し、為にデータベースは4回に分けて読み出される場合を例にする。
【0005】
図から分るように、クライアントC1から配信要求が来ると、サーバはデータベースからデータブロックD1、D2、D3と読み出して、順にC1に向けて配信する。D3の配信中にクライアントC2から配信要求が来たので、クライアントC1に対するD4の配信の前に、クライアントC2に対するD1のデータベースアクセスが発生する。このとき、キャッシュ上にはD3があるが、利用されることはない。この結果、クライアントC1に対するD4の配信は待たされるので、それだけクライアントC1に対する配信時間は長くかかる。
【0006】
さらに、クライアントC2への配信が終わらないうちに、クライアントC3からの配信要求が来たので、クライアントC2に対するD3の配信の前に、クライアントC3に対するD1のデータベースアクセスが発生する。このとき、キャッシュ上にD2があっても、やはり利用されることはない。以降は、クライアントC2とC3それぞれに対するデータベースアクセスが交互に発生してしまい、両クライアント共にデータの配信時間が長くなってしまう。図中の両矢印T1、T2、T3が、クライアントそれぞれの配信時間を示している。
【0007】
【課題を解決するための手段】
本発明は、データベースを備えたサーバから、ネットワークを介してそのデータベースを利用する複数のクライアントにデータを配信する方法であって、サーバは、クライアントから要求されたデータを複数のブロックに分割するとともにクライアントが順番通りにデータブロックを受け取れなかった場合でも再び元のファイルに構成できるようにするための再構成情報をデータブロックに付加し、先頭ブロックから順にデータベースからバッファに読み出して、バッファ上のデータブロックをクライアントに送信するものであり、その際、データをいくつのブロックに分割できるかを計算して最終ブロックが何番目か記憶し、クライアントに送信中のブロックが何番目か、及びクライアントに配信開始したブロックが何番目かクライアント毎に記憶し、第1のクライアントに配信している途中で第2のクライアントから同じデータについての配信要求が来た場合は、そのとき第1のクライアントに送信しているバッファ上のデータブロックから第2のクライアントに配信を開始し、その後、第1と第2のクライアントに並行して配信し、配信し終えたブロックが配信開始したブロックの1つ前のブロックか否かをクライアント毎に判定し、1つ前のブロックに至ったらそのクライアントを配信対象から除外するようにし、第1のクライアントに全ブロックを送信し終えたとき、第2のクライアントにすべてのブロックを送信していない場合は、再び先頭のブロックから順にデータベースから読み出して、残りのブロックを第2のクライアントに送信することで、上記課題を解決するものである。
【0008】
【実施例】
図1は、実施例のクライアント/サーバシステムの構成を示し、サーバからクライアントに向けてデータ配信するように、あらかじめプログラムされたコンピュータによってそれぞれ構成されている。10はデータを配信する側のサーバであり、その内部にハードディスク等で構成したデータベース11と、データベース読み出しの際にキャッシュとしても作用するバッファ14と、クライアントからの要求を受けてデータを配信するファイル転送制御手段13と、ヘッダ付加手段12と、相手を指定してバッファ14のデータを通信回線に送り出す送信手段15とを有する。一方、20はデータ配信を要求する側のクライアントであり、受信手段21と、再構成手段22と、ハードディスク等の記憶手段23とを有する。そして、30は通信回線である。尚、これは有線でも無線でも、また、LAN、WAN、インターネットなど、どのような構成でもよい。
【0009】
サーバ10は、クライアント20からデータベース11のデータ即ちファイルの配信要求を受けると、ファイル転送制御手段13が先ず、当該ファイルのサイズと読み出しバッファ14のサイズとから、いくつのデータブロックに分割して配信するか計算する。そして、ファイル全体の何番目のブロックかを示す情報を、ヘッダ付加手段12によってそのデータブロックに付加する。これは、クライアント20が順番通りにデータブロックを受け取れなかった場合でも、再び元のファイルに構成できるようにするための再構成情報である。そして、送信手段15が、どのクライアントに送るかの宛先情報をそのデータブロックに付加して、通信回線30に送り出す。尚、送信手段15は、ハードウェアが備える複数の通信ポートにそれぞれ対応させて、複数のクライアントに並行してバッファ14のデータを送ることができるようになっている。
【0010】
一方、クライアント20では、受信手段21が自クライアント宛てのデータを受信し、記憶手段23に記憶していく。そして、再構成手段22は、受信したデータブロックのヘッダに含まれる再構成情報を参照し、元の順番通りにデータブロックを並べ替えるようにしている。こうして、元の順番通りに送られてこなかったデータブロックがあっても、再構成情報によって正しく元のファイルに戻すことができるものである。
【0011】
サーバ10は、複数のクライアントから相前後して配信要求を受けたとき、第2のクライアントが要求するファイルのデータブロックのどれかが、キャッシュ即ちバッファ14上に既に読み出されて在るときは、それがファイルの先頭のデータブロックか否かに関係なく、第2のクライアントに配信し始めるようにしている。その為に、ファイル転送制御手段13は、転送要求されたファイルがいくつのデータブロックに分けられるかを計算し、最終ブロックが何番目か、また、現在送信中のブロックが何番目か、そして、配信対象になっているクライアントそれぞれに配信開始したブロックが何番目であったか、を記憶する。その記憶内容の変化を、時刻を追って表にしたものを図4に示す。図では、配信開始ブロックをクライアントC1からC3について記憶しているが、配信対象となったクライアントに合わせてその都度、記憶場所を確保するようにしている。また、同じデータベースに対して、3つのクライアントから次々に配信要求が来た場合の実施例のタイミングチャートを、図3(b)に示す。尚、図4は図3(b)に対応している。
【0012】
次に、実施例の動作を説明する。サーバ10は、クライアントC1からファイルの配信要求を受け取ると、先ず、何ブロックに分けて送るかを計算し、最終ブロックと、C1に対する配信開始ブロックを決定して記憶する。そして、先頭データブロックD1をデータベース11から読み出してC1に向けて送信する。従って、この時点では、図4からも分るように、配信開始ブロックと処理中ブロックは共にD1であり、最終ブロックはD4である。その後、当該ブロックの送信が終わった時刻t1において、ファイル転送制御手段13は、次に何番目のデータブロックを処理するか決定する。その手順を図2に示す。
【0013】
ファイル転送制御手段13は、先ず、配信し終えたデータブロックがそのファイルの最終ブロックか否かを判定する(ステップS1)。今回は最終ブロックではないので、次に、配信し終えたデータブロックが配信開始ブロックの1つ前のブロックか判定する(S6)。もしそうであれば、ぐるっと一回りして当該ファイルの全ブロックを送信したことになるので、そのクライアントを配信対象から外すのであるが、今回は、配信開始ブロックも処理中ブロックもD1なので、クライアントC1を対象から外すことはしない。そこで、次のブロック、即ちD2を処理中ブロックに設定する(S9)。この結果、データベース11からはデータブロックD2がバッファ14に読み出されて送信される。
【0014】
続いて、ブロックD2の送信が終わった時刻t2においても、D2は最終ブロックではなく(S1;No)、配信開始ブロックD1の1つ前でもないので(S6;No)、クライアントC1を対象から外すことなく、単に処理中ブロックをD3に進める(S9)だけとなる。そして、このD3の配信中に、クライアントC2からファイルの配信要求が来ている。ファイル転送制御手段13は、先にC1が要求した同じファイルに対する配信要求であることを認識するので、現在、処理中ブロックに設定されているデータブロックD3を、クライアントC2にも配信するようにする。即ち、クライアントC2も配信対象とし、その配信開始ブロックD3を記憶しておいて、送信手段15からはクライアントC1とC2に並行して、バッファ14のデータブロックD3を配信する。
【0015】
次に、ブロックD3の送信が終わった時刻t3において、配信し終えたデータブロックがそのファイルの最終ブロックか否かを判定する(S1)が、今回もD3は最終ブロックではない。そこで、配信対象のすべてのクライアントについて、ステップS6のチェックを繰り返す。先ず、クライアントC1について、処理中ブロックが配信開始ブロックの1つ前か判定する。これは否であるので、クライアントC1は配信対象のままである。さらに、クライアントC2についても判定するが、配信開始ブロックがD3なので、クライアントC2も配信対象のままとし、最後に処理中ブロックをD4に設定する(S9)。この結果、データブロックD4がデータベース11から読み出されて、クライアントC1とC2に並行して配信される。
【0016】
そして、ブロックD4の送信が終わった時刻t4においては、配信し終えたデータブロックがそのファイルの最終ブロックであると判定される。そこで、配信対象のすべてのクライアントについて、ステップS2のチェックを繰り返す。先ず、クライアントC1について、配信開始がファイルの先頭ブロック、即ちD1であったか判定する。図4にあるようにクライアントC1の配信開始ブロックはD1なので、ブロックを一巡してすべて配信したことになる。そこでクライアントC1を配信対象から外しておく(S3)。次に、クライアントC2について判定すると、こちらは配信開始ブロックがD3なので、配信対象からは外さない。最後に、処理対象のブロックを先頭ブロックD1に設定する(S5)。つまり、最終ブロックの次は先頭ブロックに戻すことで、一連のデータブロックを循環して、読み出しと送信を繰り返すのである。こうして、データベース11からはデータブロックD1がバッファ14に読み出されて、クライアントC2に送信されることになる。
【0017】
さらに、時刻t5では、ステップS1からS6に進むが、クライアントC2への配信は完了していない(S6;No)ので配信対象のままとし、処理中ブロックをD2に進めて(S9)配信する。
【0018】
ここで、図3(b)に示すように、このD2のC2への配信中に、クライアントC3からファイルの配信要求が来ると、ファイル転送制御手段13は、現在、処理中ブロックに設定されているデータブロックD2を、クライアントC3にも配信する。即ち、クライアントC3を配信対象とし、その配信開始ブロックD2を記憶しておいて、送信手段15からはクライアントC2とC3に向けて、バッファ14のデータブロックD2を配信するのである。尚、このように、第2のクライアントへの送信が第1のそれより遅れて始まることもあるので、時刻tnから時刻t(n+1)までの時間は、多少伸び縮みするものである。
【0019】
そして、時刻t6に至って、ステップS6で、処理中ブロックD2がクライアントC2の配信開始ブロックの1つ前に一致し、同クライアントは配信対象から除外される(S7)。即ち、この時点でクライアントC2への配信は完了する。
一方、クライアントC3については、ステップS6の判定が成立しないので配信対象のままとなり、処理中ブロックは次のD3に設定される(S9)。
【0020】
こうしてデータブロックD3がクライアントC3に送信され、さらにD4が送信された時刻t8では、ステップS1からS2に進むが、クライアントC3の配信開始ブロックはD1ではないので、そのまま配信対象となり、処理中ブロックがD1に設定される(S5)。そして、そのD1を送信し終えた時刻t9において、処理中ブロックがクライアントC3の配信開始ブロックの1つ前に一致し(S6;Yes)、同クライアントは配信対象から外されて配信が完了する。この結果、配信対象のクライアントがなくなって、すべての配信処理が終了する。
【0021】
一方、クライアント20の側では、受信するデータブロックは必ずしも順番通りではないので、データブロックのヘッダにある再構成情報により、再構成手段22が正しく並べ替えてもとのファイルを再構成する。しかし、これは単純な作業であり、負荷とはならない。
【0022】
このように、実施例では、データベース11から読み出したデータブロックがファイルの先頭ブロックでなくても、サーバ10はかまわずそれを要求したクライアント22に配信する。そのため、バッファ14のデータを有効に利用することができ、且つ、データベースアクセスが減って配信時間を大幅に短縮している。図3からも分るように、例えば、クライアントC2やC3に対する配信時間T2およびT3は、同図(a)に示した従来の方法に比べて、明らかに短くなっている。しかも、実施例では、クライアントC1乃至C3いずれの場合も、単独で配信したときの理想的な配信時間に遜色ない時間で、配信が完了している。これは、つまり、配信要求を出すタイミングに依存しないで、いつでも、どのクライアントにも、平均したほぼ理想に近い配信サービスができることを示している。
【0023】
【発明の効果】
本発明によれば、データベースから読み出したバッファのデータを、有効に利用して同時に複数のクライアントに配信するので、データベースアクセスを大幅に減らすことができる。そして、ファイルを分割してそのデータブロックを途中からでも循環式に転送するようにし、受信したクライアント側で再構成するようにしたので、それぞれのクライアントに対する配信時間をほぼ理想的な時間に収めることができ、個々のクライアントに高水準の平均した配信サービスが可能になる。
【図面の簡単な説明】
【図1】実施例の構成を示すブロック図である。
【図2】実施例の動作を示すフローチャートである。
【図3】従来技術および実施例におけるタイミングチャートである。
【図4】実施例におけるサーバの記憶内容の変化を示す図である。
【符号の説明】
10 サーバ 11 データベース 12 ヘッダ付加手段 13 ファイル転送制御手段 14 バッファ 15 送信手段
20 クライアント 21 受信手段 22 再構成手段 23 記憶手段
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data distribution technique using a network.
[0002]
[Prior art]
When distributing data using a network in a client / server system or the like constituting a LAN, a client who wants to receive data first connects to the server via the network and requests data distribution. On the other hand, the server individually reads data that meets the request from the database and distributes it. Also, in the server, the size of the cache or buffer that temporarily stores the data read from the database is usually smaller than the size of the database to be distributed. Therefore, one data distribution is performed by repeatedly reading and transmitting from the database. To complete.
[0003]
[Problems to be solved by the invention]
When requests for data distribution from a large number of clients are concentrated, the load of database access increases on the server side. At this time, if the data requested by the second client happens to be in the cache, the data can be immediately delivered. However, database access frequently occurs due to the fact that the size of the cache cannot be made so large and requests from many clients are scattered over time. As a result, the time for data distribution to each client becomes longer in proportion to the number of clients that request data distribution at the same time. This is a problem that occurs even when a distribution request is received from a plurality of clients for the same database.
[0004]
FIG. 3A shows a timing chart in the case where distribution requests are successively received from three clients for the same database. C1 to C3 represent clients, “A” represents arrival of a distribution request, and “R” represents database access, that is, reading from a database. “D1” to “D4” represent the data blocks that are divided and read on the buffer at that time. This also represents the data block to be delivered to each client. Here, the simplest configuration with only one read buffer is assumed, and for this reason, the database is read in four steps as an example.
[0005]
As can be seen from the figure, when a distribution request is received from the client C1, the server reads data blocks D1, D2, and D3 from the database, and sequentially distributes them toward C1. Since a distribution request is received from the client C2 during the distribution of D3, the D1 database access to the client C2 occurs before the distribution of D4 to the client C1. At this time, there is D3 on the cache, but it is not used. As a result, since the delivery of D4 to the client C1 is awaited, the delivery time to the client C1 takes much longer.
[0006]
Further, since the delivery request from the client C3 comes before the delivery to the client C2 is finished, the D1 database access to the client C3 occurs before the delivery of D3 to the client C2. At this time, even if D2 is on the cache, it is never used. Thereafter, database accesses to the clients C2 and C3 occur alternately, and the data distribution time becomes longer for both clients. Double arrows T1, T2, and T3 in the figure indicate the delivery time of each client.
[0007]
[Means for Solving the Problems]
The present invention is a method for distributing data from a server having a database to a plurality of clients using the database via a network, wherein the server divides the data requested by the client into a plurality of blocks. Even if the client cannot receive the data blocks in order, reconfiguration information is added to the data block so that it can be reconstructed into the original file, and the data in the buffer is read from the database in order from the first block to the buffer. Sends a block to the client, calculates how many blocks the data can be divided into, stores the last block number, distributes the block to the client, and distributes it to the client What number the block started is the client And when the second client receives a distribution request for the same data during distribution to the first client, the data block on the buffer transmitted to the first client at that time Distribution to the second client, and then the distribution to the first and second clients in parallel, and it is determined for each client whether the block that has been distributed is the block immediately before the block that started distribution. When the previous block is reached, the client is excluded from the distribution target, and when all blocks are transmitted to the first client, when not all blocks are transmitted to the second client, The above problem is solved by reading from the database again in order from the first block and transmitting the remaining blocks to the second client. It is intended.
[0008]
【Example】
FIG. 1 shows a configuration of a client / server system according to an embodiment, which is configured by a computer programmed in advance so as to distribute data from a server to a client. Reference numeral 10 denotes a server that distributes data, and a database 11 that is configured with a hard disk or the like inside the server, a buffer 14 that also functions as a cache when reading the database, and a file that distributes data in response to a request from the client It has transfer control means 13, header addition means 12, and transmission means 15 for designating the other party and sending the data in the buffer 14 to the communication line. On the other hand, reference numeral 20 denotes a client that requests data distribution, and includes a receiving unit 21, a reconstruction unit 22, and a storage unit 23 such as a hard disk. Reference numeral 30 denotes a communication line. Note that this may be wired or wireless, and may have any configuration such as a LAN, WAN, or the Internet.
[0009]
When the server 10 receives a request for distributing data in the database 11, that is, a file, from the client 20, the file transfer control means 13 first divides the data into several data blocks based on the size of the file and the size of the read buffer 14. Do or calculate. Then, information indicating the block number of the entire file is added to the data block by the header adding means 12. This is reconfiguration information for allowing the client 20 to reconfigure the original file even when the data blocks cannot be received in order. Then, the transmission means 15 adds destination information indicating which client is sent to the data block and sends it to the communication line 30. The transmission means 15 can send data in the buffer 14 in parallel to a plurality of clients in correspondence with a plurality of communication ports provided in the hardware.
[0010]
On the other hand, in the client 20, the receiving unit 21 receives the data addressed to the client and stores it in the storage unit 23. The reconstruction unit 22 refers to the reconstruction information included in the header of the received data block, and rearranges the data blocks in the original order. Thus, even if there is a data block that has not been sent in the original order, it can be correctly restored to the original file by the reconstruction information.
[0011]
When the server 10 receives a delivery request from a plurality of clients in succession, when any of the data blocks of the file requested by the second client has already been read out on the cache or buffer 14. Regardless of whether or not it is the first data block of the file, delivery to the second client is started. For this purpose, the file transfer control means 13 calculates how many data blocks the file requested to be transferred is divided into, what number is the last block, what is the block currently being transmitted, and It stores the number of blocks that started distribution to each of the clients that are to be distributed. FIG. 4 shows the change of the stored contents as a table with time. In the figure, the distribution start block is stored for the clients C1 to C3. However, a storage location is secured each time according to the client to be distributed. In addition, FIG. 3B shows a timing chart of the embodiment when distribution requests are successively received from three clients for the same database. FIG. 4 corresponds to FIG.
[0012]
Next, the operation of the embodiment will be described. When the server 10 receives a file distribution request from the client C1, the server 10 first calculates the number of blocks to be sent and determines and stores the final block and the distribution start block for C1. Then, the head data block D1 is read from the database 11 and transmitted toward C1. Therefore, at this point, as can be seen from FIG. 4, both the distribution start block and the processing block are D1, and the final block is D4. Thereafter, at time t1 when the transmission of the block ends, the file transfer control means 13 determines the next data block to be processed. The procedure is shown in FIG.
[0013]
The file transfer control means 13 first determines whether or not the data block that has been distributed is the last block of the file (step S1). Since this time it is not the last block, it is next determined whether the data block that has been delivered is the block immediately before the delivery start block (S6). If so, it means that all the blocks of the file have been transmitted in a round and the client is excluded from the distribution target. However, this time, since both the distribution start block and the processing block are D1, the client C1 is not excluded from the target. Therefore, the next block, that is, D2 is set as a processing block (S9). As a result, the data block D2 is read from the database 11 to the buffer 14 and transmitted.
[0014]
Subsequently, even at the time t2 when the transmission of the block D2 ends, the D2 is not the last block (S1; No) and is not one before the distribution start block D1 (S6; No), so the client C1 is excluded from the target. Instead, the processing block is simply advanced to D3 (S9). During the delivery of D3, a file delivery request is received from the client C2. Since the file transfer control means 13 recognizes that it is a distribution request for the same file requested by C1, the data block D3 currently set in the processing block is also distributed to the client C2. . That is, the client C2 is also targeted for distribution, the distribution start block D3 is stored, and the transmission unit 15 distributes the data block D3 in the buffer 14 in parallel with the clients C1 and C2.
[0015]
Next, at time t3 when the transmission of the block D3 ends, it is determined whether or not the data block that has been distributed is the final block of the file (S1). D3 is not the final block this time as well. Therefore, the check in step S6 is repeated for all clients to be distributed. First, for the client C1, it is determined whether the block being processed is one block before the distribution start block. Since this is not possible, the client C1 remains to be distributed. Further, although the client C2 is also determined, since the distribution start block is D3, the client C2 remains to be distributed, and finally the processing block is set to D4 (S9). As a result, the data block D4 is read from the database 11 and distributed in parallel to the clients C1 and C2.
[0016]
Then, at time t4 when transmission of the block D4 ends, it is determined that the data block that has been distributed is the last block of the file. Therefore, the check in step S2 is repeated for all clients to be distributed. First, for the client C1, it is determined whether the distribution start is the first block of the file, that is, D1. As shown in FIG. 4, since the distribution start block of the client C1 is D1, it means that all of the blocks have been distributed. Therefore, the client C1 is excluded from the distribution target (S3). Next, when the client C2 is determined, since the distribution start block is D3, it is not excluded from the distribution target. Finally, the block to be processed is set as the first block D1 (S5). That is, by returning to the first block after the last block, a series of data blocks are circulated, and reading and transmission are repeated. Thus, the data block D1 is read from the database 11 to the buffer 14 and transmitted to the client C2.
[0017]
Further, at time t5, the process proceeds from step S1 to S6. However, since the distribution to the client C2 is not completed (S6; No), the distribution target remains as it is, and the processing block is advanced to D2 (S9).
[0018]
Here, as shown in FIG. 3B, when a file distribution request is received from the client C3 during the distribution of the D2 to the C2, the file transfer control means 13 is currently set to the processing block. The existing data block D2 is also distributed to the client C3. That is, the client C3 is targeted for distribution, the distribution start block D2 is stored, and the data block D2 of the buffer 14 is distributed from the transmission means 15 to the clients C2 and C3. In this way, since transmission to the second client may start later than the first, the time from time tn to time t (n + 1) slightly expands and contracts.
[0019]
Then, at time t6, in step S6, the processing block D2 coincides with the one before the distribution start block of the client C2, and the client is excluded from the distribution target (S7). That is, distribution to the client C2 is completed at this point.
On the other hand, since the determination in step S6 is not established for the client C3, the client C3 remains to be distributed, and the processing block is set to the next D3 (S9).
[0020]
In this way, at time t8 when the data block D3 is transmitted to the client C3 and further D4 is transmitted, the process proceeds from step S1 to S2. However, since the distribution start block of the client C3 is not D1, it becomes a distribution target as it is, and the processing block is D1 is set (S5). Then, at the time t9 when the transmission of D1 is completed, the block being processed coincides with the one before the delivery start block of the client C3 (S6; Yes), the client is excluded from the delivery target, and the delivery is completed. As a result, there are no clients to be distributed, and all distribution processes are completed.
[0021]
On the other hand, on the client 20 side, the received data blocks are not necessarily in order, so that the original file is reconstructed even if the restructuring means 22 rearranges correctly based on the reconfiguration information in the header of the data block. However, this is a simple task and not a load.
[0022]
As described above, in the embodiment, even if the data block read from the database 11 is not the head block of the file, the server 10 does not mind to deliver it to the client 22 that requested it. Therefore, the data in the buffer 14 can be used effectively, and the database access is reduced and the delivery time is greatly shortened. As can be seen from FIG. 3, for example, the delivery times T2 and T3 for the clients C2 and C3 are clearly shorter than the conventional method shown in FIG. In addition, in the embodiment, in any of the clients C1 to C3, the delivery is completed in a time comparable to the ideal delivery time when delivered alone. In other words, this means that any client can provide a distribution service that is almost ideal on average at any time without depending on the timing of issuing a distribution request.
[0023]
【The invention's effect】
According to the present invention, since the buffer data read from the database is effectively used and distributed to a plurality of clients at the same time, database access can be greatly reduced. Since the file is divided and the data block is transferred cyclically even from the middle, and it is reconstructed on the receiving client side, the delivery time for each client can be kept in an ideal time. This enables a high level average distribution service to individual clients.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an embodiment.
FIG. 2 is a flowchart showing the operation of the embodiment.
FIG. 3 is a timing chart in the prior art and examples.
FIG. 4 is a diagram illustrating a change in stored contents of the server in the embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 Server 11 Database 12 Header addition means 13 File transfer control means 14 Buffer 15 Transmission means 20 Client 21 Reception means 22 Reconfiguration means 23 Storage means

Claims (3)

データベースを備えたサーバから、ネットワークを介してそのデータベースを利用する複数のクライアントにデータを配信する方法であって、
サーバは、クライアントから要求されたデータを複数のブロックに分割するとともにクライアントが順番通りにデータブロックを受け取れなかった場合でも再び元のファイルに構成できるようにするための再構成情報をデータブロックに付加し、先頭ブロックから順にデータベースからバッファに読み出して、バッファ上のデータブロックをクライアントに送信するものであり、その際、データをいくつのブロックに分割できるかを計算して最終ブロックが何番目か記憶し、クライアントに送信中のブロックが何番目か、及びクライアントに配信開始したブロックが何番目かクライアント毎に記憶し、第1のクライアントに配信している途中で第2のクライアントから同じデータについての配信要求が来た場合は、そのとき第1のクライアントに送信しているバッファ上のデータブロックから第2のクライアントに配信を開始し、その後、第1と第2のクライアントに並行して配信し、配信し終えたブロックが配信開始したブロックの1つ前のブロックか否かをクライアント毎に判定し、1つ前のブロックに至ったらそのクライアントを配信対象から除外するようにし、第1のクライアントに全ブロックを送信し終えたとき、第2のクライアントにすべてのブロックを送信していない場合は、再び先頭のブロックから順にデータベースから読み出して、残りのブロックを第2のクライアントに送信することを特徴とするデータ配信方法。
A method of distributing data from a server equipped with a database to a plurality of clients using the database via a network,
The server divides the data requested by the client into multiple blocks and adds reconfiguration information to the data block so that it can be reconfigured into the original file even if the client does not receive the data block in order. Then, data is read from the database to the buffer in order from the first block, and the data block on the buffer is sent to the client. At that time, the number of blocks into which the data can be divided is calculated and the last block is stored. The number of blocks being transmitted to the client and the number of blocks started to be distributed to the client are stored for each client, and the same data is received from the second client during distribution to the first client. If a distribution request comes, the first client One of the blocks in which distribution is started from the data block on the buffer transmitted to the second client, and then distributed in parallel to the first and second clients. It is determined for each client whether or not it is the previous block. When the previous block is reached, the client is excluded from the distribution target. When all blocks have been transmitted to the first client, the second client When all the blocks are not transmitted, the data distribution method is characterized in that the blocks are read again from the database in order from the first block and the remaining blocks are transmitted to the second client.
データベースを備えたサーバと、ネットワークを介してそのデータベースを利用する複数のクライアントから成るデータ配信システムであって、
サーバは、配信するデータを複数のブロックに分割しするとともにクライアントが順番通りにデータブロックを受け取れなかった場合でも再び元のファイルに構成できるようにするための再構成情報をデータブロックに付加し、一連のブロックを先頭ブロックから順に最終ブロックへ、そして最終ブロックの次は先頭ブロックへと循環してデータベースからバッファにブロック単位に読み出し、そのバッファ上のデータブロックをクライアントに配信するようにし、その際、データをいくつのブロックに分割できるかを計算して最終ブロックが何番目か記憶し、クライアントに送信中のブロックが何番目か、及びクライアントに配信開始したブロックが何番目かクライアント毎に記憶し、第1のクライアントに配信している途中で第2のクライアントから同じデータについての配信要求が来た場合は、そのとき第1のクライアントに送信しているバッファ上のデータブロックから第2のクライアントに配信を開始し、その後、第1と第2のクライアントに並行して配信し、配信し終えたブロックが配信開始したブロックの1つ前のブロックか否かをクライアント毎に判定し、1つ前のブロックに至ったらそのクライアントを配信対象から除外するようにし、第1のクライアントに全ブロックを送信し終えたとき、第2のクライアントにすべてのブロックを送信していない場合は、再び先頭のブロックから順にデータベースから読み出して、残りのブロックを第2のクライアントに送信することを特徴とするデータ配信システム。
A data distribution system comprising a server equipped with a database and a plurality of clients using the database via a network,
The server divides the data to be distributed into a plurality of blocks and adds reconfiguration information to the data block so that the client can reconfigure the original file even if the client cannot receive the data block in order, A series of blocks are circulated from the first block to the last block, and after the last block, the first block is circulated and read from the database to the buffer in block units, and the data blocks on the buffer are distributed to the client. Calculates how many blocks the data can be divided into, stores the number of the last block, stores the number of blocks being sent to the client, and stores the number of blocks started to be distributed to the client for each client. , While delivering to the first client, the second class When a distribution request for the same data is received from an ant, distribution starts from the data block on the buffer transmitted to the first client to the second client, and then the first and second clients In each client, it is determined whether the block that has been distributed in parallel and the block that has been distributed is the block immediately before the block that started the distribution, and when the block reaches the previous block, the client is excluded from the distribution target. When all the blocks have been transmitted to the first client and all the blocks have not been transmitted to the second client, the blocks are read again from the database in order from the first block, and the remaining blocks are A data distribution system characterized by being transmitted to a client.
データベースを備えたサーバから、ネットワークを介してそのデータベースを利用する複数のクライアントにデータを配信するようコンピュータを制御するプログラムであって、
サーバは、クライアントから要求されたデータを複数のブロックに分割し、先頭ブロックから順にデータベースからバッファに読み出し、クライアントが順番通りにデータブロックを受け取れなかった場合でも再び元のファイルに構成できるようにするための再構成情報をデータブロックに付加し、そのデータブロックをクライアントに送信し、その際、データをいくつのブロックに分割できるかを計算して最終ブロックが何番目か記憶し、クライアントに送信中のブロックが何番目か、及びクライアントに配信開始したブロックが何番目かクライアント毎に記憶し、第1のクライアントに配信している途中で第2のクライアントから同じデータについての配信要求が来た場合は、そのとき第1のクライアントに送信しているバッファ上のデータブロックから第2のクライアントに配信を開始し、その後、第1と第2のクライアントに並行して配信し、配信し終えたブロックが配信開始したブロックの1つ前のブロックか否かをクライアント毎に判定し、1つ前のブロックに至ったらそのクライアントを配信対象から除外するようにし、第1のクライアントに全ブロックを送信し終えたとき、第2のクライアントにすべてのブロックを送信していない場合は、再び先頭のブロックから順にデータベースから読み出して、残りのブロックを第2のクライアントに送信することを特徴とするデータ配信プログラムを記録した機械読み取り可能な記録媒体。
A program for controlling a computer to distribute data from a server equipped with a database to a plurality of clients using the database via a network,
The server divides the data requested by the client into a plurality of blocks, reads the data from the database to the buffer in order from the first block, so that even if the client cannot receive the data blocks in order, it can be reconstructed into the original file. Is added to the data block, and the data block is sent to the client. At that time, the number of blocks into which the data can be divided is calculated, the last block is stored and the number is being sent to the client When each block stores the number of blocks and the number of blocks started to be distributed to the client for each client, and a distribution request for the same data comes from the second client during distribution to the first client Is the data on the buffer that is being sent to the first client at that time. The distribution starts from the block to the second client, and then distributes in parallel to the first and second clients, and the client determines whether the block that has been distributed is the previous block before the distribution started. When every block is reached and the previous block is reached, the client is excluded from the distribution target. When all blocks are transmitted to the first client, all blocks are transmitted to the second client. If not, a machine-readable recording medium on which a data distribution program is recorded, wherein the data is read from the database again in order from the first block and the remaining blocks are transmitted to the second client.
JP2000306270A 2000-10-05 2000-10-05 Data distribution method Expired - Fee Related JP4623810B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000306270A JP4623810B2 (en) 2000-10-05 2000-10-05 Data distribution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000306270A JP4623810B2 (en) 2000-10-05 2000-10-05 Data distribution method

Publications (2)

Publication Number Publication Date
JP2002116932A JP2002116932A (en) 2002-04-19
JP4623810B2 true JP4623810B2 (en) 2011-02-02

Family

ID=18786992

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000306270A Expired - Fee Related JP4623810B2 (en) 2000-10-05 2000-10-05 Data distribution method

Country Status (1)

Country Link
JP (1) JP4623810B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5406798B2 (en) * 2010-07-21 2014-02-05 日本電信電話株式会社 SIP communication system, SIP client, SIP server, SIP communication method, SIP communication program
JP6056211B2 (en) * 2012-06-22 2017-01-11 富士通株式会社 Information management apparatus, information management program, and information management method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05324342A (en) * 1992-05-15 1993-12-07 Tokyo Electric Co Ltd Program loading method
JPH0736799A (en) * 1993-06-28 1995-02-07 Kyushu Nippon Denki Software Kk Program server device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05324342A (en) * 1992-05-15 1993-12-07 Tokyo Electric Co Ltd Program loading method
JPH0736799A (en) * 1993-06-28 1995-02-07 Kyushu Nippon Denki Software Kk Program server device

Also Published As

Publication number Publication date
JP2002116932A (en) 2002-04-19

Similar Documents

Publication Publication Date Title
US9894139B2 (en) Asynchronous data protocol
CN104820701B (en) Data record and synchronous method and system
US7111039B2 (en) System and method for using packed compressed buffers for improved client server communications
EP2175383A1 (en) Method and apparatus for improving file access performance of distributed storage system
JP2018525761A (en) Scalable real-time messaging system
US7406083B2 (en) Method for preserving the order of data packets processed along different processing paths
US20060242264A1 (en) Network file sharing method and system
JP2019521576A (en) Maintaining Messaging System Persistence
JPH0981497A (en) Real-time stream server, storing method for real-time stream data and transfer method therefor
JP2018531472A (en) Scalable real-time messaging system
CN101147129A (en) Method and system for caching read requests from a shared image in a computer network
EP1466479A1 (en) A server and method for storing files in a ring buffer
US20150006622A1 (en) Web contents transmission method and apparatus
US7113998B1 (en) System and method for grouping recipients of streaming data
JP4623810B2 (en) Data distribution method
US20070136484A1 (en) Transmit request management in a distributed shared storage system
US8903885B2 (en) Information communication system, node device, information processing method and computer-readable storage medium
CN113708937A (en) Processing method and system for block chain transaction
JP3288213B2 (en) server
GB2441577A (en) Video server using FPGA streamers with control GPU and memory wherein video data segments are chained with play, FF and rewind pointers
CN103067419B (en) A kind of distributed file system and the method controlling file storage within the system
JP2011249865A (en) Content server, content distribution system, content distribution method, and program
TW201824005A (en) Data transmission system, a data receiving method and a data transmission method using two-stage memories to handle packet data
JP2002247091A (en) Contents distribution server, method and system
CN110737635B (en) Data blocking method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051226

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071004

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100511

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100803

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100910

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

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

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

Free format text: PAYMENT UNTIL: 20131112

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131112

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20131112

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees