File transfer

A method and system for file transfer are provided in which a file is transferred between a source client and a destination client via a middle server. The server receives segments of a file from the source client and stores the segments of the file as they are received. The server also forwards the segments of the file to a destination client as they are received, with the exception of one segment. The server combines the segments to form the whole file and applies a process to the whole file. The process may be for example an authorisation process such as an anti-virus check, a confidentiality check, or a content validity check. If the file passes the process, the remaining excepted segment is forwarded to the destination client.

FIELD OF THE INVENTION

This invention relates to the field of file transfer over a network. In particular, this invention relates to file transfer over a network in which a process must be carried out on the file before delivery.

BACKGROUND OF THE INVENTION

File transfer between clients across a network may be carried out via a server. This may take place in many different environments. The server receives a file from a source client and forwards it to the destination client. When a file is transferred between clients, the server may carry out some form of process on the file. This process may be, for example, a virus check to make sure that the file is safe to forward to the destination client, a confidentiality check to make sure that the destination client is authorized to receive the file, or any other appropriate process.

Some processes that the server carries out before forwarding a file, must be applied to the file as a whole. In many file transfer situations, the file is split into segments due to a size limitation on the maximum block size that can be sent across a communication means. This results in a delay in the server carrying out the process on the file and forwarding it to the destination client. The server must wait for all the segments of the file to arrive from a source client and the server must re-construct the file before the process can be carried out. Once the process has been successfully completed the file must again be split into segments to transfer it to the destination client.

For example, in an instant messaging environment, a file is transferred between two communicating instant messaging clients via an instant messaging server. The server needs to carry out an anti-virus scan on the file before allowing the transfer to the destination client. Many anti-virus (AV) software packages can only authorize a file as a whole, and cannot carry out the scan successfully on segments of a file. The instant messaging server must wait until all the segments arrive at the server before the scan can take place. The delivery of the file to the destination client is postponed until the file is cleared by the scan. This causes a delay in the file transfer.

SUMMARY OF THE INVENTION

It is an aim of the present invention to provide a method and system for file transfer via a server which must carry out a process on the file, which reduces the delay in the transfer caused by the process.

According to a first aspect of the present invention there is provided a method for file transfer, comprising: receiving segments of a file; storing the segments of the file as they are received; forwarding the segments of the file to a destination client as they are received, excepting at least one segment; combining the segments to form the file; applying a process to the whole file; and if the file passes the process, forwarding the excepted segment to the destination client.

A source client preferably divides the file into segments and transmits the segments to a server. The segments may be forwarded to more than one destination client simultaneously.

The excepted segment may be the last segment to be received. There may be more than one excepted segment. The segments are appended to a file as they are received.

The process may be an authorization process including one of an anti-virus check, a confidentiality check, a content validity check.

The segments may be received out of sequence order in the file and may contain an indication of their position in the file. At least one of the segments may include an indication of the number of segments in the file. The excepted segment which is not to be forwarded on receipt may be identified by a count of segments.

If the file fails the process, the excepted segment is not sent to the destination client and a failure message is sent.

According to a second aspect of the present invention there is provided a computer program product stored on a computer readable storage medium, comprising computer readable program code means for performing the steps of: receiving segments of a file; storing the segments of the file as they are received; forwarding the segments of the file to a destination client as they are received, excepting at least one segment; combining the segments to form the file; applying a process to the whole file; and if the file passes the process, forwarding the excepted segment to the destination client.

According to a third aspect of the present invention there is provided a method of providing a service to a client over a network, the service comprising the method steps of: receiving segments of a file; storing the segments of the file as they are received; forwarding the segments of the file to a destination client as they are received, excepting at least one segment; combining the segments to form the file; applying a process to the whole file; and if the file passes the process, forwarding the excepted segment to the destination client.

According to a fourth aspect of the present invention there is provided a system for file transfer comprising: a source client including dividing means for dividing a file into segments, and transmitting means for transmitting file segments; a destination client including receiving means for receiving file segments; and a middle server including receiving means for receiving file segments from the source client, a store for storing file segments as they are received, forwarding means for transmitting file segments to the destination client as they are received, means for identifying one segment which is not forwarded to the destination client on receipt, and re-combining means for combining the file segments into the whole file, and a file processing means for applying a process to the whole file.

The middle server may include a dividing means for dividing the whole file into segments once it has passed the process. The dividing means of the source client and the middle server preferably use the same dividing method to provide the same file segments. The destination client may also include a re-combining means for combining the file segments into the whole file.

