planetsim release 3.0 candidate in depth jordi pujol ahulló universitat rovira i virgili...
TRANSCRIPT
![Page 1: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/1.jpg)
PlanetSim Release 3.0 Candidatein depth
Jordi Pujol Ahulló
Universitat Rovira i Virgili
![Page 2: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/2.jpg)
Copyright
• © University Rovira i Virgili
• Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; provided its original author is mentioned and the link to http://libre.act-europe.fr/ is kept at the bottom of every non-title slide. A copy of the license is available at:
• http://www.fsf.org/licenses/fdl.html
![Page 3: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/3.jpg)
Index
• Introduction: Use cases
• Architecture: Simulator, Node, RouteMessage structure, Factories, RouteMessagePool
• Configuration: tuning
• Life cycle: Simulation, Applications, Application level messages
![Page 4: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/4.jpg)
Introduction
• Open code project• Framework for overlay network
simulation• Implemented in Java• Layered architecture (decouple p2p
protocols from applications)• Advanced visualization output
(Pajek, GML)
![Page 5: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/5.jpg)
Use Cases: Researcher
2. Build network with nodes
6. Stabilize
3. Build network by events
<extends>
Researcher
4. Serialize network
5. Deserialize network
7. Run applications over
the network
<extends>
<includes>
1. Simulate time-steps
<includes>
![Page 6: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/6.jpg)
Use cases: Researcher (II)
1. Simulate time-steps:Run specified number of time-steps within current network. The simulator processes all nodes this number of time-steps and delivers generated messages at each time-step to the target nodes.
2. Build network with nodes:Build network with the specified number of nodes. Can be built a zero-sized network. A cofigured number of time-steps is run between each node join.
![Page 7: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/7.jpg)
Use cases: Researcher (III)
3. Build network by events1. A zero-sized network has to be built. 2. All events in specified file will be loaded.3. Only node events: { JOIN | LEAVE | FAIL }
4. Serialize networkSave on disk the current network. Waste time only once: reuse simulated networks different times.
5. Deserialize networkLoad from disk a serialized network. It will be presented as before being serialized. Continue your research at this point.
![Page 8: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/8.jpg)
Use cases: Researcher (IV)
6. StabilizePost-conditions:
- Overlay network stabilized - Only overlay maintenance messages- No application level messages remain to deliver
7. Run application over the networkAdd/Register the applications to the nodes, focus of your research, and evaluate its operation.
![Page 9: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/9.jpg)
Use cases: Developer
2. Implement applications
Developer
1. Implement KBR
![Page 10: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/10.jpg)
Use cases: Developer (II)
1. Implement KBR• Implement new KBR overlay networks, like
Pastry or Chord.• Mainly, it requires the related node
implementation, following the new overlay protocol.
2. Implement applicationsDevelop new compatible applications for these KBR overlay networks, not focused on any specific KBR.
![Page 11: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/11.jpg)
PlanetSim Architecture
![Page 12: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/12.jpg)
PlanetSim Architecture cont’dNetwork layer Node layer Application layer
![Page 13: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/13.jpg)
Node Architecture
• Layered definition
Message
RouteMessage
Node N Node M
NodeHandle
Node
EndPoint
EndPoint
…
Application
Application
…
NodeHandle
Node
EndPoint
EndPoint
…
Application
Application
…
RouteMessage
![Page 14: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/14.jpg)
RouteMessage Structure
• Extensible• Invariants:
– Source: 48– Destination: 4– Key: 8123– AppId: “”– Message: “Put
sth”
• Variants:– NextHop: 56
Source Destination NextHop Key AppId Message
K54
2m-1 0N1
N48
N51
N56
K4
NextHop
Destination
![Page 15: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/15.jpg)
Factories
• Interfaces that follow the Factory Method design pattern– Goal: Build elemental instances, without mean
real implementations– {Application|EndPoint|Node|NodeHandle|
Id}Factory
• GenericFactory:– A “super-factory”, that uses specified factories
implementations within simulation
![Page 16: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/16.jpg)
RouteMessagePool
• Time and resources eficiency is required• Java Garbage Collector is our “enemy”. No
“new XYZ(…);” in your code!!• A lot of RouteMessages are used within a
simulation• RouteMessages have a very short life time• A Pool of RouteMessages is the most
suitable design: getRouteMessage( ) & freeRouteMessage( )
• Note: The RouteMessage’s life cycle is handled by the programmer
![Page 17: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/17.jpg)
Configuration: Tuning
• Example: Running a test called “SIMNETTEST”
Simulator master.properties
chord.properties
symphony.properties
trivial.properties
. . .
GenericApp.start("../conf/master.properties", TestNames.SIMNETTEST,false,false,false,false);
//TestNames.SIMNETTEST = “SIMNETTEST”
SIMNETTEST = ../conf/chord.properties#SIMNETTEST = ../conf/symphony.properties#SIMNETTEST = ../conf/chord.propertiesSIMNETTEST = ../conf/symphony.properties
Without recompilin
g!
![Page 18: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/18.jpg)
Configuration: Tuning cont’d
• Steps for adding a new test (recommended):– Select a non repeated name for the test and
put it in planet.test.TestNames– Put this name into the conf/master.properties
and associate the final(s) configuration filesFACTORY_TESTAPPFACTORY = ../conf/chord.properties#FACTORY_TESTAPPFACTORY = ../conf/symphony.properties#FACTORY_TESTAPPFACTORY = ../conf/trivial.properties
– Create your own configuration files (if necessary), based on {chord|symphony}.properties
– Build the test itself under planet.test hierarchy
![Page 19: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/19.jpg)
Simulation’s life cycle
![Page 20: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/20.jpg)
Simulation’s life cycle cont’d
![Page 21: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/21.jpg)
Applications management
![Page 22: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/22.jpg)
Applications management cont’d
![Page 23: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/23.jpg)
Application level messages life cycle
![Page 24: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net](https://reader036.vdocuments.net/reader036/viewer/2022062518/56649ec45503460f94bcee57/html5/thumbnails/24.jpg)
Application level messages life cycle