Code Monkey home page Code Monkey logo

networks's Introduction

                                                    USE VIM FOR BEST VISUAL FORMATTING

Mehta Harsh Hemantkumar Computer Science And Engineering Roll No: 10010177

networks

IITG Year 3 - Network Assignments

Installation:

cd networks
make

Running:

* Step1: Run one or more servers as specifiedi below.

    cd server_$(server_name)_$(server_no)
    ./server_$(server_no)


                        $server_name    $server_no    Port 

    Iterative           iterative       1             9111
    Select              select          2             9222
    Multiprocessing     multiprocess    3             9333



* Step2: Run the client (or any of the datasets) using the format specified in question

    cd client
    
    Method 1:

        ./client hostname port myname add date(MMDDYY) start_time(HHMM) end_time(HHMM)  Message(only one word without spaces)
    
        example:
        ./client 127.0.0.1 9222 harsh add 092313 0800 0900 birthday
    
    Method 2:
        sh dataset_$(server_name) // This has specific set of add commands which would get run 


* Step3: Now we have added the data, now we can do any set of other operations like : get,getall,remove,update as format specified in the question statement

Comments:

1. All Logical, Syntax and Semantic checks as specified in the question are implemented, they would come up as one starts checking for it.

2. Code is structured and behaves as following

    client: 

        1. Parse Args
        2. Checks for date, time, no._of_args etc.
        3. Send string in proper format to server

    server:

        0. Check for events that has already happened for all_users and remove them.
        1. Call appropriate function call (ex. event_add() for add)
        2. Get the args, make meaning from it.
        3. Perform appropriate actions on to the corresponding files.
        4. Send back response.

3. Multiprocessing (Not multi-threading) is used in the corresponding server using fork() system call. 

4. Files are used for storing the data, separate for every user.
    Ex.
        For user named 'harsh' -> filename: 'user_harsh' in server's folder

    There is also a 'userdir' ( User Directory File) which keeps track of user files.

5. Semaphores (Reader-Writer) are not implemented and thus its ramifications would follow.
  • Thank You !!

networks's People

Contributors

nullstring avatar

Watchers

James Cloos avatar  avatar

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.