Skip to content

Commit

Permalink
improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
p9f committed May 23, 2024
1 parent e89a4a8 commit fbd6f1e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Efficient handling of high cardinality metadata.

In order to explain the main concept, let's go through an example:


## How it works

![schema](./docs/schema.png)

Given the id `cwxpd-3BDb2jXPk`:
1. `cwxpd` is the template id. We can use it to retrieve the template from a database.
2. the `userId` is an integer encoded in the id as `3BD` -> `213123`
3. the `timestamp` is an datetime encoded in the id as `b2jXPk` -> `2024-05-22 15:13:56+00:00`
4. the id can be fully parsed, using both the high cardinality fields (`user_id`, `timestamp`) from the id itself and the other fields (`algorithm`, `promoted`) in the template.


## Use case

We have an online shopping website, where user are shown recommended products.
Expand Down
Binary file added docs/schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fbd6f1e

Please sign in to comment.