Skip to content

Implementation of a SQLite-based storage back-end

Maximilian Nitsch requested to merge feature/sqlite-cla into develop-aap2-forwarder

This MR adds a SQLite-based storage back-end to μD3TN by adding the following components:

  • SQLiteCLA:

    The SQLiteCLA makes it possible to write bundles, that are to be sent via this CLA, to an SQLite database in order to persist them over a longer period of time and also a restart of μD3TN.

    The bundles are saved together with selected metadata (source EID, destination EID, creation timestamp) in the "bundles" table. A combination of source EID and creation timestamp is used as the primary key.

    To return bundles to μD3TN, they are read from the database and injected via the cla_read() function, just like other CLAs that receive bundles. To trigger this, commands are read from a queue that specify which bundles are to be read from the database.

  • SQLiteAgent:

    The SQLiteAgent enables SQLiteCLA to read packages from the database and return them to μD3TN. For this purpose, the SQLiteAgent writes commands to the queue that SQLiteCLA is waiting for.

    The SQLiteAgent itself can be controlled by protobuf messages that describe which action is to be applied to which set of bundles.

    Currently the operations "Push" and "Delete" are implemented and a filter based on a destination EID pattern.

  • SQLiteAgentClient:

    Enables simple interaction with the SQLiteAgent, such as "push" and "delete" of bundles from the SQLite database, using the command line.

Closes: #13

Edited by Maximilian Nitsch

Merge request reports