GithubHelp home page GithubHelp logo

urbanij / hotel-booking Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 277 KB

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

Home Page: https://youtu.be/2S_IpDbXQF8

C 98.54% CMake 0.80% Python 0.67%
concurrency client-server sqlite3 regex thread-pool posix-threads unipi unipisa

hotel-booking's Introduction

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.

hotel-booking's People

Contributors

urbanij avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.