Git Product home page Git Product logo

sdnicn's Introduction

SDNICN

This application simulate working of controller, switch and host for Software Defined Network over Information Centric Network. The application can be run either in host, controller or switch mode.

When run in controller mode, a controller starts which listens incoming requests for INTEREST and PUBLISH packet. When a PUBLISH packet arrives, it adds content and host information in hashMap. The hashMap maps content to a list containing information of nodes that have published this packet. On receiving an INTEREST packet, it checks for the available nodes for the matched content. And choses the best path from list of available paths ( currently it is choosing first path), the information of first node on the best path is returned to the switch. HashMap used here is synchronised for consistency issues.

For running in switch mode controller IP is provided, and a connection is established between switch and controller, a server thread starts to listen incoming requests from hosts for INTEREST and PUBLISH packets. Each request is handled by a separate thread,and the connection between switch and controller is used in synchronized fashion. On receiving PUBLISH packet, switch simply forwards it to controller, on receiving INTEREST packet, switch communicates with controller to know about next hop, connects to that and sends INTEREST packet to that hop, data is traversed in reverse direction, from the node that provides file to the node that asked for it. If file is not found then a packet with NOTFOUND message type traverses back the path.

For running in host mode, IP of node where switch module is running is provided,host can publish local files on network or retrieve files from network. When host publishes a file it makes a entry in sqlite database, mapping name by which content is published to the local path where content is stored. It then sends a PUBLISH with content name to the switch. For retrieving a file, host starts a file receiver thread, which creates a connection with the switch module and sends INTEREST packet with content name to it. On receiving packet with message type as SUCCESS, it retreive file from network, else it aborts. Host also starts a server thread to listen requests for the content published by this host.

MESSAGE TYPES are defined in java class util/MsgTyp.java.Following are types of messages:- SUCCESS, NOTFOUND, PUBLISH, INTEREST, REQUEST(not used), REPLY (not used).

Packet here is a java object with following attributes: MSGTyp, addr, data, Serial version UID

For running application, you can build a executable jar file. On running that file, application will ask you to choose mode.

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.