Download presentation
Presentation is loading. Please wait.
1
Simulator of an Asynchronous Distributed System
CS9668: Internet Algorithmics Implementation Project April 22nd, 2015 Daniel Servos
2
Specification Create Asynchronous Distributed Network Simulator
Take as input: Processors Links Algorithm Seed of each processor Delay of each link Probability that each link will fail Probability that each processor will fail Bizantine failures allowed Etc. Speeds and delays change over time GUI Easy to use
3
Specification Simulation Extras: Link bandwidth Byte errors
Different algorithms at same time Multiple algorithms on one processor Ports Pause/restart simulation Simulation statistics Directional links Deterministic simulation
4
Specification GUI Extras: GUI based network editor
Runtime algorithm loading/switching Common editing tools (copy, cut, paste, undo, redo) Export network graph as image Printing Full screen mode Zooming Logging
5
Objective Given: Settings S and starting network state To Find:
Network state Ti for a given time i
6
Synchronous Simulation
7
Synchronous Simulation
8
Synchronous Simulation
9
Synchronous Simulation
10
Synchronous Simulation
11
Asynchronous Simulation
12
Asynchronous Simulation
13
Asynchronous Simulation
14
Asynchronous Simulation
15
Asynchronous Simulation
16
Asynchronous Simulation
17
Asynchronous Simulation
18
Deterministic Approach
Maximum time required to complete one cycle of any algorithm being simulated. Max = Min = User define minimum tick speed 1 Tick = Min if Min > Max else Max
19
Deterministic Approach
20
Deterministic Approach
Delay = Delay = Delay = Delay = 3
21
Deterministic Approach
Delay = Delay = Delay = Delay = 3
22
Deterministic Approach
Delay = Delay = Delay = Delay = 3
23
Deterministic Approach
Delay = Delay = Delay = Delay = 3
24
Simulation Design
25
Simulation Design
26
Simulation Design
27
Simulation Design
28
Simulation Design
29
Simulation Design
30
Simulation Design
31
Simulation Design M Pi M
32
Simulation Design Tick Update Network Manager
33
Simulation Design M
34
Simulation Design
35
Simulation Design
36
Simulation Design
37
Simulation Design
38
Simulation Design
39
GUI Design
40
Interthread Communication
Event Dispatching Thread
41
Interthread Communication
Event Dispatching Thread Register Listener
42
Interthread Communication
Swing Thread Event Event Queue
43
Interthread Communication
Swing Thread Event Event Queue Event
44
Algorithm Design
45
Algorithm Design import dans.algorithm.Algorithm;
import dans.algorithm.Message; public class MyAlgorithm extends Algorithm { @Override public Object algorithm() { //Do algorithm setup here while(doMainLoop()) { //Main algorithm code //Break, return, or call terminate() when done } //Code to run before termination return MyResults;
46
Implementation Details
Java 8 JGraphX - Graph visualization Swing - Basic GUI components JLFGR – Java look and feel graphics repository (icon images)
47
Implementation Details
SLOC-P Symbol Count Definition Source Files 54 Directories 7 LOC 9825 Lines of Code BLOC 1584 Blank Lines of Code SLOC-P 7707 Physical Executable Lines of Code SLOC-L 6077 Logical Executable Lines of Code
48
Demo
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.