SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
Introduction                Model           Simulation      Application   Summary




                               A Peer-to-Peer Simulator

                                         Uwe Schmidt

                                          Bachelor Thesis


                                        August 17, 2006




Uwe Schmidt: A Peer-to-Peer Simulator                                       1 / 28
Introduction                Model       Simulation   Application   Summary


Outline



               Introduction
       1



               Model
       2



               Simulation
       3



               Application
       4




Uwe Schmidt: A Peer-to-Peer Simulator                                2 / 28
Introduction                Model       Simulation   Application   Summary


Outline



               Introduction
       1



               Model
       2



               Simulation
       3



               Application
       4




Uwe Schmidt: A Peer-to-Peer Simulator                                3 / 28
Introduction                Model       Simulation    Application      Summary


Peer-to-Peer File-Sharing


       Gaining Importance
               Less expensive in comparison to dedicated file servers
               Exploit bandwidth of users
               Resilient to flashcrowds

       BitTorrent
            Files are separated into chunks
               Popular (also for legal purposes)

       Microsoft Avalanche
           Uses network coding for chunk distribution



Uwe Schmidt: A Peer-to-Peer Simulator                                    4 / 28
Introduction                Model        Simulation          Application        Summary


Motivation


       Freeriding
               Common problem of all P2P systems
               Large fraction of peers are free-riders
               BitTorrent tries to restrain it by enforcing a tit-for-tat strategy

       Primary purpose of the simulator:
       Research the impact of the amount of free-riders on ...
               Download times
               Peer load



Uwe Schmidt: A Peer-to-Peer Simulator                                                5 / 28
Introduction                Model       Simulation   Application   Summary


Outline



               Introduction
       1



               Model
       2



               Simulation
       3



               Application
       4




Uwe Schmidt: A Peer-to-Peer Simulator                                6 / 28
Introduction                Model       Simulation                    Application                            Summary


General
               Similar to BitTorrent (chunk-based file-sharing)
               Global knowledge of all other peers in the system
               No incentives to upload are given (such as tit-for-tat)
               Peers wait random time between downloads

                                                                                         Peer



                                                                         Chunk Selection
       Download Behavior                                                    File

          Multiple Downloads                             Chunk#1    Chunk#2        ...    Chunk#n         Peer Selection

               Queued Requests
                                                                   Peer Lists for Chunks
               Chunk Selection                                               Peer#13
                                                                                                       Peer#11
               Peer Selection                           Peer#6                Peer#2
                                                 List                List                       List   Peer#5
                                                        Peer#40              Peer#77
                                                                                                       Peer#8
                                                                             Peer#19



Uwe Schmidt: A Peer-to-Peer Simulator                                                                            7 / 28
Introduction                Model       Simulation   Application   Summary


General Configuration GUI




Uwe Schmidt: A Peer-to-Peer Simulator                                8 / 28
Introduction                Model       Simulation     Application    Summary


Peers



       Separated into peer groups:
       Peer Group
               Number of members
               Number of free-riders
               Bandwidth (upstream & downstream)
               Maximum number of simultaneous uploads & downloads
               Disconnect probability after successful file download




Uwe Schmidt: A Peer-to-Peer Simulator                                   9 / 28
Introduction                Model       Simulation   Application   Summary


Peers Configuration GUI




Uwe Schmidt: A Peer-to-Peer Simulator                                10 / 28
Introduction                Model       Simulation       Application   Summary


Files

       Separated into file types:
       File Type
               Number of files
               Number of copies (per file)
               File size (determines number of chunks)
               File distribution to peer groups
               Popularity distribution of files among type

       Global Chunk Size
       Applies to all file types



Uwe Schmidt: A Peer-to-Peer Simulator                                    11 / 28
Introduction                Model       Simulation   Application   Summary


Files Configuration GUI




Uwe Schmidt: A Peer-to-Peer Simulator                                12 / 28
Introduction                Model       Simulation   Application   Summary


Requests




               Mean request period
               Request distribution to file types




Uwe Schmidt: A Peer-to-Peer Simulator                                13 / 28
Introduction                Model       Simulation   Application   Summary


