Code Monkey home page Code Monkey logo

teaching-heigvd-res-2020-exercise-protocol-design's Introduction

Teaching-HEIGVD-RES-2020-Exercise-Protocol-Design

The first goal is to specify a client-server protocol, which will allow a client to ask a server compute a calculation and to return the result.

The specification must contain everything that is needed for one person to implement a client, for another person to implement a server and for the 2 applications to work together. The specification is a contract between the server and the client.

Phase 1: write the specification (15 minutes)

  • Fork this repo and create a folder with your GitHub ID in the "specs" folder (like you did for the Chill lab at the beginning of the semester)
  • In this folder, create a file named PROTOCOL.md and write your specification:
    • What transport protocol do we use?
    • How does the client find the server (addresses and ports)?
    • Who speaks first?
    • What is the sequence of messages exchanged by the client and the server? (flow)
    • What happens when a message is received from the other party? (semantics)
    • What is the syntax of the messages? How we generate and parse them? (syntax)
    • Who closes the connection and when?
  • Submit a Pull Request

Phase 2: review 3 specifications (15 minutes)

  • Are there big differences between the specification?
  • What are the common elements?
  • Are there missing or confusing elements in the specification?

Phase 3: validate specs in pairs (15 minutes)

  • Work with the student sitting next to you
  • One of them is the server, the other is the client
  • Pick one of the 2 specifications
  • One student uses netcat (nc) to start a server (nc -kl). The other student uses netcat to start a client.
  • Go through a couple of scenarios to validate that your specification is complete (if you need to ask something to the other student, or if you need to discuss, you probably should make your specification more complete)

Phase 4: implement a client and a server (45 minutes)

  • One student implements a client in Java
  • The other student implements a server in Java
  • The team performs various tests to validate that the client and the server work together (on the same machine, across two machines connected to the same network, in Docker containers)
  • Add your code in your folder and submit a PR on the upstream server.

teaching-heigvd-res-2020-exercise-protocol-design's People

Contributors

wasadigi avatar

Stargazers

 avatar  avatar

Watchers

 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.