diff options
author | EuAndreh <eu@euandre.org> | 2020-11-07 11:24:58 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-11-07 11:26:12 -0300 |
commit | b18dbbeb4e62a1481bd039c32152850c94e764f4 (patch) | |
tree | b7a1c59bf64b9594596897c0c43a10fec4af5f57 /_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides | |
parent | Add todos.org bugs article, with raw pofiles (diff) | |
download | euandre.org-b18dbbeb4e62a1481bd039c32152850c94e764f4.tar.gz euandre.org-b18dbbeb4e62a1481bd039c32152850c94e764f4.tar.xz |
Update "Datomic on global" slides, as presented
Diffstat (limited to '_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides')
-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)" |