Skip to content

Client/server application for hotel room bookings. Distributed Programming project @Unipisa 2019

Notifications You must be signed in to change notification settings

urbanij/hotel-booking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel booking – final project Concurrent & Distributed Programming class

Project specifications (ita):
http://vecchio.iet.unipi.it/se/files/2019/05/Progetto-2018_2019-Sistemi-di-Elaborazione.pdf

abstract:

Client/server application for hotel bookings.
Client and server communicate via TCP sockets. The server is concurrent and the concurrency is implemented with POSIX threads. The server indefinitely waits for new incoming connections and every accepted connection is dispatched to a thread – in a pre-allocated pool of threads – in charge of managing the requests of the client. The reservations are constrained to the year 2020.

demo:

demo

documentation:

HTML | PDF

Usage1:

install dependencies:

Linux:

sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev
sudo apt-get install sqlitebrowser          # optional

macOS:

brew install sqlite3                        # optional
brew cask install db-browser-for-sqlite     # optional
git clone https://github.com/urbanij/hotel-booking.git
cd hotel-booking/
mkdir build && cd build

compilation using CMake:

cmake ..
make

alternatively, compilation using SCons:

scons -Y ..

running:

  • open a terminal session and run the server:
./bin/server 127.0.0.1 8888  5
  • open one or more terminal sessions and run the client(s)
./bin/client 127.0.0.1 8888

where:
127.0.0.1 is the IP address (in this case localhost),
8888 is the port number and
5 the initial total number of available room in the hotel.

running with gdb debugger

(may require root privileges on macOS)

make sure to compile with -DGDB_MODE, then run gdb ./server.
Inside gdb type r to run and you're good to go.
For an easier debugging experience this is recommended.


Francesco Urbani


1: tested on Linux Ubuntu 18, Raspbian and macOS.

About

Client/server application for hotel room bookings. Distributed Programming project @Unipisa 2019

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages