diff options
Diffstat (limited to '')
-rw-r--r-- | _slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides | 130 |
1 files changed, 122 insertions, 8 deletions
diff --git a/_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides b/_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides index a18700d..8f207c9 100644 --- a/_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides +++ b/_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides @@ -13,16 +13,23 @@ published: false --- +# Premise + +Datomic's bottleneck is **write** throughput, not read + +--- + When creating a new service... --- ```clojure -(defn prototype->database - [prototype] - (if (= :global prototype) - :datomic - #{:dynamodb :redis :nothing})) +(defn database-for-service + [service] + (let [prototype (prototype-for-service service)] + (if (= :global prototype) + :datomic + #{:dynamodb :redis :nothing}))) ``` --- @@ -31,11 +38,117 @@ When creating a new service... --- -notifications vs toasty +The deciding factor shouldn't be the prototype, but the **cardinality** + +--- + +```diff + (defn database-for-service + [service] +- (let [prototype (prototype-for-service service)] +- (if (= :global prototype) +- :datomic +- #{:dynamodb :redis :nothing}))) ++ (let [cardinality (cardinality-for-service service)] ++ (if (= :too-high cardinality) ++ #{:dynamodb :redis :nothing ++ :datomic)))) +``` + +--- + +```clojue +(defn database-for-service + [service] + (let [cardinality (cardinality-for-service service)] + (if (= :too-high cardinality) + #{:dynamodb :redis :nothing + :datomic)))) +``` + +--- + +But how to determine when the cardinality is + +**`:too-high`**? + +--- + +Let's think about the cardinality of existing services we know + +--- + +What is the cardinality of... + +--- + +# savings-accounts + +--- + +# inductor + +--- + +# crebito + +--- + +# diablo + +--- + +# lost-boy? + +--- + +# hook? + +--- + +# ledger + +--- + +# blackleach + +--- + +# notification + +--- + +# toasty + +--- + +# auth + +--- + +# waypoint + +--- + +# jurassic-park + +--- + +Compare the database choice of services with similar cardinalities: + +## notifications vs toasty + +--- + +Compare different cardinalities for services on global prototype: + +## jurassic-park vs auth + +--- -jurassic-park vs auth +Compare different cardinality for different services inside the same domain: -blackleach -> diablo -> ledger +## savings-accounts -> blackleach -> diablo -> ledger --- @@ -45,3 +158,4 @@ References: 1. these slides: [{{ site.tld }}/slides.html]({% link slides.md %}) 2. [prose version of this presentation]({% link _articles/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.md %}) +3. "[Understanding Database Sharding](https://www.digitalocean.com/community/tutorials/understanding-database-sharding)" |