180 likes | 324 Views
An Improved TCP for transaction communications on Sensor Networks. Tao Yu Tsinghua University 2/8/2010. Why do we use IP based TCP for wireless communication?.
E N D
An Improved TCP for transaction communications on Sensor Networks Tao Yu Tsinghua University 2/8/2010
Why do we use IP based TCP for wireless communication? • Enable wireless sensor networks connect to the external networks to let monitoring and controlling entities communicate with the sensors • Seamlessly integrate wireless sensor networks or Internet of things into the current and future Internet • Force the current Internet to evolve rapidly by considering the demanding requirement of emerging network infrastructure and new applications based on it
What’s transaction communication? The transaction communications have the following characters: • first the fundamental interaction is a request followed by a response; • Second explicit open and close phases in traditional TCP impose excessive overhead in terms of the effective packet number, minimal response time and lowest power consumption per communication task; • Third at-most-once semantics is required, which means a transaction must not be "replayed" as the result of a duplicate request packet; • Fourth the minimum transaction latency will be RTT+SPT where RTT is the round-trip time and SPT is the server processing time, which is important to real-time applications
Working process of traditional TCP for transaction communications There must be ten segments (packets) exchanged in 5 round trips • three for the 3-way handshake opening the connection(in 1.5 round trips) • four to send and acknowledge the request and response data(in 2 round trips) • and three for TCP's full-duplex data-conserving close sequence(in 1.5 round trips)
Working process of current TCP for transaction communications There are still 5 segments (packets) exchanged in 2.5 round trips under the new rules of TCP which allow data segment with SYN and FIN bit set
Drawback of regular TCP for transaction communications There are relative high overhead compared with the minimum requirements: • At least 5 segment vs. 2 segment • At least 2.5 round trips vs. 1 round trip • Minimum response latency 2*RTT + SPT vs. RTT + SPT
Application paradigm for wireless sensor networks or Internet of things • sensors or objects usually only need to contact the pre-determined server/controller, and they need not exchange data between each other directly • both the request and the response data is small enough to be loaded in one or two packets where T/TCP could be utilized to achieve great communication benefit in extremely constrained circumstance with demanding requirements.
Optimization Method • Compress the connection setup and teardown processes • Truncate the TIME-WAIT state in TCP
Bypassing the Three-way Handshake using TCP Accelerated Open(TAO) • Validate the initial SYN segment immediately upon receiving it, which is called as the TCP Accelerated Open (TAO) • the timestamp of last connection request from remote peer is used as the cached state
The Minimum sequences using TAO for transaction communications
Truncate the TIME-WAIT state using time synchronization • two functions of TIME-WAIT state: (1) supporting the full- duplex reliable close of TCP, and (2) allowing old duplicate segments from an earlier connection incarnation to expire before they can cause an error • formula for the TIME-WAIT delay TIME-WAIT_Delay = max( K*RTO, U ) By estimating the one-way delay accurately, we can truncate the TIME-WAIT state
The difficulties of RRT measurement in transactions • With the minimal 3-segment exchange, there can be exactly one RTT measurement in each direction for each transaction. • dynamic estimation of RTT must take place across successive transactions. So additional cache for the measured RTT and RTT variance values is essential for transaction processing. • What’s more, the inference of new RTT from old ones is not accurate especially in dynamic wireless environment
The thought of time synchronization Let’s suppose that the clock counter values for host A and host B are T(A)1, T(B)1 separately at some absolute time T1, T(A)2, T(B)2 at some absolute time T2, then we get: TA*(T(A)2-T(A)1)=TB*(T(B)2-T(B)1) Where TA and TB are the periods of tick of host A and host B. Then we can get the following formula: (T(A)2-T(A)1)/ (T(B)2-T(B)1) = (T(A)3-T(A)2)/ (T(B)3-T(B)2) Where T(A)3 and T(B)3 are the clock counter values for host A and host B at some absolute time T3. For host A, the formula means that if it has the value of T(A)1, T(B)1 , T(A)2, T(B)2 , at any time T3 it can figure out the clock counter value of host B. For host B, it is the same.
The problems for the improved TCP with incomplete information • The cached states may be incomplete or non-existence • The machine time of server or controller may be adjusted manually Solution: Our improved T/TCP is compatible with the traditional TCP and after at least one interval of Threshold and two transactions, it will resume normal that the TIME-WAIT delay will be truncated.
Our contributions in this paper • Explicitly propose to use timestamp for the “connection count”(CC) and analyze its feasibility for sensor application • There is only one CC for each connection in both directions, which is simpler than the original T/TCP • Develop a new method for T/TCP to measure the RTT accurately and truncate the TIME-WAIT state more effectively
Summary The benefit of the improved T/TCP for transaction communication • Lower overhead in terms of segment number • Improved response latency • Decreased computational resource expenditure • Reduced power consumption