Requests Configuration GUI




Uwe Schmidt: A Peer-to-Peer Simulator                                14 / 28
Introduction                Model       Simulation   Application   Summary


Outline



               Introduction
       1



               Model
       2



               Simulation
       3



               Application
       4




Uwe Schmidt: A Peer-to-Peer Simulator                                15 / 28
Introduction                Model       Simulation      Application    Summary


Preliminaries



       Factories
           Create peers and files
               Deploy files to peers

       File Request Generator
               Uses request configuration and file popularity settings
               Creates empirical distributions for file indexes
               Replays this distributions during the simulation




Uwe Schmidt: A Peer-to-Peer Simulator                                    16 / 28
Introduction                Model                   Simulation                 Application      Summary


Discrete Event Simulation Concept

                   Ordered Event List                            Simulation Executive

                                          removes                  executes


                                           Next Event

                               inserted         changes state                    appends data


                                            Entities

                                          schedule               append data


                        New Events                           Data Collection




Uwe Schmidt: A Peer-to-Peer Simulator                                                             17 / 28
Introduction                            Model                          Simulation                 Application                      Summary


Simulation Cycle
File Request Generator


                                                                           Peer

                                             Download Part                                                      Upload Part



     Download File                                                                                                  Incoming Chunk Request




     Add Chunks to                                                                                                        More Uploads
                              Download Complete
    Download Queue                                                                                                         possible?

                                                                                                                  yes         no



                                 Last Chunk
Process Download Queue                                                                         Upload Chunk     Queue Chunk Request       no
                                   of File?

                                      yes



 More Downloads          Maybe
                                            Chunk Download started      Chunk Request Queued      Upload Complete         Update Uploads
    possible?           go Ofline

                 yes             no


                                                                     Maybe start
               Select Chunk           Update Downloads                                                          Process Upload Queue
                                                                     new Request



                                                   Select Peer                Download Chunk


Uwe Schmidt: A Peer-to-Peer Simulator                                                                                                    18 / 28
Introduction                Model       Simulation   Application   Summary


Control




Uwe Schmidt: A Peer-to-Peer Simulator                                19 / 28
Introduction                Model       Simulation     Application   Summary


Collected Data

       Before the Simulation
           Peer groups
               File types
               List of files with chunk mapping
               List of peers with file mapping

       During the Simulation
               Completed chunk transfers
               Completed file downloads
               Miscellaneous (e.g. peer goes offline)

       After the Simulation
            List of peers with file mapping

Uwe Schmidt: A Peer-to-Peer Simulator                                  20 / 28
Introduction                Model       Simulation   Application   Summary


Outline



               Introduction
       1



               Model
       2



               Simulation
       3



               Application
       4




Uwe Schmidt: A Peer-to-Peer Simulator                                21 / 28
Introduction                Model       Simulation   Application   Summary


Overview


               Written in Java SE 5
               Used Eclipse 3
               58 classes in 8 packages
               ≈ 8000 lines of code and comments (JavaDoc)

       Used Libraries
          Jakarta Commons Math → Random Number Generators
               Jakarta Commons Configuration → XML Configuration
               JFreeChart → Charts




Uwe Schmidt: A Peer-to-Peer Simulator                                22 / 28
Introduction                      Model                                    Simulation                                 Application                             Summary


Structure
                                            User


                                  starts                  starts


           Graphical User Interface                   Console Mode

                                                  controls                 controls


                                                                           Simulator

                        changes                                                   uses                                                 executes


                           File Request Generator                          Factories                                                   Next Event

          uses                  uses                use                                    create       create        writes             controls

                                                                                returns Files
                 Configuration                                                                   Files         Peers
                                                                                to download

                    save load              uses           use      consist of               transfer    use      schedule      write                removes


                  Config File                                 Chunks                Strategies            New Events                Log Files

                                                                        use                                                       inserted


                         Random Number Generators                                                                                        Event List


Uwe Schmidt: A Peer-to-Peer Simulator                                                                                                                           23 / 28
Introduction                Model       Simulation      Application   Summary


