FIELD OF THE INVENTIONThe present invention relates to improvements in data communications networks and to systems, methods and apparatus employed in such networks.
BACKGROUND TO THE INVENTIONIn conventional client/server data networks, such as TCP/IP or other routed networks, a main server serves all terminals via a single server socket. This results in extreme spikes in the network load, especially when data is required to be transferred to a large number of clients simultaneously, causing delays in data transmission.
The present invention seeks to provide improved network systems, methods and apparatus whereby network, performance is enhanced.
SUMMARY OF THE INVENTIONThe invention provides improved data communications networks, methods of operating data communications networks, network servers, network terminals end computer programs as defined in the claims appended hereto.
BRIEF DESCRIPTION OF THE DRAWINGSEmbodiments of the invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
FIG. 1 is a diagram illustrating the operational model of a data communications network embodying the present invention;
FIGS. 2A,2B and2C are diagrams illustrating the operational structure of a main server and terminals employed in the network ofFIG. 1;
FIGS. 3A and 3B are transaction diagrams illustrating routing and data transfer processes employed in the network ofFIG. 1; and
FIG4 is a diagram illustrating one example of a scheme for distributing data from a main server to a number of target terminals in accordance with the invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTSReferring now to the drawings,FIG. 1 illustrates an operational model of a simplified exemplary embodiment of a data communications network in accordance with the invention. The network includes adata storage system10, which in this embodiment includes media storage system18 for data (i.e. “media” or “content”) that is to be selectively distributed over the network, and a tracking database20 that is used for managing the operation of the network as shall be described in more detail below. For convenience, data that is to be distributed from the media storage system18 will be referred to herein as “content”, which will be understood to include any type of data of interest to end users, including but not limited to text, graphics, video, audio, executable code etc. Content will generally comprise a data file of some type.
For the purposes of the present invention, “content” means files or parts of files or equivalents thereof that are stored on a server, downloaded from the server by a client and stored by the client for subsequent use, as distinct front digital broadcast media in which a data stream is transmitted by a broadcast server and is temporarily buffered by clients and, in some cases, by intervening relay unit.
The network further includes amain server12 that communicates with the media storage system18 and tracking database20, and controls the distribution of content from the media storage system18. The network also includes a plurality ofterminals14 and16, to which content is to be distributed. In accordance with the invention, when the same content is to be distributed to a number of terminals, at least some of theterminals14 also act as “relay servers” in distributing the content to the remaining terminals16 (i.e. some or all of the terminals may also be capable of acting as relay servers).
All transactions between the media storage system18 and theterminals14,16 are controlled by themain server12. In particular, all data downloads to the terminals from the media storage system18 are managed by themain server12. Generally, content is retrieved from the storage system by the main server and forwarded on to theterminals14,16 by the main server. In some cases, however, the main server does not itself retrieve and forward content, but manages the retrieval and forwarding of content by other servers.
The term “target terminal” used here means a terminal which is the intended recipient of content (a data file) from the media storage18. Eachterminal14,16 can be the target for a data file. In this embodiment, each of the first set ofterminals14 is also adapted to operate as a relay server by forwarding data to one or more of the second set ofterminals16 as described further below. Theterminals16 may also act as relay servers for relaying data to additional terminals (not shown) downstream thereof. It will be understood that not all of the terminals included in the network need operate as relay servers and the network may include terminal devices that are not suited for operation as relay servers.
The tracking database20 keeps records of transactions between themain server12 and thevarious terminals14,16. In particular, the tracking database monitors the performance (communication speed and/or other parameters such as reliability) of all terminals that also act as relay servers in the network. This information is available to the main server. In particular, thetracking database12 is able to provide the main server with lists of terminal addresses ranked by their relative performances.
In operation of the network, when a consent data file is to be distributed to particular target terminals, themain server12 initiates a data transport operation by sending a transport request to the first set ofterminals14, which are selected as being the best terminals from the list of target terminals on the basis of the current performance data. The transport request includes:
- Details of the file to be transported. These will generally include, for example, the file type and size, time stamps for activation and deactivation of the content, encryption and compression details, etc.
- The addresses of relay servers and terminals that are to be involved in the distribution of the file.
The transport request sent from themain server12 to the first set ofterminals14 instructs these terminals to retrieve the data from the main server12 (or from a another server address included in the transport request). The list of the remaining target terminal addresses is divided between thefirst terminals14, so that each of thefirst terminals14 acts as a relay server for distributing the data to a subset of the remaining target terminals.
In response to the transport request from themain server12, each of thefirst terminals14 begins to download the file from themain server12. When one of thefirst terminals14 has received a predetermined number of bytes of the file, thatterminal14 sends a modified version of the original transport request to its subset of thetarget terminals16. The modified transport request identifies the relevantfirst terminal14 as the server address from which its subset of thetarget terminals16 should retrieve the data. Depending on the number of target terminals, the list of target terminals may be sub-divided a number of times. That is, each of the second set ofterminals16 may receive a list of further target terminals for which it is to act as a relay server. At each stage, it is preferred that the “best” terminals from the list of remaining targets are selected to act as relay servers for the remainder.
When eachterminal14 or16 has downloaded the whole file, it sends a notification message direct to themain server12, as indicated by22 inFIG. 1.
Themain server12 is adapted to serve data requests from the first set ofterminals14. If the terminal in the second set ofterminals16 cannot reach the terminal in the first set of theterminals14 if will send the data request to themain server12.
Generally, the main server and each downstream terminal acting as a relay server will only serve a small number (e.g. 2 to 5) of downstream terminals. If the number of target terminals is less than or equal to this number, the target terminals may all retrieve the data direct from the main server, or the main server may request the best of the target terminals to act as the relay server for the other(s).
It will be understood that the network may include many more terminals than are illustrated inFIG. 1, arranged in a tree structure wherein each terminal is either a node (functioning as both a relay server and a target terminal) or a leaf (functioning only as a target terminal); i.e. there may be multiple node terminals in the downstream data transmission path between the main server and each target terminal. Preferably, there is also anupstream communication path22 from eachterminal14,16 direct to themain server12. Theupstream path22 is used by target terminals to acknowledge receipt of data. These acknowledgements are sent directly from the target terminals to themain server12 as illustrated. Theupstream path22 between theterminals14 and themain server12 has been omitted fromFIG. 1 for clarity of illustration.
It should be understood that the operational model illustrated inFIG. 1 may be implemented using an existing, conventional network infrastructure (such as the Internet or equivalent) and does not require a new physical network. Servers and terminals may be connected to the network backbone by synchronous fixed connections such as ISDN, HSDL, T1 or T3 and the network may include dial-up connections, wireless connections etc. That is,FIG. 1 illustrates logical connections between the server and terminals, rather than physical connections. Further, the logical connections between the main server and terminals vary dynamically in use of the network, as shall be described further below.
The invention is particularly suited for use where all terminals are capable also of acting as relay servers as described and can be assumed to be permanently on-line. However, it will be understood that the invention may be adapted to accommodate terminals that do not also act as relay servers (such terminals would always be “leaves”, at the end of lists of target terminals).
The target terminal requests each packet to be transferred separately. The packet to be transferred includes the information about the type of the data to be transferred, size, compression, and the checksums required for the validation of the transferred data packet.
FIG. 11 of the drawings illustrates the operational structure of themain server12, including a network database23 for storing network information including the addresses etc. of network terminals (this database may implement all or part of the functionality of the tracking database20 ofFIG. 1; these database functions can be performed by one or more database systems on one or more computers/servers), database interface modules24,26, and a terminal module28. The terminal module28 included in themain server12 is also used in each of the network terminals/relay servers14 and16, and includes a routed network protocol module30 (preferably a TCP/IP module, but other routed protocols may be used) and a main application module32. As shown inFIG. 2B, the database interface modules24,26 provide I/O input/output) control functions34, providing the required server level functionality to the core of the main application32 for data transfer control and for logging data aggregation, and database interface functions providing access to the network database23. For example, this may be either via an ODBC (open database connectivity) interface or a database interface native to the network database system23.
As shown inFIG. 2C, the main application32, as employed in both the main server and those terminals that also act as relay servers, comprises the following functional modules:
- A core module36 interprets received packets and stores data.
- A data reception module40 receives individual packets.
- A data preparation module42 prepares data to be relayed.
- A data transmission module44 sends data prepared by the preparation module42 and sends acknowledgements to relevant clients.
- A routing control module46 maintains optimal data transfer rates.
- A socket control module48 administers socket objects.
- A server socket50 monitors data received via the TCP/IP module (or other routed network protocol module)30.
- Client sockets52 transmit data via themodule30. The number of client sockets varies dynamically depending on the number of server connections required at any particular time.
In a conventional system, a server has a server-oriented connection for clients, comprising a server socket which is used to connect to the client's server socket. In the present invention, the main application used in themain server12 and in each terminal that also operates as a relay server contains a standard server socket50 for receiving data from its clients. In addition to this, the main application also has client sockets52 for downstream communications to the downstream terminals. The actual data to be transmitted to the target terminals is sent via these client sockets and acknowledgements are received from terminals via the server socket. When the required data has been sent by the server, the client socket created for the purpose of sending the data can be destroyed, so as not to consume network resources unnecessarily. By this method, received acknowledgements will not cause any interruptions in the outgoing data flow. Each terminal/server has two “hard-coded” sockets, one client socket52 for serving other terminals/servers and one server socket50 for main-server connection use only. Additional sockets can be created and used dynamically as required. Each socket has an independent processor thread controlling it so that sockets can be managed and controlled without interrupts and delays.
The opening and operation of sockets is handled dynamically using a C++ class-application which generates a new socket when it needs a new instance of this class. In this manner sockets can be managed dynamically and their number varied as necessary. Each thread owns and controls its own sockets. When a socket is no longer needed the controlling thread destroys the socket and then destroys itself.
The operation of the network will now be described.
FIG. 3A illustrates the routing process.
The main server selects a first set of a few (two or three) terminals, and sends the transport request (which includes the addresses of the relevant target terminals) to each of these. Each of this first set of terminals acknowledges its connection in the dynamic route by sending a message direct to the main server. The speed of this acknowledgement can be used to update the terminal data used for monitoring terminal performance. This first set of terminals is selected as being the “best” (“fastest”) terminals for use in transferring data to the particular target terminal, based on performance data previously acquired in operation of the network and stored in the network database.
When the data transfer is underway, data is transferred to the known terminals already registered as part of the network. If a new terminal is registered to the main server during the transfer it will be included in the next data transfer.
As preciously described, the main server selects the terminals with the shortest response times. This information is obtained in the following manner: the primary recipient of routing acknowledgements from particular terminals is the “server role” application that sent the transport request to those terminals. When the transfer chain is completed, information is naturally relayed automatically to the main server. The performance of different terminals (network addresses) is measured simply by measuring the response time between different terminals and by selecting the terminals with shortest response times.
It is not necessary for the terminals to know the entire network address space of the network, since the target terminal addresses are included in the transport requests.
As part of the transport request, the main server sends the addresses of other target terminals to the first set of terminals/relay servers. Each terminal selects its own downstream terminals/relay servers and sends the rest of the target network addresses to these terminals/relay servers as part of the modified transport request. That is, each one of the first set of terminals selects a further two or three “best” terminals/relay servers from the addresses forwarded to it by the main server and passes the modified transport request on to these terminals, including the details of the other remaining target terminals. Because of this dynamic routing, the main server need not know explicitly which terminals deliver data and which terminals receive it. It is sufficient that it is ensured that each terminal in the route is accessible. If the delivery fails for one terminal for some reason, this is registered in the database and failed deliveries are repeated during the next transfer.
Once the route to a particular target has been established, the packets or the data file are passed along the defined route via the selected relay servers on the basis of the target terminal address in the handle/header of each packet.
Automatic routing evenly divides the load over a larger network region, reducing the time window required for any particular data transfer operation.
The data transfer process is illustrated inFIG. 3B.
As shown inFIG. 3B, in response to the transport request each target terminal requests the data from the main server or the upstream terminal acting as the server (as specified in the transport request) as packets, reassembles the file and, if necessary, relays the packets to downstream target terminals. When the target terminal has received the last packet of the file, it sends an acknowledgement to the main server.
It is preferred that all data is transferred in encrypted and compressed binary format. In this manner data security is improved as compared with transferring plain text and data transfer requires less time. Binary format data requires less “intelligence” from the relevant application as there is no need to interpret the received data. It can be restructured directly to form a suitable data structure. All received data is primarily restructured to the base type (identified in the packet header), after which the information included in the base type indicates the oriented data type. This mechanism also provides for data verification: the size of each data type is predetermined and the amount of received data must correspond to the size of the data type.
Since the data delivered is binary only, and the size of the packets is quite small and the number of the packets may be quite large, there is no risk that the purpose of the delivered data may be determined in the event that some of the packets are accessed by unauthorised parties on delivery. It is very difficult to deduce the content of binary data without knowing its structure. Accordingly, this improves data security when using a public network.
In order to provide a better understanding of the invention, examples of data transfers will be described with reference to a preferred embodiment of a network in accordance with the invention. As previously described, the main server includes or has access to a network database that lists all of the currently active/registered terminals/relay servers in the network, ranked in order of their performance (speed). Assume that data to be transferred from the main server to one or more target terminals comprises a single data file.
As previously described, the transport request includes the address(es) of the/each target terminal and other information about the data to be transferred, including the number of packets etc.
As a first example, assume that the data is to be transferred to a single target terminal. The main server sends the transportation request direct to the target terminal. The target terminal acknowledges the request and then requests the main server to send each packet in turn. Each of these packets is compressed and encrypted individually. The target terminal acknowledges each packet. If a particular packet fails, it is only necessary to re-transmit that packet, rather than to begin the entire download from the beginning. In some circumstances, data transfers to a single target terminal using the invention might not be significantly faster than conventional download methods. However, the compression applied to the packets and the fact that failed packets do not require the download to be re-started mean that single target downloads are generally quicker and more reliable than conventional methods, particularly for very large files.
As a second example, referring toFIG. 4, assume that the data is to be transferred to thirty nine target terminals T1-T39, ranked in order of performance. Assume that the main server, M.S., and each terminal acting as a server will communicate directly downstream only with a predetermined number N of downstream terminals, and that N=3. The main server sends a first transport request to terminal T1, a second transport request to terminal T2, and a third transport request to terminal T3, each including one third of the complete list of target addresses. Since the terminal addresses are ranked in order of performance, in order to distribute the load evenly across the network the request sent to T1 comprises every 1+Nth address (T1,4,7,10,13,16,19,22,25,28,11,34,37), the request sent to T2 comprises every 2+Nth address (T2,5,8,11,14,17,20,23,26,23,32,35,38), and the request sent to T3 comprises every 3+Nth address (T3,6,9,12,15,18,21,24,27,30,33,36,37). It can be seen how this approach may be applied for any value of N and any number of terminals.
Referring to T1 and its associated downstream addresses, upon receipt of the request from the main server, T1 acknowledges the request and can immediately begin downloading packets from the main server. T1 also relays the modified request to the next set of 8 fastest terminals (T4, T7 and T10) of the list of target addresses sent to T1. The request relayed to each of T4, T7 and T10 includes 1/Nth (⅓) of the remaining addresses originally sent to T1, distributed in a similar manner to that in which the complete target list was originally distributed among T1, T2 and T3 (i.e. T4 receives the addresses for T13, T22 and T31; T7 receives the addresses for T16, T25 and T34; and T10 receives the addresses for T19, T28 and T37). Each of the terminals T4, T7 and T10 acknowledges the request to the main server, begins downloading packets from T1 (this process can begin before the download from the main server to T1 is complete), and forwards the further modified request to the remaining terminals in its own address list, each of which acknowledges the request to the main server and begins downloading packets from its respective relay terminal. In this example, these are the final “leaf” terminals, but it can be seen how this process could be extended to any number of terminals through any number of relay stages. It can also be seen how the same scheme applies to the target address lists for T2 and T3.
It will be understood that the precise distribution scheme could be varied from that illustrated inFIG. 4. The important point is that relatively faster terminals are used at the beginning of the routes and the relatively slowest terminals are at the ends of the routes.
If a transfer to a particular terminal fails, that terminal is moved down the target list, so that the next fastest terminal in the relevant subset of the distribution list is “promoted” in the tree structure. For example, inFIG. 4, if the connection from T2 to T8 fails, T8 would be swapped with T17. If the new connection also failed then other options would be tried. If all available options fail then this is reported back to the main server.
It will also be understood that the distribution scheme in accordance with the invention could be implemented using different network architectures. The network database need not be on the same server/computer as the distribution management system (that generates the transport requests), but must be accessible to it. The data to be transferred need not be resident on or accessible to the same server/computer as the distribution management system. The transport request sent to the first set of terminals (T1, T2, T3 inFIG. 4) could include a further address of another server (a “distribution server”) from which the data is to be obtained. The distribution server may have substantially the same functionality as previously described for the main server and the relay servers.
The terminal downloading the data acknowledges the packets to the server from which it is downloading. When the download is complete it sends the acknowledgement to the main server.
The invention thus provides data communications systems, methods and apparatus with improved performance, in which some or all terminals also operate as relay servers, as necessary, dynamic routing and distributed data transfer ensures optimal or near-optimal data transfer rates to every terminal in the entire terminal network and dynamic routing ensures data delivery even if part of the network fails.
Improvements and modifications may be incorporated without departing from the scope of the invention as defined in the claims appended hereto.