ce4013-distributed-system's Issues
Implement facility availability ops with idempotent/non-idempotent ops
Two more services regarding operations on the availability of the facilities and one should be idempotent and one non-idempotent
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) |
UDP Client Creation
Creation of UDP client that is capable of sending messages to the UDP server.
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) |
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
Unmarshal/Marshal
Current implementation of Unmarshal/Marshal still pretty barebones need focus on this after next meeting.
UDP Server Creation
Require UDP server for client to connect to communicate.
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.
View Booking / Query booking (Client-server implementation)
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.
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.
Create Project Structure
Setup project structure to start on the project
Wrapper class for UDP sockets
Implement wrapper class to unpack wrapper from UDP data and call the correct unmarshal and marshal methods
Monitor booking / Remove booking (Client-server implementation)
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
Modify booking via offset/duration (Client-server implementation)
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) |
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.