Giter VIP home page Giter VIP logo

vms-manager's Introduction

VMS-Manager

Made by Julio Bangadebia and Quentin Anière

Description

The server concurrently manages a list of VMS, on which clients can perform operations. Operations are induced by sockets. Operations are processed by a concurrent FIFO, First In, First Out, the first operation received will be the first operation processed.

Screenshots

Server logs

The server logs are displayed in the console. We can see that two clients were connected and that both performed different operations. We can also see that client 1 has disconnected. We can also see that I launched the server on port 5000.

Client interface

Compilation

Server

With makefile

make server

Without makefile

gcc -o server server.c 

Client

With makefile

make client

Without makefile

``bash gcc -o client client.c


## Usage

### Server

#### With makefile

```bash
make launch-server

Without makefile

./server

Client

With makefile

make launch-client

Without makefile

./client

Options

To choose the port (client and server) :

With makefile

make launch-< server | client > port=< port >

Without makefile

./< server | client > < port >

Possible operations

  • A - Add a VMS
  • L x - y - List VMS with an ID between x and y
  • E x - Eliminate a VMS with an identifier x
  • X x y - Execute the binary code included in the file y on the VMS x

Operation

Server

  • The server is started (via the above commands) on a port
  • It waits for a connection from a client
  • Once the client is connected, the server starts a thread to manage the client operations
  • The server waits for a command from the client
  • The server executes the client command
  • The server sends the result of the operation to the client
  • The server waits for a new command from the client
  • If the client disconnects, it notifies it in the console, closes the communication socket and kills the thread

Operations are processed by a concurrent FIFO:

  • Any operation is added to the FIFO
  • The client reads the first operation of the FIFO
  • The server executes it and returns the result to the client who added it to the FIFO only

Client

  • Client is started (via the above commands) by specifying the server port and the server IP address
  • The client connects to the server via the specified port and IP address
  • It displays two windows:
    • A window to enter the commands
    • A window to display the results
    • A thread is started to read the results from the server, and display them in the results window
  • As soon as the user selects an operation, the client sends the command to the server

vms-manager's People

Contributors

qaniere avatar

Watchers

 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.