Open nelsonic opened 6 years ago
Thanks for this phenomenal append-only log example!
PostgreSQL has a UUID type that only takes up 16 bytes (much less than UUID as string) and is supported by Ecto:
Migration:
add :entry_id, :uuid
Schema:
field :entry_id, Ecto.UUID
Was string chosen for UUID storage for a particular reason?
@njwest thanks for sharing. I hadn’t spotted the PgSQL UUID Type. Good to know. 👍🏻
At present we are using a Random UUID for
entry_id
see: /lib/alog.ex#L269
This is good in that it is "globally unique". But is it the most effective unique ID we could be using?