Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Nov 10, 2023
1 parent d392891 commit b063608
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
21 changes: 20 additions & 1 deletion docs/ids.md
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
Let’s talk about IDs…
Often, "ID" is synonymous with the auto-incrementing `id` column in your database of choice. For
mose applications, there really is no distinction. But in event sourcing, you need to think of IDs
as globally-unique identity—separate from the database that you happen to be using at any given time.

## Globally-Unique Identity?

If you create a new table and insert the first row into it, the `id` value is likely to be `1`. This
is not globally unique in your system. There are other things with an `id` of `1`.

In event sourcing, it's best to use fully unique IDs. Traditional systems typically use UUIDs for this
because the likelihood of a collision is astronomically low. The problem with UUIDs is that they require
128 bits of storage, which is larger than most databases support for integer IDs. So instead of a 64-bit
unsigned big integer, you're stuck with a 36-character string. And while the indexing performance is
probably not a major issue for most systems, it can become a problem with larger tables.

The solution in Verbs is to use Snowflake IDs. Snowflakes are still unique (although you need to do a little
configuration if you're running many servers in parallel), but fit in a 64-bit integer.

So instead of something like `4c5433c4-4cfb-4126-81be-44a3af5552a0`, Snowflake IDs look something
like `113482333712809984`.
4 changes: 0 additions & 4 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Let’s get you started with Verbs!

## Prerequisites

First, make sure you have the following installed:

- [Laravel version 10 or later](https://laravel.com/docs/10.x)
Expand Down
14 changes: 0 additions & 14 deletions src/Projection.php

This file was deleted.

0 comments on commit b063608

Please sign in to comment.