Implementation of Stateless Transport Protocols in ns-3 e-mail: D.Ju. Chalyy chaly@uniyar.ac.ru P.G. Demidov Yaroslavl State University, Yaroslavl, Russia May 14, 2015 D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 1 / 16
TCP Architecture Originally from 1980s: in-order delivery, loss recovery, congestion control; Many major improvements: new congestion control algorithms etc.; Tons of minor improvements: bug fixes, specific corrections etc. D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 2 / 16
Stateless architecture - Store no application state on your servers Application TCP server Local state NetworkAWS TipsTCP I Wish clienti d Known Before Application I Started Local state (https://wblinks.com/notes/aws-tips-i-wish-id-known-before-i-started/) Acks Application Request Stateless server Stateless packet processing Network Requests Stateful client Connection state Application Request Must retain in-order delivery, loss recovery, congestion control. D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 3 / 16
Application TCP server Trickles protocol Local state Acks Network TCP client Local state Application Application Request Stateless server Stateless packet processing Network Requests Stateful client Connection state Application Request Developed in Cornell in 2000s: A. Shieh, A.C. Myers, E.G. Sirer, A Stateless Approach to Connection-Oriented Protocols, ACM Trans. Comput. Syst., Vol. 26, No 3, Sept., 2008, 50 p. Sample implementation exists for Linux kernel (last commit in 2006) D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 4 / 16
Trickles congestion control Server A Client time Trickle management: split, continue, terminate; Follows Reno congestion control algorithm: slow start, congestion avoidance, fast retransmit. D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 5 / 16
Overview of Trickles model in ns-3 ns3::tricklesserver ::HandleRead ::SendTo ns3::tricklessocketbase ::ForwardUp ::Send ns3::tricklesl4protocol ns3::tricklessink ns3::tricklesshieh ::HandleRead ::Recv(QUEUE_RECV) ::NewRequest ::Send ns3::tricklessocketbase ::Send ::ProcessTricklesPacket ::ForwardUp ::Send ns3::tricklesshieh ns3::tricklesl4protocol Source code is available at https://github.com/dchaly/stateless D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 6 / 16
Stages of modeling in ns-3 Build a model of your own protocol or use existing ones. Describe an experiment using ns-3 classes. Compile, run and get a trace file: D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 7 / 16
Research pipeline Author Cleaning Analytic code Presentation code Figures Raw Analytic Computational results Tables Article Numerical summaries Text Reader D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 8 / 16
Research pipeline with ns-3 Author Cleaning Analytic code Presentation code Figures Raw Analytic Computational results Tables Article Numerical summaries Text Reader D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 9 / 16
Atoolforfillingthepipeline Key insight: use science methods. Use R! Free software for statistical computing Tons of packages for different needs (CRAN) R-studio is a free IDE for developing http://www.r-project.org D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 10 / 16
Research pipeline Author Use R! Cleaning R frame Use R! Analytic code Use R! Presentation code R structures Figures Raw Analytic Computational results Tables Article Numerical summaries Text Reader D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 11 / 16
Literate programming Introduced by D. Knuth in 1984 Essentially a programming language and a documentation system ns-3 uses C++ and Doxygen, thus it follows the literate programming ideas How to introduce the concept of literate programming to experiments? D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 12 / 16
R+Markdown+knitr+ns-3 R is a programming language Markdown is a documenation language knitr is an R package that ties R and Markdown and produces areport R executes ns-3 using shell commands and parses stdout and stderr D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 13 / 16
Simple experiment Server r Mbit/s, d ms Client r = {1.0Mb/s, 2.0Mb/s, 3.0Mb/s}; b = {10ms, 55ms, 100ms}; queue length varies from 70 to 100 with the step of 5 packets. R Markdown source code is available at https://github.com/dchaly/stateless/ns-3.20/ns3-stateless-report.rmd D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 14 / 16
Experimental evaluation Performance, MB 8 7 6 5 4 3 2 1 0 8 7 6 5 4 3 2 1 0 8 7 6 5 4 3 2 1 0 1 Mb 2 Mb 3 Mb 70 80 90 100 70 80 90 100 70 80 90 100 Queue size, packets 10 ms 55 ms 100 ms TCP Reno Trickles D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 15 / 16
Future work More model evaluations, testing and debugging Develop new stateless protocols Performance analysis of stateless protocols in different settings: wired, wireless, SDN etc. D.Ju. Chalyy: Implementation of Stateless Transport Protocols in ns-3 16 / 16