RFC - Trait Catalogue

Trait cataloging & identity indexing is only applicable to client-side SDK consumers. Server-side SDK users will not be able to index user traits (since evaluation is done locally).

Background

In order to target users based on their traits (aka attributes), Flagbase will need to maintain an index of these traits for fast lookup. We will call this index the “trait catalogue”

Solution

Upon evaluating a client-side feature flag, the evaluating user’s trait set will be pushed onto a queue. Processing of this queue (managed by trait-catalogue-service) will consist of the following steps:

  1. Ensure key length is appropriate (i.e. in order to prevent overflow attacks, which may halt processing)

  2. Normalise keys (i.e. convert camalCase values into snake_case)

  3. Insert normalized key into traits table with the key indexed.