Used Design Patterns

       Observer Pattern
          Simulator → Simulation State  Progress
               Configuration → Changes

       Singleton Pattern
               Implemented by frequently used components
               Single point of access from everywhere
               No need to pass references on to other components

       Command Pattern
          Hashtable that maps an ActionString to a Command
               Avoid code duplication

Uwe Schmidt: A Peer-to-Peer Simulator                                   24 / 28
Introduction                Model       Simulation      Application       Summary


Extensions


               General modular design
               Selection strategies are easy to change and extend

       Example (Chunk Selection)
               Select rarest chunk among 50 randomly selected ones to
               reflect that peers have no global knowledge in reality

       Example (Peer Selection)
               Select peer with most upstream left
               Select peer with smallest upload queue (if all are busy)



Uwe Schmidt: A Peer-to-Peer Simulator                                       25 / 28
Introduction                Model       Simulation   Application   Summary




                                        Demo




Uwe Schmidt: A Peer-to-Peer Simulator                                26 / 28
Introduction                Model       Simulation      Application       Summary


Summary




               Easy and flexible way to simulate P2P systems (similar to
               BitTorrent)
               Tool to research the impact of free-riders, and other
               parameters, on a P2P system
               Modular designed and extendable




Uwe Schmidt: A Peer-to-Peer Simulator                                       27 / 28
Thank you for your attention




                                        Questions?



Uwe Schmidt: A Peer-to-Peer Simulator                28 / 28

Más contenido relacionado

Similar a A Peer-to-Peer Simulator

Emulation and simulation
Emulation and simulationEmulation and simulation
Emulation and simulation
NebalAlJamal
 
DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...
DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...
DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...
Deltares
 

Similar a A Peer-to-Peer Simulator (20)

5- Requirement.ppt
5- Requirement.ppt5- Requirement.ppt
5- Requirement.ppt
 
itsme Prototype Demo 2009-08-03
itsme Prototype Demo 2009-08-03itsme Prototype Demo 2009-08-03
itsme Prototype Demo 2009-08-03
 
Prototyping model
Prototyping modelPrototyping model
Prototyping model
 
Emulation and simulation
Emulation and simulationEmulation and simulation
Emulation and simulation
 
20121017 e challenges lisbon
20121017 e challenges lisbon20121017 e challenges lisbon
20121017 e challenges lisbon
 
Se ii unit1-se_ii_intorduction
Se ii unit1-se_ii_intorductionSe ii unit1-se_ii_intorduction
Se ii unit1-se_ii_intorduction
 
DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...
DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...
DSD-INT 2014 - OpenMI Symposium - Federated modelling of Critical Infrastruct...
 
Itech 1005
Itech 1005Itech 1005
Itech 1005
 
Assignment 1 - Application of Simulation Software.pdf
Assignment 1 - Application of Simulation Software.pdfAssignment 1 - Application of Simulation Software.pdf
Assignment 1 - Application of Simulation Software.pdf
 
Spim Mips Simulator
Spim Mips SimulatorSpim Mips Simulator
Spim Mips Simulator
 
RTDesignWithUMLUseCase.ppt
RTDesignWithUMLUseCase.pptRTDesignWithUMLUseCase.ppt
RTDesignWithUMLUseCase.ppt
 
Fuzz
FuzzFuzz
Fuzz
 
Modeling and Simulation of Parallel and Distributed Computing Systems with Si...
Modeling and Simulation of Parallel and Distributed Computing Systems with Si...Modeling and Simulation of Parallel and Distributed Computing Systems with Si...
Modeling and Simulation of Parallel and Distributed Computing Systems with Si...
 
Model level debugging and profiling, Code Generation Conference 2014
Model level debugging and profiling, Code Generation Conference 2014Model level debugging and profiling, Code Generation Conference 2014
Model level debugging and profiling, Code Generation Conference 2014
 
Notacion uml
Notacion umlNotacion uml
Notacion uml
 
Simulation
SimulationSimulation
Simulation
 
07 - Design and Implementation.pptx
07 - Design and Implementation.pptx07 - Design and Implementation.pptx
07 - Design and Implementation.pptx
 
