3. How the project came to be
Lacage ns-3: History and Future March 2012 3 / 27
4. How the project came to be
Multiple partners:
Lacage ns-3: History and Future March 2012 3 / 27
5. How the project came to be
Multiple partners:
NSF-funded: UWA, GT, ISI
Lacage ns-3: History and Future March 2012 3 / 27
6. How the project came to be
Multiple partners:
NSF-funded: UWA, GT, ISI
INRIA-funded: planète
Lacage ns-3: History and Future March 2012 3 / 27
7. How the project came to be
Multiple partners:
NSF-funded: UWA, GT, ISI
INRIA-funded: planète
Pulling the project in multiple directions:
Real Code Long Term
Integration Survival
ns-3
Wireless Fast TCP
Education Emulation
Lacage ns-3: History and Future March 2012 3 / 27
13. Requirements
Real-code integration, Emulation:
Models must not be too abstract (Node, etc.)
Must be transparent to models
Fast TCP:
Memory efficiency of many packets in flight
Lacage ns-3: History and Future March 2012 4 / 27
17. More requirements
Education:
Must be easy to use for students
Wireless:
Lacage ns-3: History and Future March 2012 5 / 27
18. More requirements
Education:
Must be easy to use for students
Wireless:
Must have great validated wireless models
Lacage ns-3: History and Future March 2012 5 / 27
19. More requirements
Education:
Must be easy to use for students
Wireless:
Must have great validated wireless models
Long term survival:
Lacage ns-3: History and Future March 2012 5 / 27
20. More requirements
Education:
Must be easy to use for students
Wireless:
Must have great validated wireless models
Long term survival:
Maintenance: production-quality code
Lacage ns-3: History and Future March 2012 5 / 27
21. More requirements
Education:
Must be easy to use for students
Wireless:
Must have great validated wireless models
Long term survival:
Maintenance: production-quality code
Funding: NSF & INRIA funding finite
Lacage ns-3: History and Future March 2012 5 / 27
23. Long Term Survival
Hard to make enough money to maintain the code:
Lacage ns-3: History and Future March 2012 6 / 27
24. Long Term Survival
Hard to make enough money to maintain the code:
Small market (network researchers)
Lacage ns-3: History and Future March 2012 6 / 27
25. Long Term Survival
Hard to make enough money to maintain the code:
Small market (network researchers)
Large and complex code
Lacage ns-3: History and Future March 2012 6 / 27
26. Long Term Survival
Hard to make enough money to maintain the code:
Small market (network researchers)
Large and complex code
Hard to obtain funding from research agencies:
Lacage ns-3: History and Future March 2012 6 / 27
27. Long Term Survival
Hard to make enough money to maintain the code:
Small market (network researchers)
Large and complex code
Hard to obtain funding from research agencies:
Funds to use the tool
Lacage ns-3: History and Future March 2012 6 / 27
28. Long Term Survival
Hard to make enough money to maintain the code:
Small market (network researchers)
Large and complex code
Hard to obtain funding from research agencies:
Funds to use the tool
Funds to extend the tool
Lacage ns-3: History and Future March 2012 6 / 27
29. Long Term Survival
Hard to make enough money to maintain the code:
Small market (network researchers)
Large and complex code
Hard to obtain funding from research agencies:
Funds to use the tool
Funds to extend the tool
No funds to maintain the tool
Lacage ns-3: History and Future March 2012 6 / 27
32. Open Source Community
Hard to create:
Licensing is tricky
Lacage ns-3: History and Future March 2012 7 / 27
33. Open Source Community
Hard to create:
Licensing is tricky
Meritocracy
Lacage ns-3: History and Future March 2012 7 / 27
34. Open Source Community
Hard to create:
Licensing is tricky
Meritocracy
No discussions behind closed doors
Lacage ns-3: History and Future March 2012 7 / 27
35. Open Source Community
Hard to create:
Licensing is tricky
Meritocracy
No discussions behind closed doors
Must lose control to see the baby grow
Lacage ns-3: History and Future March 2012 7 / 27
36. Open Source Community
Hard to create:
Licensing is tricky
Meritocracy
No discussions behind closed doors
Must lose control to see the baby grow
Classic management problem:
Lacage ns-3: History and Future March 2012 7 / 27
37. Open Source Community
Hard to create:
Licensing is tricky
Meritocracy
No discussions behind closed doors
Must lose control to see the baby grow
Classic management problem:
Spend time to do things yourself
Lacage ns-3: History and Future March 2012 7 / 27
38. Open Source Community
Hard to create:
Licensing is tricky
Meritocracy
No discussions behind closed doors
Must lose control to see the baby grow
Classic management problem:
Spend time to do things yourself
Spend time to help others do the work
Lacage ns-3: History and Future March 2012 7 / 27
39. Open Source Community
Hard to create:
Licensing is tricky
Meritocracy
No discussions behind closed doors
Must lose control to see the baby grow
Classic management problem:
Spend time to do things yourself
Spend time to help others do the work
It is a hard pill to (make upper management) swallow
Lacage ns-3: History and Future March 2012 7 / 27
40. But the good news is...
Lacage ns-3: History and Future March 2012 8 / 27
41. But the good news is...
We (They) all swallowed it.
Lacage ns-3: History and Future March 2012 8 / 27
42. And now,
The story of how:
Lacage ns-3: History and Future March 2012 9 / 27
43. And now,
The story of how:
The Real World pervades everything
Lacage ns-3: History and Future March 2012 9 / 27
44. And now,
The story of how:
The Real World pervades everything
To implement everything 3 or 4 times
Aka, Incremental development
Lacage ns-3: History and Future March 2012 9 / 27
45. And now,
The story of how:
The Real World pervades everything
To implement everything 3 or 4 times
Aka, Incremental development
To not plan too far
Lacage ns-3: History and Future March 2012 9 / 27
51. Requirements
Transparent conversion to/from real bytes
CPU and memory efficiency
Fragmentation/Reassembly
Simulation-only data
Lacage ns-3: History and Future March 2012 11 / 27
52. Requirements
Transparent conversion to/from real bytes
CPU and memory efficiency
Fragmentation/Reassembly
Simulation-only data
Pretty printing
Lacage ns-3: History and Future March 2012 11 / 27
53. Requirements
Transparent conversion to/from real bytes
CPU and memory efficiency
Fragmentation/Reassembly
Simulation-only data
Pretty printing
Extensibility
Lacage ns-3: History and Future March 2012 11 / 27
54. Requirements
Transparent conversion to/from real bytes
CPU and memory efficiency
Fragmentation/Reassembly
Simulation-only data
Pretty printing
Extensibility
Robust Application Programming Interface (API)
Lacage ns-3: History and Future March 2012 11 / 27
56. Related Work
Two approaches
Packet is list of headers: GTNetS, OMNeT++,
SSFNet
MAC IP TCP Payload
Lacage ns-3: History and Future March 2012 12 / 27
57. Related Work
Two approaches
Packet is list of headers: GTNetS, OMNeT++,
SSFNet
MAC IP TCP Payload
Packet is buffer of bytes: Yans, GloMoSim
MAC IP TCP Payload
Lacage ns-3: History and Future March 2012 12 / 27
58. Pros and Cons
List Buffer
Fragmentation, Reassembly
Conversion real bytes
Simulation-only data
Pretty printing
CPU, memory efficiency
Lacage ns-3: History and Future March 2012 13 / 27
59. Pros and Cons
List Buffer ns-3
Fragmentation, Reassembly
Conversion real bytes
Simulation-only data
Pretty printing
CPU, memory efficiency
Lacage ns-3: History and Future March 2012 13 / 27
60. How did we get there ?
About 10 successive versions...
Lacage ns-3: History and Future March 2012 14 / 27
61. How did we get there ?
Started with a simple version in YANS:
Headers’ List
Tags
RefCounting
Sep
2005
Lacage ns-3: History and Future March 2012 14 / 27
62. How did we get there ?
Started with a simple version in YANS:
Headers’ List
Tags
RefCounting
Sep
2005
But, hard to integrate the BSD TCP stack
Lacage ns-3: History and Future March 2012 14 / 27
63. How did we get there ?
Real bytes in YANS:
Headers’ List
Tags
RefCounting
Jan
2006
Sep
2005
Real
Bytes
Lacage ns-3: History and Future March 2012 14 / 27
64. How did we get there ?
Real bytes in YANS:
Headers’ List
Tags
RefCounting
Jan
2006
Sep
2005
Real
Bytes
But, hard to manage reference counting by hand
Lacage ns-3: History and Future March 2012 14 / 27
65. How did we get there ?
Smart Pointers in YANS:
Headers’ List Smart
Tags Pointers
RefCounting
Jan
2006
Sep Jun
2005 2006
Real
Bytes
Lacage ns-3: History and Future March 2012 14 / 27
66. How did we get there ?
Smart Pointers in YANS:
Headers’ List Smart
Tags Pointers
RefCounting
Jan
2006
Sep Jun
2005 2006
Real
Bytes
But, memory & CPU performance is not good
Lacage ns-3: History and Future March 2012 14 / 27
67. How did we get there ?
Copy On Write in ns-3:
Headers’ List Smart
Tags Pointers
RefCounting
Jan Jul
2006 2006
Sep Jun
2005 2006
Real
COW
Bytes
Lacage ns-3: History and Future March 2012 14 / 27
68. How did we get there ?
Copy On Write in ns-3:
Headers’ List Smart
Tags Pointers
RefCounting
Jan Jul
2006 2006
Sep Jun
2005 2006
Real
COW
Bytes
Still, Fast TCP pushes the boundary
Lacage ns-3: History and Future March 2012 14 / 27
69. How did we get there ?
Virtual payload:
Headers’ List Smart Virtual
Tags Pointers Payload
RefCounting
Jan Jul
2006 2006
Sep Jun Aug
2005 2006 2006
Real
COW
Bytes
Lacage ns-3: History and Future March 2012 14 / 27
70. How did we get there ?
Virtual payload:
Headers’ List Smart Virtual
Tags Pointers Payload
RefCounting
Jan Jul
2006 2006
Sep Jun Aug
2005 2006 2006
Real
COW
Bytes
Really, debugging is hard
Lacage ns-3: History and Future March 2012 14 / 27
71. How did we get there ?
Packet UIDs:
Headers’ List Smart Virtual
Tags Pointers Payload
RefCounting
Jan Jul Sep
2006 2006 2006
Sep Jun Aug
2005 2006 2006
Real Packet
COW
Bytes UID
Lacage ns-3: History and Future March 2012 14 / 27
72. How did we get there ?
Packet UIDs:
Headers’ List Smart Virtual
Tags Pointers Payload
RefCounting
Jan Jul Sep
2006 2006 2006
Sep Jun Aug
2005 2006 2006
Real Packet
COW
Bytes UID
Really, debugging is still hard
Lacage ns-3: History and Future March 2012 14 / 27
73. How did we get there ?
Packet Pretty Printing:
Headers’ List Smart Virtual Pretty
Tags Pointers Payload Printing
RefCounting
Jan Jul Sep
2006 2006 2006
Sep Jun Aug May/Jun
2005 2006 2006 2007
Real Packet
COW
Bytes UID
Lacage ns-3: History and Future March 2012 14 / 27
74. How did we get there ?
Packet Pretty Printing:
Headers’ List Smart Virtual Pretty
Tags Pointers Payload Printing
RefCounting
Jan Jul Sep
2006 2006 2006
Sep Jun Aug May/Jun
2005 2006 2006 2007
Real Packet
COW
Bytes UID
But, we do need pointers
Lacage ns-3: History and Future March 2012 14 / 27
75. How did we get there ?
Pointers are back:
Headers’ List Smart Virtual Pretty
Tags Pointers Payload Printing
RefCounting
Jan Jul Sep Oct
2006 2006 2006 2007
Sep Jun Aug May/Jun
2005 2006 2006 2007
Real Packet
COW Ptr<Packet>
Bytes UID
Lacage ns-3: History and Future March 2012 14 / 27
76. What I learned the hard way
Lacage ns-3: History and Future March 2012 15 / 27
77. What I learned the hard way
The mountain seems impossibly high at first
Lacage ns-3: History and Future March 2012 15 / 27
78. What I learned the hard way
The mountain seems impossibly high at first
Forget about the top, aim for base camp
Lacage ns-3: History and Future March 2012 15 / 27
79. What I learned the hard way
The mountain seems impossibly high at first
Forget about the top, aim for base camp
The mountain grows with every new user
Lacage ns-3: History and Future March 2012 15 / 27
80. What I learned the hard way
The mountain seems impossibly high at first
Forget about the top, aim for base camp
The mountain grows with every new user
Listen to users
Lacage ns-3: History and Future March 2012 15 / 27
86. Requirements
Uniform memory management
Allow simulation configuration
Solve the object composition problem
Decouple Trace Sources from Trace Sinks
Lacage ns-3: History and Future March 2012 17 / 27
87. Requirements
Uniform memory management
Allow simulation configuration
Solve the object composition problem
Decouple Trace Sources from Trace Sinks
Allow simulation trace setup
Lacage ns-3: History and Future March 2012 17 / 27
88. Requirements
Uniform memory management
Allow simulation configuration
Solve the object composition problem
Decouple Trace Sources from Trace Sinks
Allow simulation trace setup
Do not be intrusive to Model developers
Lacage ns-3: History and Future March 2012 17 / 27
89. Fast Forward to 2012
Lacage ns-3: History and Future March 2012 18 / 27
90. Fast Forward to 2012
Memory management: Ptr<Object> + Dispose
Lacage ns-3: History and Future March 2012 18 / 27
91. Fast Forward to 2012
Memory management: Ptr<Object> + Dispose
Configuration: Attributes + ConfigStore
Lacage ns-3: History and Future March 2012 18 / 27
92. Fast Forward to 2012
Memory management: Ptr<Object> + Dispose
Configuration: Attributes + ConfigStore
Tracing: integrated in Attributes
Lacage ns-3: History and Future March 2012 18 / 27
93. Fast Forward to 2012
Memory management: Ptr<Object> + Dispose
Configuration: Attributes + ConfigStore
Tracing: integrated in Attributes
Configuration, Tracing: optional
Lacage ns-3: History and Future March 2012 18 / 27
94. Fast Forward to 2012
Memory management: Ptr<Object> + Dispose
Configuration: Attributes + ConfigStore
Tracing: integrated in Attributes
Configuration, Tracing: optional
Now on par with Omnetpp & Opnet feature-wise
Lacage ns-3: History and Future March 2012 18 / 27
95. A Windy Path
It Started with nothing
Lacage ns-3: History and Future March 2012 19 / 27
96. A Windy Path
But tom liked the ns-2 default values
Default
Value
Mar
2007
Lacage ns-3: History and Future March 2012 19 / 27
97. A Windy Path
But tom liked the ns-2 default values
Default
Value
Mar
2007
What about memory management, aggregation ?
Lacage ns-3: History and Future March 2012 19 / 27
98. A Windy Path
Here comes microsoft’s IUnknown!
Default
Value
Apr
2007
Mar
2007
IUnknown
Lacage ns-3: History and Future March 2012 19 / 27
99. A Windy Path
Here comes microsoft’s IUnknown!
Default
Value
Apr
2007
Mar
2007
IUnknown
Scratch that, everyone hates it
Lacage ns-3: History and Future March 2012 19 / 27
100. A Windy Path
Resolving trace sources: microsoft’s IMoniker
Default
IMoniker
Value
Apr
2007
Mar
2007
IUnknown
Lacage ns-3: History and Future March 2012 19 / 27
101. A Windy Path
Resolving trace sources: microsoft’s IMoniker
Default
IMoniker
Value
Apr
2007
Mar
2007
IUnknown
Hrm... So, what about memory management ?
Lacage ns-3: History and Future March 2012 19 / 27
102. A Windy Path
Reference Counting wins
Default
IMoniker
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown
Counting
Lacage ns-3: History and Future March 2012 19 / 27
103. A Windy Path
Reference Counting wins
Default
IMoniker
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown
Counting
And Cycles ?
Lacage ns-3: History and Future March 2012 19 / 27
104. A Windy Path
Dispose to Break the Cycles
Default
IMoniker Dispose
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown
Counting
Lacage ns-3: History and Future March 2012 19 / 27
105. A Windy Path
Dispose to Break the Cycles
Default
IMoniker Dispose
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown
Counting
Where is my IUnknown::QueryInterface ?
Lacage ns-3: History and Future March 2012 19 / 27
106. A Windy Path
Dynamic Aggregation
Default
IMoniker Dispose
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown Aggregation
Counting
Lacage ns-3: History and Future March 2012 19 / 27
107. A Windy Path
Dynamic Aggregation
Default
IMoniker Dispose
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown Aggregation
Counting
Ref/Unref by hand still sucks!
Lacage ns-3: History and Future March 2012 19 / 27
108. A Windy Path
Smart Pointers are back
Default
IMoniker Dispose Ptr<>
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown Aggregation
Counting
Lacage ns-3: History and Future March 2012 19 / 27
109. A Windy Path
Smart Pointers are back
Default
IMoniker Dispose Ptr<>
Value
Apr
2007
Mar May
2007 2007
Reference
IUnknown Aggregation
Counting
IMoniker is still ugly...
Lacage ns-3: History and Future March 2012 19 / 27
110. A Windy Path
Introduce Attributes
Default
IMoniker Dispose Ptr<> Attributes
Value
Apr
2007
Mar May Jan-Mar
2007 2007 2008
Reference
IUnknown Aggregation
Counting
Lacage ns-3: History and Future March 2012 19 / 27
112. With hindsight...
I wish:
we had looked at Omnetpp & Opnet before
Lacage ns-3: History and Future March 2012 20 / 27
113. With hindsight...
I wish:
we had looked at Omnetpp & Opnet before
The result is still nice thanks to:
Willingness to listen to users
Lacage ns-3: History and Future March 2012 20 / 27
114. With hindsight...
I wish:
we had looked at Omnetpp & Opnet before
The result is still nice thanks to:
Willingness to listen to users
Incremental development
Lacage ns-3: History and Future March 2012 20 / 27
115. No, it is not over
Lacage ns-3: History and Future March 2012 21 / 27
116. No, it is not over
Real Code Integration:
Linux kernel, Quagga, CCNx, etc.
Lacage ns-3: History and Future March 2012 21 / 27
117. No, it is not over
Real Code Integration:
Linux kernel, Quagga, CCNx, etc.
Contiki
Lacage ns-3: History and Future March 2012 21 / 27
118. No, it is not over
Real Code Integration:
Linux kernel, Quagga, CCNx, etc.
Contiki
TinyOS
Lacage ns-3: History and Future March 2012 21 / 27
119. No, it is not over
Real Code Integration:
Linux kernel, Quagga, CCNx, etc.
Contiki
TinyOS
Brings new challenges:
Attributes ?
Lacage ns-3: History and Future March 2012 21 / 27
120. No, it is not over
Real Code Integration:
Linux kernel, Quagga, CCNx, etc.
Contiki
TinyOS
Brings new challenges:
Attributes ?
Tracing ?
Lacage ns-3: History and Future March 2012 21 / 27
124. Configuring Attributes
Linux Kernel:
Bridge /proc/net inside the attribute system
Difficult to really map one to one
Lacage ns-3: History and Future March 2012 22 / 27
125. Configuring Attributes
Linux Kernel:
Bridge /proc/net inside the attribute system
Difficult to really map one to one
Extend Attributes to handle structures, arrays ?
Lacage ns-3: History and Future March 2012 22 / 27
126. Configuring Attributes
Linux Kernel:
Bridge /proc/net inside the attribute system
Difficult to really map one to one
Extend Attributes to handle structures, arrays ?
Other Applications:
Lacage ns-3: History and Future March 2012 22 / 27
127. Configuring Attributes
Linux Kernel:
Bridge /proc/net inside the attribute system
Difficult to really map one to one
Extend Attributes to handle structures, arrays ?
Other Applications:
I have no idea.
Lacage ns-3: History and Future March 2012 22 / 27
128. Tracing
Lacage ns-3: History and Future March 2012 23 / 27
129. Tracing
We do not want to modify the external code:
Lacage ns-3: History and Future March 2012 23 / 27
130. Tracing
We do not want to modify the external code:
Linux Kernel: Tracepoints, Ftrace, KProbe, etc.
Lacage ns-3: History and Future March 2012 23 / 27
131. Tracing
We do not want to modify the external code:
Linux Kernel: Tracepoints, Ftrace, KProbe, etc.
But no builtin tracing in general
Lacage ns-3: History and Future March 2012 23 / 27
132. Tracing
We do not want to modify the external code:
Linux Kernel: Tracepoints, Ftrace, KProbe, etc.
But no builtin tracing in general
Re-implement Kprobe, JProbe, etc. in userspace:
Lacage ns-3: History and Future March 2012 23 / 27
133. Tracing
We do not want to modify the external code:
Linux Kernel: Tracepoints, Ftrace, KProbe, etc.
But no builtin tracing in general
Re-implement Kprobe, JProbe, etc. in userspace:
Introspection using debug information
Lacage ns-3: History and Future March 2012 23 / 27
134. Tracing
We do not want to modify the external code:
Linux Kernel: Tracepoints, Ftrace, KProbe, etc.
But no builtin tracing in general
Re-implement Kprobe, JProbe, etc. in userspace:
Introspection using debug information
Dynamic patching of assembly code
Lacage ns-3: History and Future March 2012 23 / 27
138. Summary
What really matters (today):
Alignment with the Real World
Lacage ns-3: History and Future March 2012 25 / 27
139. Summary
What really matters (today):
Alignment with the Real World
An Open Source Community
Lacage ns-3: History and Future March 2012 25 / 27
140. Summary
What really matters (today):
Alignment with the Real World
An Open Source Community
Incremental development
Lacage ns-3: History and Future March 2012 25 / 27
141. Summary
What really matters (today):
Alignment with the Real World
An Open Source Community
Incremental development
No one (but you) knows where ns-3 is headed
Lacage ns-3: History and Future March 2012 25 / 27
142. Thank you !
Questions ?
Lacage ns-3: History and Future March 2012 26 / 27
143. Contact
mathieu@cutebugs.net
Lacage ns-3: History and Future March 2012 27 / 27