© 2010 David Gustafsson Time out interval estimate

The last week

The last week I have been busy with assignments, the gym, tennis, few parties and replies for summer job offers. Since I get back to Sweden late in the summer it has been hard to find jobs. However I have had two good offers with substantial interesting projects. I turned down an offer working with SAP and the management decision system program QLinkView. Or QLinkView is not really a MDS but a program for building management decision systems using different data sources.

I ended up very close to where I have been the previous two summers at ABB working with development of calculation/simulation tools. Working with MatLab is always a challenge.

From a topic to another. In school I have been working on my last programming assignment in computer networking. The task is to implement a reliable transport protocol similar to TCP. This is not a trivial task. Internet is a best effort network which implies that packets can be lost, delayed or reordered between a sending host and a receiver. To guarantee a reliable transfer between the two hosts can’t be made possible by the network and hence it must be implemented in the end systems. Timers, sequence numbers, acknowledgements and buffering are a few mechanisms that is used. Today I have mostly done testing and validation. One issue is how to determine the time out interval for a packet. When can the sender be sure to a certain probability that a packet has been lost? One way is to constantly measure how long it takes for a packet to be transmitted to the receiver and for the acknowledgement to get back. This estimate will fluctuate over time. A moving average is therefore used that exponentially discounts early data measures in favour for new ones. The time out interval is finally decided by taking the deviation into account. This is actually how TCP does it in the internet as well:

estimatedRTT = a*sampleRTT + (1-a)*estimatedRTT;
devRTT = Math.abs(estimatedRTT-sampleRTT)*b + devRTT*(1-b);
timeoutInterval = (estimatedRTT + devRTT*4);

Time out interval estimate

Time out interval estimate

Finally I want to share my new hobby with you; tennis! I have been competing successfully against Norway a few times. Two matches have resulted in two tie-break victories.

Time to go to bed.