sidnet-swans - aminer · sidnet-swans prof. peter scheuermann ... free-space or two-ray pathloss. 9...
TRANSCRIPT
1
SIDnet - SWANS
Prof. Peter Scheuermann
EECS 510
11/10/2008 Presenter: Oliviu C. Ghica
Outline
� JiST/SWANS motivation
� The JiST engine
� SWANS
� SIDnet
� References
2
Motivation
� Real-world sensor networks are large
� University campus (~10K sensors)
� United States Military Apps (~100K sensors)
� Smart Dust (~1M+ sensors)
� Discrete event simulation
� Preferred over real HW implementation in large scale
sensor networks because
� Easy to do PoC (Proof of Concepts)
� Reduces development
� Time
� Costs
Motivation
� Existing Wireless Simulators� Ns2 (the GOLD standard)
� C++/Tcl
� Primarely designed for TCP simulations
� Scalability : < 5K nodes
� PDNS� Parallel, distributed version of ns2
� Scalability : < 100K nodes
� GloMoSim� Parsec (custom C-like language)
� Scalability: < 10K nodes
� SWAN� Parallel, distributed, uses DaSSF framework
� Similar capabilities to GloMoSim
� Scalability: < 100K nodes
� OpNet� Popular commercial option
� Poor scalability
3
Motivation
� JiST/SWANS
�Does not use a dedicated language� Uses regular Java language
� Hence, you get implicit optimizations, concurrency control, portability, fault-tolerance, etc
�Event-oriented
�Achieves scalabilities of +1M nodes (core-engine capability only) with lower CPU/Memory demands than other simulators
Motivation
Source: Scalable Simulation of Mobile Ad Hoc Networks, Rimon Barr
4
Motivation
Source: Scalable Simulation of Mobile Ad Hoc Networks, Rimon Barr
JiST Engine
� Java in Simulation Time� Gives you control over the time
� Converts a virtual machine into a simulation platform
� No new language, BUT you need to learn a new, simple API
� Merges modern languages with simulation semantics
� Efficient & Transparent
5
JiST Architecture� Converts a standard .java file using a generic java compiler
� The simulation .class files are dynamically rewritten to incorporate simulation time semantics
� Progress of time is dependent on the progress of the program
� Instructions take zero (simulation) time
� Time is explicitly advanced by the program: sleep (time)
� Rewritten program interacts with simulation kernel
Source: Scalable Simulation of Mobile Ad Hoc Networks, Rimon Barr
Java Application under JiST
import jist.runtime.JistAPI;
class HelloWorld {
public static void main(String[] args) {
System.out.println(“Helloworld app started“);
Thread.sleep(3000); // sleep for 3 second (3000ms)
display(3);
Thread.sleep(2000); // sleep for 2 second
display(2);
Thread.sleep(1000); // sleep for 1 second
display(1);
}
public void display(int contor)
{
System.out.println(“Hello #” + contor);
}
}
# java jist.runtime.Main HelloWorld
> Helloworld app started
> Hello #3 -> RTC: 3000 ms
> Hello #2 -> RTC: 5000 ms
> Hello #1 -> RTC: 6000 ms
6
Java Application under JiST
import jist.runtime.JistAPI;
class HelloWorld implements JistAPI.Entity{
public static void main(String[] args) {
System.out.println(“Helloworld app started“);
JistAPI.sleep(3000); // sleep for 3 second (3000ms)
display(3);
JistAPI.sleep(2000); // sleep for 2 second
display(2);
JistAPI.sleep(1000); // sleep for 1 second
display(1);
}
public void display(int contor)
{
System.out.println(“Hello #” + contor + “ @ time=“+JistAPI.getTime() / Constants.SECOND + “s”);
}
}
# java jist.runtime.Main HelloWorld
> Helloworld app started
> Hello #3 @time = 3s -> RTC: 00000001 ns
> Hello #2 @time = 5s -> RTC: 00000006 ns
> Hello #1 @time = 6s -> RTC: 00000007 ns
JistAPI.sleep() vs JistAPI.sleepBlock()import jist.runtime.JistAPI;
class HelloWorld implements JistAPI.Entity{
public static void main(String[] args) {
System.out.println(“Helloworld app started“);
display(3);
display(2);
display(1);
}
public void display(int val)
{
System.out.println(“Display function # “ +val +” invoked @ time=“ + JistAPI.getTime() / Constants.SECOND + “s”);
JistAPI.sleep(val * 1000); // sleep for “val” seconds
System.out.println(“Hello #” + contor + “ @ time=“+JistAPI.getTime() / Constants.SECOND + “s”);
}
}
# java jist.runtime.Main HelloWorld
> Helloworld app started
> Display function #3 invoked @time = 0s -> RTC: 00000001 ns
> Hello #3 @time = 3s -> RTC: 00000001 ns
> Display function #2 invoked @time = 3s -> RTC: 00000006 ns
> Hello #2 @time = 5s -> RTC: 00000006 ns
> Display function #1 invoked @time = 5s -> RTC: 00000009 ns
> Hello #1 @time = 6s -> RTC: 00000009 ns
7
JistAPI.sleep() vs JistAPI.sleepBlock()import jist.runtime.JistAPI;
class HelloWorld implements JistAPI.Entity{
public static void main(String[] args) {
System.out.println(“Helloworld app started“);
display(3);
display(2);
display(1);
}
public void display(int val)
{
System.out.println(“Display function #” + val +”invoked @ time=“ + JistAPI.getTime() / Constants.SECOND + “s”);
JistAPI.sleepBlock(val * 1000); // sleep for “val” seconds
System.out.println(“Hello #” + val + “ @ time=“+JistAPI.getTime() / Constants.SECOND + “s”);
}
}
# java jist.runtime.Main HelloWorld
> Helloworld app started
> Display function #3 invoked @time = 0s -> RTC: 00000001 ns
> Display function #2 invoked @time = 0s -> RTC: 00000001 ns
> Display function #1 invoked @time = 0s -> RTC: 00000002 ns
> Hello #1 @time = 1s -> RTC: 00000002 ns
> Hello #2 @time = 3s -> RTC: 00000007 ns
> Hello #3 @time = 6s -> RTC: 00000010 ns
SWANS
� Scalable Wireless Ad hoc Network Simulator
� Is a JiST application
� Built on top of JiST
� Implements the networking stack
� Can run java network applications over
simulated networks
� Scales to networks of up to 1 million nodes on a
single CPU.
8
SWANS Architecture
Source: Scalable Simulation of Mobile Ad Hoc Networks, Rimon Barr
Java
JiST
SWANS
App
Simulation Stack
SWANS content
� Transport layer� UDP, TCP
� Routing� AODV, DSR, ZRP
� Network� IPv4
� Mac� IEEE 802.11b
� Radio� Independent & additive noise
� Field (radio signal fading)� Zero, Rayleigh or Rician fading
� Free-space or Two-Ray pathloss
9
SIDnet
� It is a JiST/SWANS graphical (GUI) wrapper +
� Adds Mac 802.15.4 at MAC/PHY
� + a collection of libraries for� Emulating physical fields dynamics
� study correlation between measurements of neighboring nodes
� Study moving-objects
� Models realistically and transparently the energy consumption� Sensing, processing, transmitting, receiving, moving …
� Includes an energy map pre-viewer
� Gives control over the speed of the simulation at run-time� You may slow down the simulator (or even pause it, to get a snapshot of the current state, or get a coffee break)
� Or accelerate it if the results are more important
� Designed for user interaction, without sacrificing the native JiST/SWANS performances (it will shut off graphics automatically if high speed simulations are needed)
� Great for debugging & developing new, complex algorithms� Includes tools for instant topology preview
SIDnet Architecture
Terminal (GUI)
Sensorial Field / Physical Field / Phenomena Layer
Energy Map
Statistical
Analysis
Batch
Processing
Energy
Consumption
Profile &
Manager
Simulation
Manager
(speed &
graphics
control)
Java
JiST
SWANS
App
Simulation Stack
SNSim
10
Demo Time
� …
Phenomena Layer
(Visualisation & Run-Time Interaction
SPEED CONTROLIntegrated Context Menu
User Defined: Energy Map
Run-time Information Retrieval & Logging
11
SIDnet Snapshot
12
Debugging Tools: PacketFX
13
References
� http://jist.ece.cornell.edu/docs.html
�JiST User Guide
�SWANS User Guide
� SIDnet distribution & User Guide� http://www.ece.northwestern.edu/~ocg474/SIDnet.html
� Need help?
� Google won’t help since this is an in-house developed simulator