Top Banner
PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili [email protected]
24

PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili [email protected].

Jan 16, 2016

Download

Documents

Georgina Potter
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net.

PlanetSim Release 3.0 Candidatein depth

Jordi Pujol Ahulló

Universitat Rovira i Virgili

[email protected]

Page 2: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net.

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.

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.

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.

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.

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.

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.

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.

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.

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.

PlanetSim Architecture

Page 12: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net.

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.

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.

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.

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.

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.

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.

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.

Simulation’s life cycle

Page 20: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net.

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.

Applications management

Page 22: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net.

Applications management cont’d

Page 23: PlanetSim Release 3.0 Candidate in depth Jordi Pujol Ahulló Universitat Rovira i Virgili jordi.pujol@urv.net.

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.

Application level messages life cycle