Docks

Docks are a distributed network of servers that store Kade's data.

Docks ingest on chain events, process the events, then persist them to a relational database and lastly provide an api for querying this data from any client. Docks are still under development, and anyone will be able to run a dock and host Kade data once ready.

As we start out we plan to utilise Aptos' indexer for ingesting events in our docks, but in the future we plan to build our own dedicated indexer for more flexibility and access to on chain data.

Design

Docks are meant to serve 4 main purposes

  1. Ingest on chain events - These will get emitted for all user interactions, e.g posting, quoting, reacting etc

  2. Validate events - Since docks are listening to multiple separate event streams, and writing to a single relational database(per dock), docks need to ensure that referential integrity is maintained for all the data. This involves steps like invalidating reactions to posts that don't exist or invalidating unfollows if a user did not previously follow another user. Docks allow for a max of 15 minutes buffer before invalidating events, that means, if there is a reaction event to a post that may have already been created on chain but not persisted to the relational db, we'll wait for at most 15 minutes for the post to be present before invalidating the reaction event.

  3. Writing events - After validating events docks will then write these events to their relational database.

  4. Provide an api - Clients can then query the networks data, by connecting to any dock

Last updated