There may be more than one destination client and the middle server may forward the file segments to the destination clients simultaneously.

In one embodiment, system may be an instant messaging system and the source and destination clients may be instant messaging clients. In another embodiment, the system may be a file sharing system and the source and destination clients may be file sharing applications. In a further embodiment, the system may be a file replication system and the middle server is a replication server. In yet another embodiment, the system is an email system and the middle server is an email server.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

A method and system are provided for file transfer between computer entities over a network via a server. The environment of the file transfer may take many forms and the invention is applicable to any form of file transfer in which the file is split into segments for transfer and the transfer is via a server which carries out a process on the whole file.

A file may be any form of a collection of data or one or more programs. For example, a file may be a program, graphics, text, media such as sound and music, etc. The described method and system are suitable for non-streamable files, in which the entire file must be received before it can be accessed or used.

FIG. 1Ashows a system100with a first client101, a second client102, and a middle server103. The clients101,102communicate via the server103with communications made via a network105. The network may be any form of network including a LAN (local area network), a WAN (wide area network), a wireless network, an Intranet, the Internet, or any combination of such networks. The server103includes a file processing means104which is operable to carry out some form of process on a file transferred via the server103from a source client101to a destination client102.

In one embodiment, a file may be transferred from the source client101to multiple destination clients102simultaneously with the process being carried out once by the server103before forwarding the file to the multiple destination clients102. In another embodiment, the source and destination clients101,102may be the same entity, with the server103carrying out the process before returning the file to the client.

An example environment in which the invention may be applied, is an instant messaging environment. In an instant messaging environment, the clients101,102communicate in real time via an instant messaging server103. Each of the clients101,102runs a client application. The server103runs the instant messaging services of login and authentication of clients, connection, and routing of messages between clients.

Another example environment in which the invention may be applied, is file transfers on replication servers in which the server103ofFIG. 1Ais a replication server.

A further example environment in which the invention may be applied, is non-peer to peer file sharing applications101,102which transfer files via a server103.

A yet further example environment in which the invention may be applied, is an email server103for file transfer between email clients101,102.

The above are example environments in which the invention may be applied; however, any client/server architecture where files are transferred via a middle server may use the described method.

A source client101may transfer a file to one or more destination clients102. The file is split into segments at the source client101and the segments are sent individually across the communication channel to the server103. Files are split into segments due to size limitations of blocks sent across the communication channel.

The file segments are received at the server103and joined together to re-form the file. The server103forwards the segments upon their receipt at the server103to the destination client102, with the exception of at least one segment. The excepted segment is held back at the server103until the server103has carried out any required process or processes on the file. The destination client102cannot re-form the whole file until the excepted segment has been forwarded from the server103and received at the destination client102. The server103may, if appropriate, hold back more than one segment until the process has been carried out. However, the majority of the segments are sent to the destination client102before or during the processing of the file by the server103.

A method and system of file transfer are described in which file segments sent from a source client101are received on the server103, re-constructed to form the file and a process carried out on the whole file. As the individual segments are received on the server103, they are stored on the server103. The individual segments, up until the last segment of the file to be received, are also immediately sent by the server103to the destination client102. When all the segments of the file have been received on the server103and the segments combined to re-construct the file, the process is carried out by the server103on the file. Only when the file passes the process, is the remaining segment sent by the server103to the destination client102.

The excepted segment which is not sent to the destination client102upon its receipt at the server103, may be the last segment to be received at the server103. Alternatively, the excepted segment may be the first segment to be received at the server103or another designated segment from within the file.

The server103may carry out one or more processes on the file before forwarding it to the destination client102or clients. The process may be an authorization, security, or content checking process. In one example, the process may be a confidentiality check that the file does not contain confidential information that the destination client is not entitled to receive, or to check that the destination client has the required confidentiality clearance for the file. In another example, the process is an anti-virus scan to ensure that the file does not contain a virus that would contaminate the destination client's computer system. Another example, is a process for checking the validity of the content of the file. Other forms of suitable process that may also be carried out by the server103will be apparent to a person skilled in the art. Such processes often require the whole file to be received on the server103before the process can be carried out. Therefore, file segments received at the server103from the source client101must be re-constructed into the file at the server103before the process is carried out.

