7 – Application Layer

The principle class to write applications in Oversim is the BaseApp class. All applications in Oversim have to extend the BaseApp class.

DHTs - Distributed Hash Tables

Distributed Hash Tables (DHTs) are built on top of structured overlay networks. DHT are used to index resources/content and resolve queries with some grantees on performance, e.g., maximum number of overlay hops to route a put(key, value) or a get(key) message. DHT and DHTTestAPP work together where DHTTestAPP utilizes the DHT to store & retrieve (key, value) pairs. DHT utilize the underlying overlay to route queries. DHT implementation consist of 2 modules:

    1. DHTDataStorage – Provides a data structure and functions to add, update, and remove resources/contents into/from the DHT.
    2. DHT – Capable of storing and retrieving multiple (key, value) pairs (e.g., same file in multiple peers) given that they have distinct kinds or IDs. Each entry has an expiration time and removed from the DHT when it expires.

sendInternalRPCCall() is used to communicate between DHTTestApp and DHT using DHTputCAPICall and DHTgetCAPICall messages.