yaseenkadir / etchedjournal

An encrypted journal where entries are etched in stone.
Apache License 2.0
0 stars 0 forks source link

Change id mechanism #95

Closed yaseenkadir closed 5 years ago

yaseenkadir commented 5 years ago

We currently use both auto incrementing primary keys and random string keys to generate ids. These are the following properties we want:

  1. Unable to (easily) guess the id of another entity
  2. Unable to determine total number of entities created
  3. Can be encoded into a relatively short string (ideally around 12-16 chars)

Looks like a Snowflake-like mechanism would be pretty good. It's a proven solution. We get the benefit of having entities be sorted by timestamp and id.