- Go installed
- JDK 13
To launch the server: "server -a [Host IP]:[Host Port]"
To run the client: "java Client [Server IP] [Server Port]"
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
| 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) |
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.
| Preamble (2 bytes) | Length of message (2 bytes) | length of type string=10 | "AddBooking" (10 bytes) | Length of string (x bytes) | data (x bytes) |
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.
Setup project structure to start on the project
Current implementation of Unmarshal/Marshal still pretty barebones need focus on this after next meeting.
Require UDP server for client to connect to communicate.
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
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) |
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 wrapper class to unpack wrapper from UDP data and call the correct unmarshal and marshal methods
Creation of UDP client that is capable of sending messages to the UDP server.
Two more services regarding operations on the availability of the facilities and one should be idempotent and one non-idempotent
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.