Fdmu pro step_2010_final
Fdmu pro step_2010_finalFdmu pro step_2010_final
Fdmu pro step_2010_final
 
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringBridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

A Peer-to-Peer Simulator

  • 1. Introduction Model Simulation Application Summary A Peer-to-Peer Simulator Uwe Schmidt Bachelor Thesis August 17, 2006 Uwe Schmidt: A Peer-to-Peer Simulator 1 / 28
  • 2. Introduction Model Simulation Application Summary Outline Introduction 1 Model 2 Simulation 3 Application 4 Uwe Schmidt: A Peer-to-Peer Simulator 2 / 28
  • 3. Introduction Model Simulation Application Summary Outline Introduction 1 Model 2 Simulation 3 Application 4 Uwe Schmidt: A Peer-to-Peer Simulator 3 / 28
  • 4. Introduction Model Simulation Application Summary Peer-to-Peer File-Sharing Gaining Importance Less expensive in comparison to dedicated file servers Exploit bandwidth of users Resilient to flashcrowds BitTorrent Files are separated into chunks Popular (also for legal purposes) Microsoft Avalanche Uses network coding for chunk distribution Uwe Schmidt: A Peer-to-Peer Simulator 4 / 28
  • 5. Introduction Model Simulation Application Summary Motivation Freeriding Common problem of all P2P systems Large fraction of peers are free-riders BitTorrent tries to restrain it by enforcing a tit-for-tat strategy Primary purpose of the simulator: Research the impact of the amount of free-riders on ... Download times Peer load Uwe Schmidt: A Peer-to-Peer Simulator 5 / 28
  • 6. Introduction Model Simulation Application Summary Outline Introduction 1 Model 2 Simulation 3 Application 4 Uwe Schmidt: A Peer-to-Peer Simulator 6 / 28
  • 7. Introduction Model Simulation Application Summary General Similar to BitTorrent (chunk-based file-sharing) Global knowledge of all other peers in the system No incentives to upload are given (such as tit-for-tat) Peers wait random time between downloads Peer Chunk Selection Download Behavior File Multiple Downloads Chunk#1 Chunk#2 ... Chunk#n Peer Selection Queued Requests Peer Lists for Chunks Chunk Selection Peer#13 Peer#11 Peer Selection Peer#6 Peer#2 List List List Peer#5 Peer#40 Peer#77 Peer#8 Peer#19 Uwe Schmidt: A Peer-to-Peer Simulator 7 / 28
  • 8. Introduction Model Simulation Application Summary General Configuration GUI Uwe Schmidt: A Peer-to-Peer Simulator 8 / 28
  • 9. Introduction Model Simulation Application Summary Peers Separated into peer groups: Peer Group Number of members Number of free-riders Bandwidth (upstream & downstream) Maximum number of simultaneous uploads & downloads Disconnect probability after successful file download Uwe Schmidt: A Peer-to-Peer Simulator 9 / 28
  • 10. Introduction Model Simulation Application Summary Peers Configuration GUI Uwe Schmidt: A Peer-to-Peer Simulator 10 / 28
  • 11. Introduction Model Simulation Application Summary Files Separated into file types: File Type Number of files Number of copies (per file) File size (determines number of chunks) File distribution to peer groups Popularity distribution of files among type Global Chunk Size Applies to all file types Uwe Schmidt: A Peer-to-Peer Simulator 11 / 28
  • 12. Introduction Model Simulation Application Summary Files Configuration GUI Uwe Schmidt: A Peer-to-Peer Simulator 12 / 28
  • 13. Introduction Model Simulation Application Summary Requests Mean request period Request distribution to file types Uwe Schmidt: A Peer-to-Peer Simulator 13 / 28
  • 14. Introduction Model Simulation Application Summary Requests Configuration GUI Uwe Schmidt: A Peer-to-Peer Simulator 14 / 28
  • 15. Introduction Model Simulation Application Summary Outline Introduction 1 Model 2 Simulation 3 Application 4 Uwe Schmidt: A Peer-to-Peer Simulator 15 / 28
  • 16. Introduction Model Simulation Application Summary Preliminaries Factories Create peers and files Deploy files to peers File Request Generator Uses request configuration and file popularity settings Creates empirical distributions for file indexes Replays this distributions during the simulation Uwe Schmidt: A Peer-to-Peer Simulator 16 / 28
  • 17. Introduction Model Simulation Application Summary Discrete Event Simulation Concept Ordered Event List Simulation Executive removes executes Next Event inserted changes state appends data Entities schedule append data New Events Data Collection Uwe Schmidt: A Peer-to-Peer Simulator 17 / 28
  • 18. Introduction Model Simulation Application Summary Simulation Cycle File Request Generator Peer Download Part Upload Part Download File Incoming Chunk Request Add Chunks to More Uploads Download Complete Download Queue possible? yes no Last Chunk Process Download Queue Upload Chunk Queue Chunk Request no of File? yes More Downloads Maybe Chunk Download started Chunk Request Queued Upload Complete Update Uploads possible? go Ofline yes no Maybe start Select Chunk Update Downloads Process Upload Queue new Request Select Peer Download Chunk Uwe Schmidt: A Peer-to-Peer Simulator 18 / 28
  • 19. Introduction Model Simulation Application Summary Control Uwe Schmidt: A Peer-to-Peer Simulator 19 / 28
  • 20. Introduction Model Simulation Application Summary Collected Data Before the Simulation Peer groups File types List of files with chunk mapping List of peers with file mapping During the Simulation Completed chunk transfers Completed file downloads Miscellaneous (e.g. peer goes offline) After the Simulation List of peers with file mapping Uwe Schmidt: A Peer-to-Peer Simulator 20 / 28
  • 21. Introduction Model Simulation Application Summary Outline Introduction 1 Model 2 Simulation 3 Application 4 Uwe Schmidt: A Peer-to-Peer Simulator 21 / 28
  • 22. Introduction Model Simulation Application Summary Overview Written in Java SE 5 Used Eclipse 3 58 classes in 8 packages ≈ 8000 lines of code and comments (JavaDoc) Used Libraries Jakarta Commons Math → Random Number Generators Jakarta Commons Configuration → XML Configuration JFreeChart → Charts Uwe Schmidt: A Peer-to-Peer Simulator 22 / 28
  • 23. Introduction Model Simulation Application Summary Structure User starts starts Graphical User Interface Console Mode controls controls Simulator changes uses executes File Request Generator Factories Next Event uses uses use create create writes controls returns Files Configuration Files Peers to download save load uses use consist of transfer use schedule write removes Config File Chunks Strategies New Events Log Files use inserted Random Number Generators Event List Uwe Schmidt: A Peer-to-Peer Simulator 23 / 28
  • 24. Introduction Model Simulation Application Summary Used Design Patterns Observer Pattern Simulator → Simulation State Progress Configuration → Changes Singleton Pattern Implemented by frequently used components Single point of access from everywhere No need to pass references on to other components Command Pattern Hashtable that maps an ActionString to a Command Avoid code duplication Uwe Schmidt: A Peer-to-Peer Simulator 24 / 28
  • 25. Introduction Model Simulation Application Summary Extensions General modular design Selection strategies are easy to change and extend Example (Chunk Selection) Select rarest chunk among 50 randomly selected ones to reflect that peers have no global knowledge in reality Example (Peer Selection) Select peer with most upstream left Select peer with smallest upload queue (if all are busy) Uwe Schmidt: A Peer-to-Peer Simulator 25 / 28
  • 26. Introduction Model Simulation Application Summary Demo Uwe Schmidt: A Peer-to-Peer Simulator 26 / 28
  • 27. Introduction Model Simulation Application Summary Summary Easy and flexible way to simulate P2P systems (similar to BitTorrent) Tool to research the impact of free-riders, and other parameters, on a P2P system Modular designed and extendable Uwe Schmidt: A Peer-to-Peer Simulator 27 / 28
  • 28. Thank you for your attention Questions? Uwe Schmidt: A Peer-to-Peer Simulator 28 / 28