Giter Club home page Giter Club logo

ce4013-distributed-system's Introduction

CE4013-Distributed-System

GoLang Server CI Java Client CI

❕ Prerequisites

  1. Go installed
  2. JDK 13

⭐ Server (Go)

To launch the server: "server -a [Host IP]:[Host Port]"

server

⭐ Client (JAVA)

To run the client: "java Client [Server IP] [Server Port]"

client

ce4013-distributed-system's People

Contributors

itachi1706 avatar alexnjh avatar chee96 avatar

Watchers

 avatar

ce4013-distributed-system's Issues

Implement Facility Availability Query on days selection

A service that allows a user to query the availability of a facility on a selection of one or multiple days by specifying the facility name and the days. If there does not exist any facility with the specified name, an error message should be returned

Error Message Format

| Preamble (2 bytes) | Length of message (2 bytes) | length of type string=5 | "Error" (5 bytes) | Length of string (4 bytes) | Char Array (x bytes) |

Implement ability for user to monitor facility availability over a week

A service that allows a user to monitor the availability of a facility over the week through callback from the server for a designated time period called monitor interval. To register, the client provides the facility name and the length of monitor interval to the server. After registration, the Internet address and the port number of the client are recorded by the server. During the monitoring interval, every time a booking or an update is made by any client to the facility, the updated availability of the facility over the week is sent by the server to the registered client(s) through callback. After the expiration of the monitor interval, the client record is removed from the server which will no longer deliver the availability updates to the client. For simplicity, you may assume that the user that has issued a register request for monitoring is blocked from inputting any new request until the monitor interval expires, i.e., the client simply waits for the updates from the server during the monitoring interval. As a result, you do not have to use multiple threads at a client. However, your implementation should allow multiple clients to monitor the availability of a facility concurrently.

Add booking message format

| Preamble (2 bytes) | Length of message (2 bytes) | length of type string=10 | "AddBooking" (10 bytes) | Length of string (x bytes) | data (x bytes) |

Implement facility booking for a period of time

A service that allows a user to book a facility for a period by specifying the facility name and the start and end times of the booking. On successful booking, a unique confirmation ID is returned to the client and the availability of the facility should be updated at the server. In case of incorrect user input (e.g., non-existing facility name or the facility is completely or partially unavailable during the requested period due to existing bookings), a proper error message should be returned.

Unmarshal/Marshal

Current implementation of Unmarshal/Marshal still pretty barebones need focus on this after next meeting.

Required Server Services

Services Required to be implemented by the server:
• A service that allows a user to query the availability of a facility on a selection of one or multiple days by specifying the facility name and the days. If there does not exist any facility with the specified name, an error message should be returned

• A service that allows a user to book a facility for a period by specifying the facility name and the start and end times of the booking. On successful booking, a unique confirmation ID is returned to the client and the availability of the facility should be updated at the server. In case of incorrect user input (e.g., non-existing facility name or the facility is completely or partially unavailable during the requested period due to existing bookings), a proper error message should be returned.

• A service that allows a user to change its booking by specifying the confirmation ID of the booking and an offset for changing (e.g., to advance the booking by 1 hour or to postpone the booking by 30 minutes). The change does not modify the length of the time period booked. On successful change, an acknowledgement is returned to the client and the availability of the facility should be updated at the server. In case of incorrect user input (e.g., non-existing confirmation ID or the facility is completely or partially unavailable during the new requested period due to existing bookings), a proper error message should be returned.

• A service that allows a user to monitor the availability of a facility over the week through callback from the server for a designated time period called monitor interval. To register, the client provides the facility name and the length of monitor interval to the server. After registration, the Internet address and the port number of the client are recorded by the server. During the monitoring interval, every time a booking or an update is made by any client to the facility, the updated availability of the facility over the week is sent by the server to the registered client(s) through callback. After the expiration of the monitor interval, the client record is removed from the server which will no longer deliver the availability updates to the client. For simplicity, you may assume that the user that has issued a register request for monitoring is blocked from inputting any new request until the monitor interval expires, i.e., the client simply waits for the updates from the server during the monitoring interval. As a result, you do not have to use multiple threads at a client. However, your implementation should allow multiple clients to monitor the availability of a facility concurrently.

• Two more services regarding operations on the availability of the facilities and one should be idempotent and one non-idempotent

Message format for query availability from server

Server:

| Preamble (2 bytes) | Length of message (2 bytes) | length of type string=12 | "Availability" (12 bytes) | Length of Facility Name | Facility Name (y bytes) | data (x bytes) |

Client:

| Preamble (2 bytes) | Length of message (2 bytes) | length of type string=5 | "Query" (5 bytes) | Length of Facility Name | Facility Name (y bytes) | data (x bytes) |

Implement ability to allow user to change booking with confirmation ID

A service that allows a user to change its booking by specifying the confirmation ID of the booking and an offset for changing (e.g., to advance the booking by 1 hour or to postpone the booking by 30 minutes). The change does not modify the length of the time period booked. On successful change, an acknowledgement is returned to the client and the availability of the facility should be updated at the server. In case of incorrect user input (e.g., non-existing confirmation ID or the facility is completely or partially unavailable during the new requested period due to existing bookings), a proper error message should be returned.

UDP Client Creation

Creation of UDP client that is capable of sending messages to the UDP server.

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.