Architecture - PatriciaDB/PatriciaDB Wiki

The following diagram is an architecture diagram of PatriciaDB.

Above the PatriciaFileSystem we have built the Index and components we have used to create PatriciaDB. But before getting into the index, we need to start from the file system used by the upper layer.

The PatriciaFileSystem provides a very simple interface to the client.

public interface PatriciaFileSystem {

    FSSnapshot getSnapshot();

    FSTransaction startTransaction();

public interface FSTransaction {
   // Read the blockId
    ByteBuffer read(long blockId);

    // Returns a unique ID for this block of bytes
    long write(ByteBuffer data);

    // replace the content of a blockId
    void overwrite(long blockId, ByteBuffer data);

   // Delete a block data
    void delete(long blockId);

    // Commit this transaction (atomically)
    void commit();