FIG. 1Bprovides more detail of the components of the server103used in the described system. The server103includes a segment receiver111and a store112for storing the received segments. A segment combiner113recombines the segments to form the file. A last segment identifier114identifies the last segment of a file to be received. The last segment identifier114may be, for example, a counter wherein there are a known number of segments. Another example of identifying the last segment may be by determining that a single segment remains to be combined by the segment combiner113. A segment transmitter115sends the segments to the destination client. The file processing means104receives the whole file from the segment combiner113. A file segmentor116re-segments the file once it has been processed. The clients101,102shown inFIG. 1Aalso include file segmentors and segment re-combiners for sending and receiving the file. The source client101and the server103divide the file into the same form of segments.

Referring toFIG. 2, an exemplary system for implementing a client system101,102, or a server103is shown. The system is a data processing system200suitable for storing and/or executing program code including at least one processor201coupled directly or indirectly to memory elements through a bus system203. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.

The memory elements may include system memory202in the form of read only memory (ROM)204and random access memory (RAM)205. A basic input/output system (BIOS)206may be stored in ROM204. System software207may be stored in RAM205including operating system software208. Software applications210may also be stored in RAM205.

The system200may also include a primary storage means211such as a magnetic hard disk drive and secondary storage means212such as a magnetic disc drive and an optical disc drive. The drives and their associated computer-readable media provide non-volatile storage of computer-executable instructions, data structures, program modules and other data for the system200. Software applications may be stored on the primary and secondary storage means211,212as well as the system memory202.

The computing system200may operate in a networked environment using logical connections to one or more remote computers via a network adapter216.

Input/output devices213can be coupled to the system either directly or through intervening I/O controllers. A user may enter commands and information into the system200through input devices such as a keyboard, pointing device, or other input devices (for example, microphone, joy stick, game pad, satellite dish, scanner, or the like). Output devices may include speakers, printers, etc. A display device214is also connected to system bus203via an interface, such as video adapter215.

Referring toFIGS. 3A and 3B, schematic diagrams illustrate an embodiment of a method in accordance with the present invention. A source client101has a file310which it intends to send to a destination client102. The file310is divided into segments311-314.FIGS. 3A and 3Bshow the segments311-314as all being of the same size. Transfer delay times may be shortened further by using a variable segment size.

FIG. 3Ashows the segments311-314are sequential in their position in the file310. A first segment311is sent321to the server103. The first segment311is stored on the server103. The first segment311is also sent331from the server103to the destination client102. When a first segment311is received at the server103or at the destination client102, it is appended to an initially empty file.

The second segment312is sent322to the server103where it is stored. The second segment312is sent332from the server103to the destination client102. When the second segment312is received at the server103or at the destination client102, it is appended to the file containing the first segment311.

The same process is carried out for the third segment313. The third segment is sent323to the server103where it is stored. The third segment313is sent333from the server103to the destination client102. When the third segment313is received at the server103or at the destination client102, it is appended to the file containing the first and second segments311,312.

The server103recognizes that there is only one remaining segment required for the file to be complete. This may be achieved in various ways, such as a count of segments, a monitor of the appended file size at the server103, or an indication provided on the last segment itself.

The fourth and last segment314is sent324to the server103where it is stored. It is appended to the file already containing the first, second and third segments311-313to form the whole file310. The last segment314is not immediately sent to the destination client102.

The required process304is carried out on the whole re-combined file310. It is determined305if the file310has passed the process. If the file310has passed the process304, it is again divided into segments311-314and the last segment314is sent334to the destination client102.

At the destination client102, the fourth segment314is appended to the file containing the previously received first, second, and third segments311-313to re-form the file310and to complete the transfer. The file310is then available to the destination client102.

If the process is not passed by the file310, a message is sent by the server103to the source client101and the destination client102that the file transfer has failed.

FIG. 3Ashows an embodiment of ordinal order passing of segments. However, many transfer protocols do not transfer segments in order.FIG. 3Bshows an alternative embodiment in which the segments311-314may be sent in sequence321-324, however they are received at the server103in random order. In a further embodiment, the segments311-314may be sent in any order, including randomly.

Referring toFIG. 3B, the first segment to be received at the server103, namely segment314, is stored on the server103and the segment314is also forwarded334to the destination client102. A second received segment312is received at the server103, the segment312is stored on the server103and also forwarded to the destination client102. A third received segment311is received at the server103, the segment311is stored on the server103and also forwarded to the destination client102.

The final segment to be received, namely segment313is stored on the server103. The final segment to be received313is not forwarded to the destination client102when it arrives at the server103.

