Return to UNIX page

Project 2016 - regulations
Agenda:
9 V 16 V 23 V 30 V 13 VI 20 VI
Questions&Answers Questions&Answers Check Point 1 Questions&Answers Check Point 2 Submission + grades
Return to UNIX page

Project Amb
Geeks' dating server

Write TCP server working with telnet clients. You must use POSIX threads and synchronization, each connection must be handled by separated thread. Also you must use AIO and TCP sockets.

After connection and login (nick and password) user must be able to:

  1. set/update its profile
  2. view other users profiles
  3. find a matching profiles based on one from many of the properties of the profile
  4. Invite for a date
  5. Schedule dates (possibly many)

Ad.1) Profile must consist of minimum 5 (decent, apart from nick) characteristics of a person and one (maximum size 80x80 characters) ascii art.

Ad.2) One by one or by nick.

Ad.3) User may specify one from characteristics and its value, the system must show all matching nicks.

Ad.4) Date must be confirmed or rejected. If the invitation is pending until he/she connects and makes a decision and (possibly) schedules a date. If user is online it must be informed about new invitations immediately.

Ad.5) Each person have one week calendar with 3 possible time slots (17.00, 18.00 and 19.00) for each day. If you are invited you should be presented with choice of dates based on intersection of empty dates from your and your date calendars so you can make a choice. To avoid over scheduling for the duration of the choice both calendars should be locked. For example you have been invited by A, you confirm and you are making a choice. In this time B accepts your invitation and wants to make a time choice, but your calendar is locked until you finish your choice. The system should present B with the choice as soon as the calendar is unlocked. Each date is noted in both calendars. If intersection of unoccupied dates is empty your date is canceled.

All profiles, calendars and pending invitations must be stored on the disk. All disk operations must be handled asynchronously(AIO).

Graded by: Marcin Borkowski

Return to UNIX page

Project Bts
Coworking rooms server

Write TCP server and client implementing chat room and file sharing services at one. After connecting to the server (using client application) users will be able to join to one of existing working groups or to create a new one. Working groups are organized into containers called "rooms". Each room apart of chat service must provide flat (stored in a single directory), local (available within coworking room) files storage. Server has to have a default room named "anteroom" where every user will be placed after connecting to the server. The anteroom as other room containers has local chat and files storage services but it is the only one from where users are allowed to enter other rooms (thus join selected working group). While being connected to the other room containers (working groups) users are able only to leave them, thereby enter (come back to) the anteroom. By leaving anteroom users disconnect from the server.

Foreground functionality

The client must recognize a group of commands which allow users to:

  1. connect to and disconnect from the server
  2. list available rooms, open (create) and close (remove) ones
  3. enter and leave a given room
  4. operate on room's storage by uploading, downloading, listing and removing files
  5. list users connected to the room container and chat with all of them or with a given one

Ad. 1
Connect to the server command syntax is "!connect <username>@<server>[:port]" where:

The <username> and <server> arguments are mandatory, if <port> number is omitted the default value should be used while connecting to the server. There is no users registration procedure neither built-in users list in the server. The only limitations is there could be only one user with the given name connected to the server.
The "!bye" command allows user to disconnect from the server at any time in any room.

Ad. 2
The "!rooms" command displays a list of available, already opened rooms. To open or close one user must use "!open <roomname>" and "!close <roomname>" commands respectively. The <roomname> argument may consists of up to 31 alphanumerical and underscore characters. Room can be closed only by user who opened it (owner of the room) when no other users are connected to the closed container.

Ad. 3
To connect to the given room container user must use "!enter <roomname>" command. The "!leave" command disconnects user from the current room container and moves him or her to the anteroom. The use of "!leave" command in anteroom disconnects user from the server as described above.

Ad. 4
The "!files" command displays the list of files shared in room's storage. To upload, download and remove files user may use "!push <filename>", "!pull <filename<" and "!rm <filename>" commands respectively. The <filename> argument may consists of up to 31 alphanumerical and underscore characters. File can be removed only by the user who uploaded it (owner of the file). To upload a new content of existing file (overwrite it) user must first remove it and then upload a new copy.

Ad. 5
To send the message to the given recipient user must prefix the message with the recipient name using form "*<username>* message_text", e.g. "*apollo13* when will U upload the solution?".

Technical notes

Each client connection must be handled in separate thread on the server side.
Each room container must has separate thread for message broadcasting.
File transfers (uploading / downloading) should be handled in the background not blocking instant messaging both on the client and the server sides in the given room.
Server configuration including opened rooms list, their storages content and additional information like owners list(s) must be stored on the disk and restored across server restarts.
All disk operations must be handled asynchronously using POSIX AIO.

Graded by: Tomek Sobieraj

Return to UNIX page