Ephemeral vs Durable State
How identity, session memory, and disk database transactions coordinate
1: Anon
2: Log In
3: Add Cart
4: Commit
Pause
Reset
Loading state explanation...
1. Browser (UI Actions)
LOGIN
ADD TO CART
CHECKOUT
2. Server (Express & Session Memory)
EXPRESS ROUTER
REQ.SESSION.USERID
REQ.SESSION.CART
GETDB() / SAVEDB()
3. Disk Storage
STORE.DB
TABLE: USERS
id | username | hash
TABLE: PRODUCTS
id | name | price
TABLE: ORDERS
id | user_id | total
TABLE: ORDER_ITEMS
id | order_id | prod_id
/login
/cart
/checkout
identify
update
query
read
commit
write
Tooltip Text