This project contains data structures and methods for inter-process communication. It aims to analyse the impact on the performance of different communication techniques on Unix systems.
All communication will be managed via a common communication interface (ICommunicationHandler), method and object structure (IDataObject).
When sending messages a header (DataHeader) will be created and prepended before the actual message, to make it identifiable for the receiver. This header consists of an id, type, size and timestamp. Afterward the actual message will be appended. The structure of the serialized message depends on the implementation.
Currently, the following handlers are implemented:
- Datagram Socket (Unix and Internet domain)
- Stream Socket (Unix and Internet domain)
- DBus
- Fifo/Named pipe
- Posix Message Queue
- Shared file
- Shared memory (Posix shared memory and Memory mapped file)
All data object must be defined via a DataType, as an implementation of (IDataObject) and as a possible return type via ICommunicationHandler::DataObject. The utility file utility.hpp will help to deserialize each object by its type.
To test the performance of each communication technique a couple of benchmarks are implemented:
- Latency (Measuring the latency for a Ping message between writing and reading)
- Execution time (Measuring the execution time for the read and write call with different messages sizes)
- Throughput (Measuring the total throughput of a fixed amount of messages and size)
- Real World Data (Sending prerecorded data and check how often the deadline for sending will be missed)