From c2bb0c49899a01cdb6d6aba78b736bb968354458 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Mon, 24 May 2021 16:41:13 +0200 Subject: [PATCH] chg: [data structure] new parent and child prefix in Redis for describing publishing relationship --- backend/data-structure.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/backend/data-structure.md b/backend/data-structure.md index cb0e2d0..7f6193f 100644 --- a/backend/data-structure.md +++ b/backend/data-structure.md @@ -3,7 +3,7 @@ The data structure is based on a Redis-compatible data store. [kvrocks](https://github.com/bitleak/kvrocks) is the Redis-compatible data store used for CyCAT but any compatible Redis data store can be used. -# UUID k/v +# u: Each UUID inserted in CyCAT has at least an entry in the backend with the following format: @@ -15,19 +15,32 @@ Each UUID inserted in CyCAT has at least an entry in the backend with the follow |-----|-----------------------------------------| | 1 | Publisher | | 2 | Project | +| 3 | Item | -# UUID hash table +# : (hash table) Each UUID inserted might have a corresponding hash table - `:` -> keys associated with the hash table type -# type sorted set +# t: (sorted set) Each type got a sorted set (with a score of one) to easily paginate over the various types - `t:` -> `` +# parent: (set) + +The parent(s) UUID of the UUID. + +- `parent:` -> {`UUID`, `UUID`} + +# child: (set) + +The child(ren) UUID of the UUID. + +- `child:` -> {`UUID`, `UUID`} + # Statistics ## Automatic API statistics