Code Monkey home page Code Monkey logo

routingperformance's Introduction

RoutingPerformance

Author: Brian Bolze

Date: October 25 2013

Summary

Java program that simulates and compares the performance of three different permutations of Dijkstra's algorithm for routing packets of data on the internet.

Description

In order to store the topology file in a convenient and useful format, I chose to build my own class for this specific scenario. The class, NetworkGraph, is made up of a hashmap that maps characters (representing the nodes) to Connections. Connections is a subclass within NetworkGraph that consists of two characters for the two nodes, and three integers for the connection propagation delay, capacity, and the current number of Virtual Circuits active on that connection. The Connection class has a few methods, including a print method (for debugging), and add and remove VC methods.

The NetworkGraph class has a few more methods. The addConnection method takes in the two characters and two integers from the topology file, creates a connection, and maps each node to the connection in the hashmap. Both nodes are mapped so that the direction is arbitrary. The isAdjacent method determines if two supplied nodes are neighbors. This is extremely helpful when performing the Dijkstra algorithm. After this there are a few basic get methods, and then an addVC method and removeVC method. The addVC method in this case only adds the virtual circuit if the path has sufficient capacity to support the connection.

Notes

Originally written as an assignment for a class taught at the University of New South Wales. -- Computer Science 3331: Computer Networks and Applications -- Professor Sanjay Jha

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.