The segments311-314may be appended to a file as they are received at the server103, or the server may re-form the file from the stored segments311-314once the final segment has been received at the server103.

As inFIG. 3A, the required process304is carried out on the whole re-combined file310. It is determined305if the file310has passed the process. If the file310has passed the process304, it is again divided into segments311-314and the final segment that was received313is identified and is sent333to the destination client102.

At the destination client102, the final segment313is appended to the file containing the previously received segments311,312,314to re-form the file310and to complete the transfer. The file310is then available to the destination client102.

If the process is not passed by the file310, a message is sent by the server103to the source client101and the destination client102that the file transfer has failed.

FIG. 4shows a schematic diagram of example segments of a file. A file is divided into n segments401-404. Each segment401-404has a header411-414added to it. The headers411-414may be, for example, of one word size. The header411-414of each segment401-404includes an ordinal number of the segment401-404. As an alternative to an ordinal number, the header may include another form of address of the position of the segment in the file. One of the segments (for example, the first segment401) includes the total number420of segments in the file. This may be included together with the ordinal number in a single word as the header of the segment.

The server keeps each segment, and sends it to the destination client, except for the last segment arrives. The last segment is identified because the first segment includes the total number of segments. Even if the first segment is the last to arrive, it can be identified as the last segment by counting all the segments.

In the example application of instant messaging, an instant messaging client A sends a 2 MB executable file to client B. The file is sent through a server. The file is split in the application layer into segments of 2 KB size each resulting in 1000 segments. Each segment is transferred by a TCP (Transmission Control Protocol) protocol to the server. The TCP protocol may split each segment due to its own limitations, but this appears seamless to the application layer. This example divides the file into segments of the same size. Alternative implementations may divide the file into variably sized segments in order to reduce transfer delay times. For example, the final segment to be transferred may be the smallest segment.

In another example application of a replication server, the segment size and the numbering may be different. Also, a different transfer protocol may be used (for example, UDP (User Datagram Protocol)).

FIG. 5provides a flow diagram500of the described method. A file is first divided501into segments at the source client. Segment x {x=1, 2, . . . n} is sent502to the server. It is determined503at the server if the segment is segment n. If it is not segment n, the segment is appended504to a file on the server. The segment is also sent505to the destination client. The method then loops506for the next segment x=x+1.

If it is determined503that the segment is segment n, the segment is appended507to the file on the server to complete the file. The process is carried out508on the file. It is then determined509if the file passed the process. If so, the file is again divided into the segments510and the last segment is sent511to the destination client.

If it is determined509that the file has failed the process, a failure message is sent512to the source and destination clients and the transfer is aborted.

The described method and system transfer the majority of a file to a destination client before it has been processed by the server. In the case where the process is a anti-virus check of a file, portions of an infected file are received at the destination client. However, this will not risk infection of the destination client's computer system, as the file cannot be accessed by the destination client until all the file segments have been received.

The process carried out by the server may be any form of process required on a file before the destination client receives the file.

The disclosed system can take the form of an entirely software embodiment, an entirely hardware embodiment, or an embodiment containing both software and hardware elements. The figures include block diagram and flowchart illustrations of methods, apparatus(s) and computer program products according to an embodiment of the invention. It will be understood that each block in such figures, and combinations of these blocks, can be implemented by computer program instructions. These computer program instructions may be loaded onto a computer or other programmable data processing apparatus to produce a machine, such that the instructions which execute on the computer or other programmable data processing apparatus create means for implementing the functions specified in the block or blocks. These computer program instructions may also be stored in a computer-readable medium or memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium or memory produce an article of manufacture including instruction means which implement the function specified in the block or blocks. The computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the block or blocks.

Those skilled in the art should readily appreciate that programs defining the functions of the present invention can be delivered to a computer in many forms; including, but not limited to: (a) information permanently stored on non-writable storage media (e.g. read only memory devices within a computer such as ROM or CD-ROM disks readable by a computer I/O attachment); (b) information alterably stored on writable storage media (e.g. floppy disks and hard drives); or (c) information conveyed to a computer through communication media for example using wireless, baseband signaling or broadband signaling techniques, including carrier wave signaling techniques, such as over computer or telephone networks via a modem.

While the invention is described through the above exemplary embodiments, it will be understood by those of ordinary skill in the art that modification to and variation of the illustrated embodiments may be made without departing from the inventive concepts herein disclosed.