Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 2.39 KB

README.md

File metadata and controls

71 lines (46 loc) · 2.39 KB

Ducky

A quack quacky UDP cache server 🦆, developed for the Networking course of "Sicurezza dei Sistemi e Delle Reti Informatiche" bachelor's degree program.

C/C++ CI

Rationale

Ducky is an network cache server written in C.
It stores unstructured data sent from a client in memory, ready to be served when a client asks for it using a unique key.
Ducky's principal purpose is to reduce networking and computation load from a server (for example, an API, a Web application, or a database) so that a client can store data that is accessed with a high frequency, increasing the overall performance of the system.
Ducky is loosely inspired by projects like Memcached and Redis.
While Ducky's approach to the "key-value" server implementation is naive, it worked well as a demonstrative and learning project on how to build a simple networking server.

Documentation

Ducky's is documented here: protocol.

Dependencies

Ducky is a portable project and has only one dependency:

  • greatest, used to write the unit tests for the project

Build and test

Ducky is built with an out-of-source approach using CMake.
To build Ducky first clone the repository and then, inside the Ducky folder, generate the build tree:

$ cmake -B ./build

Now you can build the project:

$ cmake --build ./build

To run the unit tests just use the following command:

$ cmake --build ./build --target test

Run

To start Ducky simply enter in the build/src folder and run the executable:

$ cd build/src
$ ./ducky

14:00:57 INFO  Ducky up and running, listening on port 20017

Now you can start to store and or retrieve data from Ducky; just open another terminal session and use Netcat to send commands via UDP:

$ nc -u localhost 20017
SET key data
201 CREATED
GET key
200 data

Contributors

A huge thanks go to Roberto Carrà for his precious work on the logo.