Skip to content

Commit eaa70bc

Browse files
committed
add section clarifying use of PostgreSQL links to dwyl/learn-postgresql#31 for #1
1 parent 40311fc commit eaa70bc

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

README.md

+42-9
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ you have _experienced_ the power of an Append-only Log.
2626

2727
<div align="center">
2828
<a href="http://www.poorlydrawnlines.com/comic/undo/">
29-
<img src="https://user-images.githubusercontent.com/194400/46946840-f2030980-d070-11e8-853e-906f8734ce75.png" alt="poorly drawn lines: ctrl + z">
29+
<img src="https://user-images.githubusercontent.com/194400/46946840-f2030980-d070-11e8-853e-906f8734ce75.png"
30+
alt="poorly drawn lines comic: ctrl + z">
3031
</a>
3132
</div>
3233
<br />
@@ -55,7 +56,8 @@ It also means we are **_never_ confused** about how data/state was transformed:
5556

5657
<div align="center">
5758
<a href="https://twitter.com/jessitron/status/333228687208112128">
58-
<img src="https://user-images.githubusercontent.com/194400/46946485-c4699080-d06f-11e8-9b1e-30982cfb5c25.png" alt="@Jessitron (Jessica Kerr) tweet: Mutability leaves us with how did I get to this state?">
59+
<img src="https://user-images.githubusercontent.com/194400/46946485-c4699080-d06f-11e8-9b1e-30982cfb5c25.png"
60+
alt="@Jessitron (Jessica Kerr) tweet: Mutability leaves us with how did I get to this state?">
5961
</a>
6062
</div>
6163
<br />
@@ -80,7 +82,7 @@ charts/graphs in _realtime_!
8082

8183
## What?
8284

83-
Using an Append Only Log is an alternative to using Ecto's regular
85+
Using an Append Only Log is an _alternative_ to using Ecto's regular
8486
["CRUD"](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete)
8587
which allows overwriting and deleting data
8688
without "rollback" or "recoverability".
@@ -117,9 +119,9 @@ through the change log is a really good idea. 🕙 ↩️ 🕤 ✅
117119
means you can invite your trusted readers / stakeholders
118120
to edit/improve your content
119121
without "fear" of it decaying. 🔏
120-
- **E-Commerce** - both for journey/cart tracking and transaction reliability. 🛒
122+
- **E-Commerce** - both for cart tracking and transaction logging. 🛒
121123
+ Also, the same applies for the Product catalog
122-
(which is a specific type of CMS);
124+
(_which is a specific type of CMS_);
123125
having version history dramatically increases confidence in the site both
124126
from an internal/vendor perspective and from end-users.
125127
This is _especially_ useful for the reviews on e-commerce sites/apps
@@ -154,14 +156,44 @@ as a "snapshot" in time. The doctor or
154156
does not go back and "update" the value of the patients heart rate
155157
or electrophysiologic pattern.
156158
A _new_ value is sampled at _each_ time interval.
157-
+ **Analytics** is _all_ append-only logs which are a time-series of events _streamed_ from the device to server, saved in a time-series data store,
158-
and streamed (_or "replayed"_) to visualisation dashboard.
159-
+ Events in Analytics systems are often _aggregated_ (_using "views"_) into charts/graphs. The "views" of the data are "temporary tables" which store the _aggregated_ or _computed_ data but do not touch the underlying log/stream.
159+
+ **Analytics** is _all_ append-only time-series events
160+
_streamed_ from the device to server and saved in a time-series data store.
161+
+ Events in Analytics systems are often _aggregated_ (_using "views"_)
162+
into charts/graphs. The "views" of the data are "temporary tables"
163+
which store the _aggregated_ or _computed_ data
164+
but do not touch the underlying log/stream.
160165
- **Most Other Web/Mobile Applications** - you name the app,
161166
there is _always_ a way in which an append-only log
162167
is applicable/useful/essential
163168
to the reliability/confidence _users_ have in that app. 💖
164169

170+
### Append-only Using _PostgreSQL_...?
171+
172+
This example uses "stock" PostgreSQL and does not require any plugins.
173+
This is a _deliberate choice_ and we use this approach in "production".
174+
This means we can use _all_ of the power of Postgres,
175+
and deploy our app to any "Cloud" provider that supports Postgres.
176+
177+
If your app ever "outgrows" Postgres,
178+
you can easily migrate to
179+
["CitusDB"](https://github.com/dwyl/how-to-choose-a-database/issues/4)
180+
181+
Using an Append-only Log with UUIDs as Primary Keys
182+
is _all_ the "ground work" we need to ensure that _any_ app
183+
we build is _prepared_ to scale **_both_ Vertically _and_ Horizontally**. ✅ 🚀
184+
If/when our app reaches **10k writes/sec**
185+
we will be **_insanely_** "**successful**" by _definition_. 🦄 🎉
186+
For example: an AWS RDS (PostgreSQL)
187+
[`db.m4.16xlarge` instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
188+
has **256GB** of RAM and can handle **10GB**/second of "throughput".
189+
It's been _benchmarked_ at ***200k writes/second*** ...
190+
if we _ever_ need to use **one** of these instances we will be
191+
making enough revenue to hire a _team_ of Database experts!
192+
193+
**Bottom line**: _embrace_ Postgres for your App,
194+
you are in ["good company"](https://github.com/dwyl/learn-postgresql/issues/31).
195+
Postgres can handle whatever you throw at it,
196+
loves append-only data!
165197

166198
## Who?
167199

@@ -177,7 +209,8 @@ including the ability to (optionally/incrementally) use IPFS and/or Blockchain!
177209
The only pre-requisite for understanding this example/tutorial are:
178210

179211
+ Basic Elixir language syntax knowledge: https://github.com/dwyl/learn-elixir
180-
+ Basic Phoenix Framework knowledgE: https://github.com/dwyl/learn-phoenix-framework
212+
+ Basic Phoenix Framework knowledge:
213+
https://github.com/dwyl/learn-phoenix-framework
181214

182215
We _recommend_ that you follow the Phoenix Chat Example (_tutorial_):
183216
https://github.com/dwyl/phoenix-chat-example

0 commit comments

Comments
 (0)