Skip to content

sunniel/SimpleChord

Repository files navigation

Overview

Introduction

A simple OMNet++ simulation of the the peer-to-peer Chord overlay protocol [1].

An OMNeT++ implementation of the PeerSim ChordSim project without the local branch. That is, communications are only implemented through message exchange rather than local function call.

Due to its simple implementation, it can be easily plugged in as an individual module within a larger project, such as in VirtualWorldContentSharing.

Simulation environment and 3rd-party dependency:

  1. OMNet++ 5.4 or later (supporting c++ 11)

  2. Boost C++ libraries (1.66.0, https://www.boost.org/)

  3. JSON for Modern C++ (https://github.com/nlohmann/json)

Source Codes

Details of the simulation code description can be found in the ChordSim project

Source Code Directory Structure

All source codes can be found under the /src/ directory, which contains the following sub-directories.

abstract/: contains the overall simulation network description file.

app/: contains the application layer protocol, currently unused.

common/: contains the commonly used base class the the utility functions

crypto/: contains the hash code generation implementation

global/: contains the global simulation modules for

  1. lookup traffic generation (TrafficGenerator),
  2. churn generation (UniformChurnGenerator),
  3. manual node removal (ManualChurnGenerator),
  4. statistical result collection (GlobalStatistics),
  5. global node IP address lookup for message transmission (GlobalNodeList),
  6. manual data distribution/lookup (ContentDistributor),
  7. underlay and overlay network initialization (UnderlayConfigurator),
  8. simulation parameters (GlobalParameters).

ctrl/: Chord protocol implementation module, used by all Chord hosts

hosts/: composite chord node

messages/: chord message definition

objects/: data object used by each chord node, which contains:

  1. Chord profile information (ChordInfo)
  2. IPAddress

others/: contains the network interface module used by hosts, currently unused.

transport/: contains the transport modules used by hosts

  1. reliable UDP: no message drop, which may generate higher latency for message re-transmission (ReliableUDP)
  2. unreliable UDP: message transmission could be failed due to message drop, currently unused (SimpleUDP)

Configurations (/simulations/omnetpp.int)

Chord Protocol Parameters:

# length of chord key/address in binary
**.globalParameters.address_space_size = 20

# number of successors
**.globalParameters.successor_list_size = 2

# number of replicas for data storage; note that chord_replica_size <= successor_list_size
**.globalParameters.chord_replica_size = 2

Simulation parameters

# Chord overlay network initial size
**.globalParameters.chord_init_size = 100

# for manual chord node removal, referring to ManualChurnGenerator
**.churnGenerator.scan_cycle = 100ms

# cycle of network churn, referring to UniformChurnGenerator
**.churnGenerator.churn_cycle = 10s

# node departure/arrival rate, used by UniformChurnGenerator
**.churnGenerator.depart_rate = 0.1
**.churnGenerator.arrival_rate = 0.1

# Maximal/minimal overlay size, used by UniformChurnGenerator
**.churnGenerator.overlay_size_max = 500
**.churnGenerator.overlay_size_min = 10

# Chord lookup request generation cycle
**.trafficGenerator.traffic_cycle = 5000ms

# chord maintenance cycle to fix finger tables and successor lists, called by each chord node **.chord[*].ctrl.maintain_cycle = 1000ms

Parameters for Message Transmission

# Propagation delay generation mode.
# 0: Simulation of real-world propagation delay generated by 1) light transmission limit, 2) communication congestion, and 3) jitter
# 1: Propagation delay with minimal singl-trip latency (Dmin) and jitter, i.e., Dmin + jitter **.globalParameters.latency_gen_mode = 1

# maximum distance could be, for example, half of the Earth circumference: 20000000m **.globalParameters.max_distance = 20000000m

# packet loss rate
**.pktLossRate = 0.01

# 2/3 of the light speed
**.Copt = 200000000mps

# 10 mega bits per second
**.BW = 1.04858e6bps

# Ethernet packet size 1518 Bytpes = 12144 bits
**.MTU = 12144b
**.jitter_mu = 1
**.jitter_sigma = 0.5

# minimal end-to-end delay **.Dmin = 50ms **.jitter = 50ms

References:

[1] Stoica, I., Morris, R., Karger, D., Kaashoek, M. F., Balakrishnan, H. "Chord: A scalable peer-to-peer lookup service for internet applications"; Proc. SIGCOMM '01, ACM, New York (2001), 149-160.


Contacts:

Daniel Shen [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published