From 089d2fe430ea2102350321aa1496dc5812b1a344 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Sat, 28 Mar 2020 12:33:56 +0100 Subject: [PATCH] some notes on the general idea of persisting network calls in brawl --- doc/persisted-network-calls.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/persisted-network-calls.md diff --git a/doc/persisted-network-calls.md b/doc/persisted-network-calls.md new file mode 100644 index 00000000..74fd7679 --- /dev/null +++ b/doc/persisted-network-calls.md @@ -0,0 +1,8 @@ +# General Pattern of implementing a persisted network call + + 1. do network request + 1. start transaction + 1. write result of network request into transaction store, keeping differences from previous store state in local variables + 1. close transaction + 1. apply differences applied to store to in-memory data + 1. emit events for changes