GB2377595A - Reduction of resource usage in TCP/IP implementation with embedded computing devices - Google Patents

Reduction of resource usage in TCP/IP implementation with embedded computing devices Download PDF

Info

Publication number
GB2377595A
GB2377595A GB0116549A GB0116549A GB2377595A GB 2377595 A GB2377595 A GB 2377595A GB 0116549 A GB0116549 A GB 0116549A GB 0116549 A GB0116549 A GB 0116549A GB 2377595 A GB2377595 A GB 2377595A
Authority
GB
United Kingdom
Prior art keywords
data
computing device
embedded computing
held
tcp
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.)
Granted
Application number
GB0116549A
Other versions
GB2377595B (en
GB0116549D0 (en
Inventor
Stuart Mitchell
John Tuffen
Kenneth Tindell
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.)
Livedevices Ltd
Original Assignee
Livedevices 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 Livedevices Ltd filed Critical Livedevices Ltd
Priority to GB0116549A priority Critical patent/GB2377595B/en
Publication of GB0116549D0 publication Critical patent/GB0116549D0/en
Priority to PCT/GB2002/003123 priority patent/WO2003005672A2/en
Priority to US10/191,875 priority patent/US20030145101A1/en
Publication of GB2377595A publication Critical patent/GB2377595A/en
Application granted granted Critical
Publication of GB2377595B publication Critical patent/GB2377595B/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/12Protocol engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/165Combined use of TCP and UDP protocols; selection criteria therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/168Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP] specially adapted for link layer protocols, e.g. asynchronous transfer mode [ATM], synchronous optical network [SONET] or point-to-point protocol [PPP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/10Streamlined, light-weight or high-speed protocols, e.g. express transfer protocol [XTP] or byte stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Abstract

An embedded computing device and method for its use, the embedded computing device including a server application for receiving data transmitted to the embedded computing device under TCP/IP, wherein the server application is adapted to extract and buffer only predetermined portions of the transmitted data which are necessary for correct operation of the embedded computing device. There is further disclosed an embedded computing device and method for its use, the device being adapted to transmit data under TCP/IP, which data is too large to be held by available RAM in the embedded computing device, wherein the embedded computing device is adapted to intermix dynamic data content which must be held in RAM with static data content which is held in ROM, and to separate the dynamic data held in RAM from the static data content held in ROM by way of a predetermined off-line calculation mechanism which generates discrete data packets each of which will fit into an MTU (Maximum Transmission Unit). Also disclosed is the calculation of partial checksums for static sections of data to be transmitted;<BR> making use of advance knowledge of which of a plurality of connections it will use by default to listen for incoming communications in order to automatically bind those connections with no run-time application intervention;<BR> and associating an application task as a servant for a connection so that it is passive until triggered, thereby reducing the consumption of dynamic resources.

Description

<Desc/Clms Page number 1>
IMPROVEMENTS RELATING TO REDUCTION OF RESOURCE USAGE IN TCP/IP IMPLEMENTATION The present invention relates to methods and software for reducing resource usage in TCP/IP (Transmission Control Protocol/Internet Protocol) implementation.
Recently, there has been much development in the field of embedded devices adapted to be connected to the Internet or similar. Such an embedded device is generally in the form of a microcontroller adapted to interact with a larger server or servers, thereby allowing a device (such as a vending machine, domestic electric appliance, motor vehicle etc) to be remotely controlled and/or monitored from a central server by way of a standard protocol such as Internet Protocol.
A major difficulty with embedded devices is that they generally comprise microcontrollers or the like with very limited RAM and ROM. A typical microcontroller for use as an embedded device may have 32kB of ROM and IkB of RAM, which is not enough to support the usual implementations of communications protocols such as TCP/IP. The characteristics of these devices are such that conventional implementations (such as those described in Gary R Wright and W Richard Stevens, "TCPIIP Illustrated Volume 2 : The Implementation ", Addison- Wesley Professional Computing Series, 1995) of Internet Protocols ("IP") and the layered protocols such as Transmission Control Protocol ("TCP") or User Datagram Protocol ("UDP"), as well as higher-level application protocols such as HTTP, FTP, Telnet etc. are not feasible as they would demand more RAM or ROM than is typically available on the device.
It is particularly desirable to enable feature-rich communication to and from embedded devices, but this is currently not achievable because of the limited memory of such devices.
<Desc/Clms Page number 2>
According to a first aspect of the present invention, there is provided an embedded computing device including a server application for receiving data transmitted to the embedded computing device under TCP/IP, wherein the server application is adapted to extract and buffer only predetermined portions of the transmitted data which are necessary for correct operation of the embedded computing device.
According to a second aspect of the present invention, there is provided a method of processing data transmitted to ah embedded computing device under TCP/IP, wherein a server application provided in the embedded computing device is adapted to scan the transmitted data and to extract and buffer only predetermined portions of data which are necessary for correct operation of the embedded computing device.
In a conventional TCP/IP implementation, data is transmitted in segments such as IP packets, each of which comprises a short header including identification data, and a payload typically of 50 to 1500 bytes. Application data is transmitted using TCP, which uses a form of packet switching which allows a string of data to be split between many different IP packets, transmitted separately over the Internet to a remote server, and then reassembled in the correct order at the remote server.
Generally, each incoming IP packet is buffered by the remote server, a checksum calculation is made to identify possible data corruption, and the payload of the IP packet is then passed to an application served by the remote server. However, many data communications under TCP/IP include a large amount of irrelevant data which nevertheless needs to be buffered, which requires a significant amount of RAM. For example, an HTTP request generally includes a vast amount of superfluous data in addition to a URL or filename, which is generally the only information that is required by an embedded device receiving an HTTP request. A conventional TCP/IP stack is operable only to receive and buffer the entire IP packet containing the HTTP request.
Accordingly, by programming an embedded computing device with a server application configured to extract and buffer only the predetermined parts of an IP
<Desc/Clms Page number 3>
packet or packets that are necessary for correct operation of the embedded computing device (e. g. a URL or filename), it is possible to checksum and discard the remaining data in the IP packet or packets, thereby avoiding the need for a large amount of RAM with which to buffer data which is of no relevance.
It is to be appreciated that an embedded computing device in the context of the present application comprises a hardware component or components (e. g. a microcontroller) and a software component or components (e. g. a server application).
The software component (e. g. a server application) further includes a TCP/IP stack as defined hereinbelow, and is adapted to control the operation of the hardware component.
Received data is passed to an application task in chunks (which are of variable size, depending on the underlying datalink MTU, available RAM, and other factors). This allows received messages of arbitrary size to be passed to application tasks.
Only the"interesting" (i. e. necessary for correct operation) data components are buffered by the server application receiving the data. Internet protocols are often very verbose (e. g. an HTTP request can consist of many hundreds of characters just to convey a filename of a few characters). The application is able to extract the necessary information as it is presented, whereas the TCP/IP stack cannot do so and would otherwise have to buffer the entire message.
The checksum can only be tested at the end of a received segment. A received message can be split across several TCP segments. One event that the stack notifies to the task serving a connection is that segment reception is complete, with an indication of whether the checksum test passed or failed. The present applicant has developed a server task structure that makes use of this information to checkpoint its state when a segment is notified as received with checksum OK, and to roll back to the last checkpoint when the start of a segment is notified (an implementation with equivalent functionality is to roll back when an incorrect checksum is notified). The
<Desc/Clms Page number 4>
result is that the server task will correctly build up its buffer of"interesting"received data even when some segments in the reception sequence are first received in corrupted form then re-received correctly (the re-transmit mechanism is part of TCP).
The following illustrations show this process:
<Desc/Clms Page number 5>
<Desc/Clms Page number 6>
In addition to the problems involved in receiving and processing data with an embedded computing device, for example a microcontroller, having limited memory size, there are problems associated with transmitting data therefrom.
According to a third aspect of the present invention, there is provided an embedded computing device adapted to transmit data under TCP/IP, which data is too large to be held by available RAM in the embedded computing device, wherein the embedded computing device is adapted to intermix dynamic data content which must be held in RAM with static data content which is held in ROM, and to separate the dynamic data held in RAM from the static data content held in ROM by way of a predetermined off-line calculation mechanism which generates discrete data packets each of which will fit into an MTU (Maximum Transmission Unit).
According to a fourth aspect of the present invention, there is provided a method of transmitting data from an embedded computing device under TCP/IP, which data is too large to be held by available RAM in the embedded computing device, wherein
<Desc/Clms Page number 7>
dynamic data content which must be held in RAM is intermixed with static data content which is held in ROM, and wherein the dynamic data held in RAM is then separated from the static data content held in ROM by way of a predetermined offline calculation mechanism which generates discrete data packets each of which will fit into an MTU (Maximum Transmission Unit).
Dynamic content which must be held in RAM is intermixed with static content held in ROM (microcontrollers and the like used in embedded systems typically have much more ROM than RAM). This is implemented using the off-line calculation mechanism described in connection with the ninth and tenth aspects of the present invention below to segment the ROM-only and RAM-only parts into discrete chunks that will each fit into an MTU. Several implementations of the data storage are possible, selected according to particular application needs (e. g. linked lists, hash tables or trees of elements).
Application specific update of dynamic outgoing content embedded in files (whose size may be much larger than available RAM) may be made by callbacks to user supplied code (e. g. updates of web pages, ftp (File Transfer Protocol) readout, etc.).
"Active Files"connect arbitrary application behaviour to the transmission of outgoing messages. This is achieved by associating callback functions with files.
When a file is read, the callback function is invoked before the file content is obtained. The user is free to implement any application behaviour in the callback.
For example, a file may exist in a simple ROM-based filesystem, but may contain a callback giving some dynamic content:
<Desc/Clms Page number 8>
file"myfile. txt" { text" < htmlXheadXtitle > Hello World < /titleX/head > " ; text" < body > This is an embedded HTML file." ; text"You are visitor number call count visitor () ; text" < /bodyX/html > " ;
) As the file is read by the underlying filesystem layer, the"text"elements are passed one by one to the application. When the file has been read up to the point where the "call"declaration is found, the named function is called and the results of that transparently interpolated in the output (the TCP/IP stack and application code are unaware that any interpolation has taken place). One mechanism that is implemented using these callbacks is application specific update of dynamic outgoing content embedded in files (e. g. updates of web pages, ftp readout etc). The dynamic content is inserted as required by the application immediately before the data is queued for transmission. It is also possible to embed function calls inside"active files"that do not create any output but affect the state of some other part of the system-for example, a web page which when read has the side effect of calling a procedure to turn on some LEDs: file"lightson. html" { text" < html > < head > < title > Turning the lights on < /title > < /head > " ; text" < body > The lights should now be on." ; call set lights (ALL LEDS ON) ; text" < /body > < /html > " ;
) } Embodiments of the present invention may also have application in negotiating Point-to-Point Protocol (PPP) options. PPP is typically used to encapsulate TCP/IP when sent over serial (e. g. modem) data links. PPP features many options governing the control of the data link. The present applicant has invented an economical way of negotiating these options.
<Desc/Clms Page number 9>
In existing systems, during link negotiation, a remote host may offer many PPP options in a single message. It is likely that many of these will be irrelevant or even unacceptable to the local system. Conventional practice dictates that all such options are collected during the negotiation phase, and rejected in one message. This means that the buffer space required to hold the options is effectively unbounded (it is not known in advance which options will be offered, and hence it is not known in advance how many of the options one might want to reject). This could be coded as:
I list of options to NAK = NULL; if (options to process) then for each option presented if (accept this option) then -- processing related to accepting option elided else append option to list of options to NAK end if ; end for; for each option to reject construct and transmit a reject for that option end for; end if; According to a fifth aspect of the present invention, there is provided an embedded computing device adapted to negotiate PPP (Point-to-Point Protocol) options under TCP/IP by sending explicit reject and NAK (Negative AcKnowledge) messages as soon as a PPP option is received.
According to a sixth aspect of the present invention, there is provided a method of negotiating PPP (Point-to-Point Protocol) options under TCP/IP in an embedded computing device by sending explicit reject and NAK (Negative AcKnowledge) messages as soon as a PPP option is received.
By sending explicit reject and NAK messages as soon as an option is received rather than buffering and then rejecting all offered but unacceptable options in a single reply the present applicant can significantly reduce RAM storage overheads so as to enable implementation where it would not otherwise fit due to resource constraints.
<Desc/Clms Page number 10>
The algorithm below illustrates this-compare noting in particular that the storage needed is bounded-only one option is ever pending at any time. if (options to process) then for each option presented if (accept this option) then -- processing related to accepting option elided else construct and transmit a reject for that option end if ; end for; end if; Embodiments of the present invention may further provide a mechanism by which application tasks running on an embedded computing device consume no dynamic resources except when dealing with communications activity.
In a conventional TCP/IP implementation, worker tasks are spawned when the system starts up. Worker tasks are generally running all of the time, calling a variety of"blocking"API calls that cause the task to suspend when data or network access is not yet available. Furthermore, they continuously consume dynamic resources (RAM for stack space, entries in queues etc. ). Since the nature of communications activity is sporadic, these tasks have to call on the services provided by the TCP/IP implementation and then wait (holding resources as just noted) until the results of those service requests are returned.
For example, consider a task in a typical multi-tasking operating system that wishes to read data from a TCP/IP connection. This would typically be coded in the form described below: task worker task (c: in net connection) is begin data: string; while (still more data to read) do net read (data, netconnection) ; process (data); --further detail elided end while; end task ;
<Desc/Clms Page number 11>
In a typical operating system, the task would"block"in the"netread"call until some data was available-hence would still be consuming stack space and other dynamic resources.
According to a seventh aspect of the present invention, there is provided an embedded computing device operating under TCP/IP in which an application task consumes no dynamic resources except when dealing with communications activity, wherein the embedded computing device is adapted to associate the application task as a servant for a connection such that the application task is passive until its execution is triggered by activity on the connection served.
According to an eighth aspect of the present invention, there is provided a method of operating an embedded computing device under TCP/IP such that an application task consumes no dynamic resources except when dealing with communications activity, wherein the embedded computing device is adapted to associate the application task as a servant for a connection such that the application task is passive until its execution is triggered by activity on the connection served.
In contrast to existing systems, the present applicant associates application tasks as "servants"for connections. This allows the tasks to be completely passive (i. e not in the operating system's"waiting"or"blocked"state) until their execution is triggered by activity on the connection that they serve. The tasks are implemented in a singleshot execution model (such as that mandated by conformance classes BCCI and BCC2 of the OSEK operating system specification [OSEK. VDX Operating System Version 2. 1 revision 1, 13th November 2000, see http ://www. osek-vdx. org/], so they consume no dynamic resources except when activated.
For example, one might declare the following in a (hypothetical) operating system configuration file:
<Desc/Clms Page number 12>
connection cl { listen on ip 192.168. 1.1 port 80; activate task cl~worker ; } When an event (e. g. the arrival of some data, or indication that the connection should close) is received on such a bound connection, the corresponding task (s) are activated and must decode the flags indicating which actions are to be taken, for example:
I task cl worker (flags: in net-flags) is data: string ; if (flags. DATA READY = true) then net read (data); process (data); --further detail elided end if; if (flags. DATA COMPLETE = true) then -- take appropriate action; further detail elided end if; if (flags. CLOSE CONNECTION = true) then -- take appropriate action; further detail elided end if ; --further actions elided. end task; When a task is activated by communications events, the event types are communicated to the task by a set of flags. This allows a task to serve several events in a single activation (e. g. that a connection has been established by an outside request, that data is now available sent from the requestor, and that the data is complete), and the task implementation is structured to deal with simultaneous notification of multiple events. By contrast, the conventional model typically has a task wait for and consume a single event at a time.
Embodiments of the present invention may further provide a mechanism by which communication session characteristics are pre-computed off-line to reduce run-time storage size and execution time.
<Desc/Clms Page number 13>
In typical TCP/IP implementations, many aspects of the communications session are determined dynamically, derived from the application data and other information involved in the communication. Such aspects include: Checksum values. TCP/IP communication is protected against data corruption by means of a checksums used by the receiver to detect such corruption. Typical implementations of the TCP/IP protocol stack calculate this"on the fly"for all data sent.
Bound Connections. In conventional operating systems and TCP/IP stacks, the association between a server and the port on which it listens is made at runtime by an explicit API call, and a connection control block is typically created via dynamic memory allocation mechanisms. Such dynamic-memory allocation mechanisms may be unavailable or extremely expensive on small microcontrollers. For example, in a typical operating system (OS) one might see a code fragment such as: task http server is -- memory allocation here
c = new connection buffer ; -- dynamic API call to bind-may allocate more memory bind (c, PROTOCOL~TCP, 80, "192. 168. 1. 1") while (is~open (c)) do web~page p = get~request (c) ; serve page (p); end while close (connection = > c) end task; Segmentation of messages. The maximum size of a single segment carried by TCP/IP is limited by the datalink Maximum Transmission Unit ("MTU" : the largest possible message that can be sent down the transmission medium in one unit).
Typical TCP/IP implementations dynamically segment messages based on the MTU.
According to a ninth aspect of the present invention, there is provided an embedded computing device adapted to utilise pre-computed TCP/IP communication session characteristics determined off-line, the characteristics comprising pre-calculated and stored partial checksums taken over static sections of data to be transmitted, wherein
<Desc/Clms Page number 14>
the embedded computing device combines pre-calculated partial checksum data with checksum data calculated for dynamic data content when transmitting data.
According to a tenth aspect of the present invention, there is provided a method of operating an embedded computing device whereby TCP/IP communication session characteristics are pre-computed off-line by pre-calculating and storing partial checksums over static sections of data to be transmitted, and wherein the embedded computing device then combines pre-calculated partial checksum data with checksum data calculated for dynamic data content when transmitting data.
The present applicant has developed a novel approach in which the run-time communication behaviour is flexible (connection destinations, data content etc. are dynamic) but run-time savings are made by identifying and acting on information which is known in advance to be static. With reference to the points made above: Checksum values. The TCP checksum algorithm is a simple negated 16-bit onescomplement of the data sent. It has the property that the checksums for any two strings A and B may be trivially combined to form a valid checksum for the string AB. Whereas in a conventional TCP/IP stack the checksum for the string AB would be recalculated from scratch whenever data is sent, embodiments of the present invention exploit the properties of the checksum algorithm in such a way that it is possible to combine pre-calculated fragments of checksum for known or predetermined data. Partial checksums are pre-calculated over sections of data and/or header information where the exact content is known. The pre-calculated partial checksums are then combined with the checksum information (calculated on the fly) for any dynamic content when output is generated. This greatly reduces the run-time computational overhead that would otherwise arise to checksum the static content.
In the case of known or predetermined data, the pre-calculation of checksum fragments may be performed off-line and the results installed into the embedded
<Desc/Clms Page number 15>
computing device. For example, a computer program ("configuration tool") running on a PC or similar could examine the static data and perform the pre-calculation.
Additionally or alternatively, the embedded computing device could perform pre- calculation of checksum fragments on any data once its value becomes known. This confers several advantages, including that calculation is performed once for data that might be transmitted many times, and that calculation can take place when processing resources are available, reducing load when transmission actually takes place.
According to an eleventh aspect of the present invention, there is provided an embedded computing device adapted for connection to a network by way of a plurality of connections, wherein the embedded computing device is programmed so as to make use of advanced knowledge of which of the plurality of connections it will use by default to listen for incoming data communication in order automatically to bind to those connections without any run-time application intervention.
According to a twelfth aspect of the present invention, there is provided a method of connecting an embedded computing device to a network by way of at least one of a plurality of connections, wherein the embedded computing device is programmed so as to make use of advanced knowledge of which of the plurality of connections it will use by default to listen for incoming data communication in order automatically to bind to those connections without any run-time application intervention.
Bound Connections. Connections that are used to provide services (e. g. an HTTP web server listening on port 80) must be bound to the port to become"active listeners". By capturing this information off-line, it is possible to automatically bind such connections at startup, removing the overhead associated with executable initialization code to perform the bind operation. Connection control blocks are statically allocated (since it is known in advance how many of them there must be and what they must consist of). They may even be placed directly in ROM if there
<Desc/Clms Page number 16>
no variable fields in the control block. For example, in an offline configuration tool, the user declares: connection web { listen on ip 192. 168.1. 1 port 80; activate task http~server ; } and then declares the task body (using the single-shot paradigm described above in connection with the seventh and eighth aspects of the present invention) as:
t task http~server (flags: in netflags) is if (flags. DATA~READY = true) then u: url ; net-read (u); serve page (u); further detail elided end if; further detail elided end task ; The runtime startup code initialises the connection control block along with all other initialised data in the system; the connection is established and"listening"as soon the TCP/IP stack is initialised, and the task is activated whenever an event occurs on the connection, thereby saving the memory used in the binding calls and dynamic creation of the connection control block. This automatic binding of listeners is also advantageous in that it means the connection is ready to serve requests as soon as the datalink is established.
According to a thirteenth aspect of the present invention, there is provided an embedded computing device including a server application and an off-line software tool, the embedded computing device being adapted send outgoing messages over a data link, wherein the off-line software tool is adapted to pre-segment the outgoing messages into segments which fit within a predetermined MTU limit of the data link so that the messages can be transmitted piece-wise without buffering.
According to a fourteenth aspect of the present invention, there is provided a method of sending messages from an embedded computing device over a data link, the embedded computing device including a server application and an off-line software
<Desc/Clms Page number 17>
tool, wherein the off-line software tool pre-segments outgoing messages into segments which fit within a predetermined MTU limit of the data link so that the messages can be transmitted piece-wise without buffering.
Segmentation of messages. Off-line knowledge of the MTU value and the element structure for outgoing messages is combined in order to partition large messages into segments that fit within the MTU. This avoids the run-time cost that would otherwise be associated with dynamic checking and partitioning to observe the MTU if message data was just"streamed"out. For example, consider a datalink with an MTU that allows (after all headers have been taken into account) 10 bytes of data per segment. In an offline configuration tool embodying aspects of the present invention, large messages are automatically segmented into a set of discrete"chunks"that can be passed to the TCP/IP stack whole-there is no thus need to buffer outgoing data.
For example the following unsegmented message is longer than the MTU. To send it, a typical TCP/IP stack requires a buffer of size equivalent to the MTU to break it into chunks that fit into a segment. message m { "now is the time for all good men to come to the aid of the party." ; } Since it is desired to avoid the need for buffering, the message is transformed to: message ml {
chunk "Now is the" ; -- guaranteed to fit inside MTU chunk "time for a" ; chunk "11 good me" ; chunk "n to come" chunk "to the aid" ; chunk "of the par" ; chunk"ty." ; } It is then necessary to iterate over the chunks, copying each of them (e. g. directly out from ROM) directly to the data link. The data can then be spooled chunk-by-chunk without a buffer, as it is guaranteed that each chunk constitutes a"full"TCP/IP segment in its own right.
<Desc/Clms Page number 18>
In addition, it is possible to create outgoing message/chunk structures to support the transmission of large messages with dynamic content as described in connection with the third and fourth aspects of the present invention above.
In order to illustrate the off-line calculation and processing aspects of embodiments of the present invention, reference shall now be made by way of example to the accompanying Figure, which illustrates the use of an off-line tool for use with the embedded computing devices described hereinbefore.
The Figure illustrates the relationships and flow of data involving an off-line tool as referred to above to generate components related to TCP/IP that are acted upon by an embedded computing device.
The part above the dotted line in the Figure indicates that an off-line tool translates from an abstract (user-domain, human readable) system description to a representation suitable for inclusion in an embedded computing device. This translation process adds many novel optimisations to the system representation, as described elsewhere in the present application.
The part below the dotted line in the Figure shows one way in which the off-line tool can fit into a conventional software development process for embedded computing devices. It is illustrative rather than prescriptive.
The description of the system properties might take one or more of several possible forms. Examples are some textual form such as the examples used elsewhere, or a data capture and presentation using a GUI (Graphical User Interface).
The content of the system description can include (but is not limited to) some or all of the properties described elsewhere in the present application (connections whose pre-binding is desired, data for transmission ["messages"] with an indication of their
<Desc/Clms Page number 19>
static and dynamic components, indication of active files and their associated callbacks etc.).
The generated components can include (but are not limited to) some or all of the embedded device components described elsewhere in the present application (e. g. constant parts of messages and their associated partial checksums, pre-initialisation of connection bindings, messages partition to fit within MTU).
I Various algorithms within the off-line tool create the components required by the aspects of the present invention described elsewhere in the present application. The off-line tool thus forms a convenient means to deploy these aspects of the invention.
<Desc/Clms Page number 20>
Glossary
API"Application Programmer Interface"-the set of functions made available by a software component to a programmer wishing to make use of the services it provides. checkpoint a saved state (such as partially receive known good data) in a form that the application can roll back to (e. g. to undo the effect of tentative acceptance of data which turns out to be incorrect). checksum a simple calculation performed over data to provide indication of corruption; when a system receives checksummed data it recalculates the checksum itself and if there is any discrepancy some error indication is raised. datalink the medium over which TCP/IP data is being transmitted FTP File Transfer Protocol, a mechanism of moving files between computers, typically implemented on top of the Transmission Control Protocol HTTP Hypertext Transfer Protocol, the protocol used to serve World Wide Web pages. Typically layered on top of the Transmission Control Protocol Internet formally, any structure formed of two or more networks on which computers speak the Internet Protocol. Informally, the world-wide agglomeration of such networks.
IP the Internet Protocol Microcontroller a (typically small) microprocessor intended for use in control applications, with some on-board ROM, RAM and input/output devices.
MTU Maximum Transmission Unit ; the maximum length of a TCP/IP segment. This varies over different datalinks.
NAK"Negative Acknowledge"-to refuse an offered option PPP the Point-to-Point protocol-a means of encapsulating and transmitting various networking protocols including the Internet Protocol suite over
<Desc/Clms Page number 21>
datalinks including asynchronous serial communication lines RAM Random Access Memory :"working store"in a computer system whose content may be both read and written during program execution ROM Read Only Memory: memory whose content may not be changed by program execution segment the unit of TCP/IP transmission; a packet of information containing host, destination and protocol information and a"payload"of data.
SQL Structured Query Language, a means of describing and querying database systems TCP Transmission Control Protocol - a reliable end-toend protocol layered on top of the Internet Protocol (IP) TCP/IP stack the suite of software allowing a computer to connect to the Internet UDP a User Datagram Protocol layered on top of the Internet Protocol I

Claims (22)

CLAIMS:
1. An embedded computing device including a server application for receiving data transmitted to the embedded computing device under TCP/IP, wherein the server application is adapted to extract and buffer only predetermined portions of the transmitted data which are necessary for correct operation of the embedded computing device.
2. An embedded computing device as claimed in claim 1, adapted to transmit data under TCP/IP, which data is too large to be held by available RAM in the embedded computing device, wherein the embedded computing device is adapted to intermix dynamic data content which must be held in RAM with static data content which is held in ROM, and to separate the dynamic data held in RAM from the static data content held in ROM by way of a predetermined off-line calculation mechanism which generates discrete data packets each of which will fit into an MTU (Maximum Transmission Unit).
3. An embedded computing device adapted to transmit data under TCP/IP, which data is too large to be held by available RAM in the embedded computing device, wherein the embedded computing device is adapted to intermix dynamic data content which must be held in RAM with static data content which is held in ROM, and to separate the dynamic data held in RAM from the static data content held in ROM by way of a predetermined off-line calculation mechanism which generates discrete data packets each of which will fit into an MTU (Maximum Transmission Unit).
4. An embedded computing device as claimed in any preceding claim, adapted to negotiate PPP (Point-to-Point Protocol) options under TCP/IP by sending explicit reject and NAK (Negative AcKnowledge) messages as soon as a PPP option is received.
<Desc/Clms Page number 23>
5. An embedded computing device as claimed in claim 2, claim 3 or any claim depending from claim 3, adapted to utilise pre-computed TCP/IP communication session characteristics determined off-line, the characteristics comprising pre- calculated and stored partial checksums taken over static sections of data to be transmitted, wherein the embedded computing device combines pre-calculated partial checksum data with checksum data calculated for dynamic data content when transmitting data.
6. An embedded computing device as claimed in claim 2, claim 3 or any claim depending from claim 3, including a server application and an off-line software tool, the embedded computing device being adapted send outgoing messages over a data link, wherein the off-line software tool is adapted to pre-segment the outgoing messages into segments which fit within a predetermined MTU limit of the data link so that the messages can be transmitted piece-wise without buffering.
7. An embedded computing device adapted to utilise pre-computed TCP/IP communication session characteristics determined off-line, the characteristics comprising pre-calculated and stored partial checksums taken over static sections of data to be transmitted, wherein the embedded computing device combines precalculated partial checksum data with checksum data calculated for dynamic data content when transmitting data.
8. An embedded computing device including a server application and an off-line software tool, the embedded computing device being adapted send outgoing messages over a data link, wherein the off-line software tool is adapted to presegment the outgoing messages into segments which fit within a predetermined MTU limit of the data link so that the messages can be transmitted piece-wise without buffering.
9. An embedded computing device operating under TCP/IP in which an application task consumes no dynamic resources except when dealing with
<Desc/Clms Page number 24>
communications activity, wherein the embedded computing device is adapted to associate the application task as a servant for a connection such that the application task is passive until its execution is triggered by activity on the connection served.
10. An embedded computing device adapted for connection to a network by way of a plurality of connections, wherein the embedded computing device is programmed so as to make use of advanced knowledge of which of the plurality of connections it will use by default to listen for incoming data communication in order automatically to bind to those connections without any run-time application intervention.
11. A method of processing data transmitted to an embedded computing device under TCP/IP, wherein a server application provided in the embedded computing device is adapted to scan the transmitted data and to extract and buffer only predetermined portions of data which are necessary for correct operation of the embedded computing device.
12. A method according to claim 11, further comprising a step of transmitting data from the embedded computing device under TCP/IP, which data is too large to be held by available RAM in the embedded computing device, wherein dynamic data content which must be held in RAM is intermixed with static data content which is held in ROM, and wherein the dynamic data held in RAM is then separated from the static data content held in ROM by way of a predetermined off-line calculation mechanism which generates discrete data packets each of which will fit into an MTU (Maximum Transmission Unit).
13. A method of transmitting data from an embedded computing device under TCP/IP, which data is too large to be held by available RAM in the embedded computing device, wherein dynamic data content which must be held in RAM is intermixed with static data content which is held in ROM, and wherein the dynamic data held in RAM is then separated from the static data content held in ROM by way
<Desc/Clms Page number 25>
of a predetermined off-line calculation mechanism which generates discrete data packets each of which will fit into an MTU (Maximum Transmission Unit).
14. A method according to any one of claims 11 to 13, further comprising a step of negotiating PPP (Point-to-Point Protocol) options under TCP/IP in an embedded computing device by sending explicit reject and NAK (Negative AcKnowledge)
messages as soon as a PPP option is received.
1
15. A method according to claim 12, claim 13 or any claim depending from claim 13, wherein TCP/IP communication session characteristics are pre-computed off-line by pre-calculating and storing partial checksums over static sections of data to be transmitted, and wherein the embedded computing device then combines precalculated partial checksum data with checksum data calculated for dynamic data content when transmitting data.
16. A method according to claim 12, claim 13 or any claim depending from claim 13, further comprising a step of sending messages from the embedded computing device over a data link, the embedded computing device including a server application and an off-line software tool, wherein the off-line software tool presegments outgoing messages into segments which fit within a predetermined MTU limit of the data link so that the messages can be transmitted piece-wise without buffering.
17. A method of operating an embedded computing device whereby TCP/IP communication session characteristics are pre-computed off-line by pre-calculating and storing partial checksums over static sections of data to be transmitted, and wherein the embedded computing device then combines pre-calculated partial checksum data with checksum data calculated for dynamic data content when transmitting data.
<Desc/Clms Page number 26>
18. A method of sending messages from an embedded computing device over a data link, the embedded computing device including a server application and an offline software tool, wherein the off-line software tool pre-segments outgoing messages into segments which fit within a predetermined MTU limit of the data link so that the messages can be transmitted piece-wise without buffering.
19. A method of operating an embedded computing device under TCP/IP such that an application task consumes no dynamic resources except when dealing with communications activity, wherein the embedded computing device is adapted to associate the application task as a servant for a connection such that the application task is passive until its execution is triggered by activity on the connection served.
20. A method of connecting an embedded computing device to a network by way of at least one of a plurality of connections, wherein the embedded computing device is programmed so as to make use of advanced knowledge of which of the plurality of connections it will use by default to listen for incoming data communication in order automatically to bind to those connections without any run-time application intervention.
21. An embedded computing device substantially as hereinbefore described.
22. A method of operating an embedded computing device substantially as hereinbefore described.
GB0116549A 2001-07-06 2001-07-06 Improvements relating to reduction of resource usage in TCP/IP Implementation Expired - Fee Related GB2377595B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
GB0116549A GB2377595B (en) 2001-07-06 2001-07-06 Improvements relating to reduction of resource usage in TCP/IP Implementation
PCT/GB2002/003123 WO2003005672A2 (en) 2001-07-06 2002-07-05 Improvements relating to reduction of resource usage in tcp/ip implementation
US10/191,875 US20030145101A1 (en) 2001-07-06 2002-07-08 Reduction of resource usage in TCP/IP implementation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
GB0116549A GB2377595B (en) 2001-07-06 2001-07-06 Improvements relating to reduction of resource usage in TCP/IP Implementation

Publications (3)

Publication Number Publication Date
GB0116549D0 GB0116549D0 (en) 2001-08-29
GB2377595A true GB2377595A (en) 2003-01-15
GB2377595B GB2377595B (en) 2004-12-15

Family

ID=9918045

Family Applications (1)

Application Number Title Priority Date Filing Date
GB0116549A Expired - Fee Related GB2377595B (en) 2001-07-06 2001-07-06 Improvements relating to reduction of resource usage in TCP/IP Implementation

Country Status (1)

Country Link
GB (1) GB2377595B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998040826A2 (en) * 1997-03-13 1998-09-17 International Business Machines Corporation Kiosk and server connected to computer network
WO2001022680A2 (en) * 1999-09-21 2001-03-29 Telefonaktiebolaget Lm Ericsson (Publ) Launching application from embedded indicator in short message service message

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BR9707253A (en) * 1996-01-31 1999-06-01 Ipsilon Networks Inc Processes of transmitting packages between an upstream node and a downstream node in a network and of switching a flow in a first node computer program product Basic switching unit in a system for transmitting packets in a network switch port unit and switching agent
GB2360608B (en) * 1999-10-22 2004-06-02 Roke Manor Research A fully integrated web activated control and monitoring device
EP1187015A3 (en) * 2000-05-09 2003-01-29 Yipee!, Inc. Internet-enabled embedded device
US7117239B1 (en) * 2000-07-28 2006-10-03 Axeda Corporation Reporting the state of an apparatus to a remote computer
GB2367726B (en) * 2000-10-07 2003-04-23 Complementary Tech Ltd Communications with remote embedded applications
EP1340357B1 (en) * 2000-10-07 2010-01-13 Amscreen Group Limited Remote communications with a vending machine using call back

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998040826A2 (en) * 1997-03-13 1998-09-17 International Business Machines Corporation Kiosk and server connected to computer network
WO2001022680A2 (en) * 1999-09-21 2001-03-29 Telefonaktiebolaget Lm Ericsson (Publ) Launching application from embedded indicator in short message service message

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BYTE (Internat'l Edn) Sep 1997, McGraw-Hill, USA, vol20,no.9,pp.45-46, Howard Met al, "Managing Devices within the Web" *
Embedded System Engineering, Nov/Dec 2001, UK, Vol.9, No.8, pages 34-35, M.Burhardt, "An embedded alternative for web serving". *

Also Published As

Publication number Publication date
GB2377595B (en) 2004-12-15
GB0116549D0 (en) 2001-08-29

Similar Documents

Publication Publication Date Title
US20030145101A1 (en) Reduction of resource usage in TCP/IP implementation
US9009326B2 (en) System and method for managing connections between a client and a server
US6289012B1 (en) High concurrency data download apparatus and method
US9264366B2 (en) Method and apparatus for processing received network packets on a network interface for a computer
US6751665B2 (en) Providing window updates from a computer to a network interface device
US7089289B1 (en) Mechanisms for efficient message passing with copy avoidance in a distributed system using advanced network devices
US6820269B2 (en) Method and apparatus for improving performance in a network with high delay times
US6208651B1 (en) Method and system for masking the overhead of protocol layering
US7472156B2 (en) Transferring control of a TCP connection between devices
EP0749597B1 (en) Distributed protocol framework
US6799200B1 (en) Mechanisms for efficient message passing with copy avoidance in a distributed system
EP1228438A4 (en) System and method for managing connections between clients and a server with independent connection and data buffers
US20080256271A1 (en) Methods and apparatus for reducing storage usage in devices
van Renesse Masking the overhead of protocol layering
WO2020154223A1 (en) Systems and methods for processing network traffic using dynamic memory
Dunkels The uIP embedded TCP/IP stack
O'Malley et al. TCP extensions considered harmful
WO2008073493A2 (en) Methods and apparatus for reducing storage usage in devices
GB2377595A (en) Reduction of resource usage in TCP/IP implementation with embedded computing devices
Zhao et al. SpliceNP: a TCP splicer using a network processor
Vessey et al. Implementing berkeley sockets in system v release 4
MacGregor et al. Wireless Middleware
Calls Distributed systems
Jia et al. Interprocess Communication Using Message Passing
Stoess Porting LibRIPC to iWARP

Legal Events

Date Code Title Description
732E Amendments to the register in respect of changes of name or changes affecting rights (sect. 32/1977)
PCNP Patent ceased through non-payment of renewal fee

Effective date: 20170706