|
Implementation
This page will contain the project implementation details.
T-Man Live-Streaming TCS Implementation
I. Table of Terms
1. IntroductionThis wiki entry will comprise all the implementation details of our project. We'll first start by describing our simulation framework, defining our component architecture and then listing all the main events and their corresponding handlers. Lastly, we'll use sequence diagrams to describe the general flow of our main processes. 2. Simulation FrameworkFor our project, we utilized the Kompics component model . The kompics framework facilitates building and simulating distributed systems by allowing us to create components (that execute concurrently) and have them launch and receive events. For more information, please refer to Kompics' official website http://kompics.sics.se for samplers and tutorials. 3. Component ArchitectureDue to the frequency of changes and the ongoing code restructuring of our project, this section is still under development. 4. EventsIn this section, we'll describe the main types of events that are used throughout our simulations. The diagram shown below contains the types of events that are initiated by our main architectural components (as described in section 2.0 of the design wiki entry).
These events are used to perform a wide array of functionality for our distributed system. A description of each event's purpose is provided in the table below:
5. FlowIn this section, we'll describe the main processes that occur throughout the simulation. We'll try to summarily describe them using sequence diagrams. 5.1. Simulation Initiation ProcessThis process comprises the flow of the simulation from when it's initiated by the user, to the resultant T-Man & Cyclon interactions that take place henceforth. It's important to point out that the Cyclon shuffles and T-Man exchanges occur concurrently after the T-Man component is initiated. Also, after a peer receives an exchange request, the handler merges the sender's buffer along with the peer's current T-Man & Cyclon buffers. The resultant view is then sorted according to our ranking function (defined in section 3.3.2 of the design wiki entry). The highest n (where n is the T-Man view size) peer descriptors are then extracted from the list and placed in the peer's T-Man buffer.
5.2. Child/Parent InteractionsThis processes includes all possible interaction scenarios between children, parents and prospective children. The sequence diagram below shows these interactions.
Please note that a child accepts or rejects a parent based on three factors:
If the acquiring node has a lower bandwidth or a less than or equal hop-count to the child's, then it's instantly rejected. Whilst if the child has already reached its maximum number of in-bound connections, it will start search through its current parents, to see if any of them is expendable. If the acquiring node's bandwidth or hop-count is less than that of one of the child's current parents, it accepts the request and sends an "Orphan Self" event to the expendable parent to remove it. | ||||||||||||||||||||||||||||||||||||||||||||||||