SlideShare a Scribd company logo
State
You're Building a Distributed System!
You're Building a Distributed System!
You're Building a Distributed System!
You're Building a Distributed System!
You're Building a Distributed System!
You're Building a Distributed System!
You’re Building a Distributed System!
Mike Pack
@mikepack_
@mikepack
You're Building a Distributed System!
You're Building a Distributed System!
You're Building a Distributed System!
State
State
Ephemeral State
Permanent State
…
Ephemeral State
Local to the user’s browser.
Cleared on page refresh.
Not persisted to a server.
You're Building a Distributed System!
Permanent State
Persisted to a server.
Written to disk.
You're Building a Distributed System!
State in Ember
Application
Memory
(Ephemeral)
Application
Memory
(Ephemeral)
Ember Data
Application
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Ember Data
Application
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
Ember Data
Application
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
Ember Data
HTTP
Disk
(Permanent)
Server
Application
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
Ember Data
HTTP
Disk
(Permanent)
Server
Application
State
Ephemeral State
Permanent State
…
State
Ephemeral State
Permanent State
Semipermanent State
Lives in the browser.
Transitory.
Written to disk.
You're Building a Distributed System!
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
Ember Data
HTTP
Disk
(Permanent)
Server
Application
Disk
(Semipermanent)
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
IndexedDB
Ember Data
HTTP
Disk
(Permanent)
Server
Application
Synchronization
Server
HTTP
Browser
2xx
Server
HTTP
Browser
2xx
Server
HTTP
Browser
2xx
Server
HTTP
Browser
2xx
Server
HTTP
Browser
Disk
(Semipermanent)
IndexedDB
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
Ember Data
HTTP
Disk
(Permanent)
Server
1
2
3
Application
Browser Server
Computer A Computer B
Computer A Computer B
Computer C
Computer A
Computer B
Computer CComputer D
Computer N
CAP Theorem
CAP Theorem
Consistency
Availability
Partition Tolerance
Consistency
All nodes have the same data.
Browser Server
Consistent
Browser Server
Inconsistent
Availability
The software is fully functional.
Browser Server
Available
Browser Server
Unavailable
Browser Server
Available
IndexedDB
(Semipermanent)
Partition Tolerance
The choice between being
consistent or available.
Computers will fail.
Browser Server
Unavailable + Consistent
Browser Server
Available + Inconsistent
IndexedDB
(Semipermanent)
Going Offline
Disk
(Semipermanent)
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
IndexedDB
Ember Data
HTTP
Disk
(Permanent)
Server
Application
Back Online, Time to Sync
Disk
(Semipermanent)
IndexedDB
Memory (DS.Store)
(Ephemeral)
Memory
(Ephemeral)
Browser
Ember Data
HTTP
Disk
(Permanent)
Server
Application
CouchDB + PouchDB
Firebase
Orbit.js
CRDTs
Why This Matters
Go offline
Minimize data loss
Zero latency UIs
WIP (Work in Progress)
Thanks!
@mikepack_
@mikepack

More Related Content

PDF
Objects, Objects Everywhere
PDF
Enemy of the state
PDF
Ember Data and JSON API
PDF
Oredev 2013: Building Web Apps with Ember.js
PDF
Modern, Scalable, Ambitious apps with Ember.js
PPTX
azure track -04- azure storage deep dive
PPTX
Azure storage deep dive
PPTX
Intro to EmberJS
Objects, Objects Everywhere
Enemy of the state
Ember Data and JSON API
Oredev 2013: Building Web Apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.js
azure track -04- azure storage deep dive
Azure storage deep dive
Intro to EmberJS

Recently uploaded (20)

PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Project quality management in manufacturing
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Well-logging-methods_new................
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Welding lecture in detail for understanding
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Lecture Notes Electrical Wiring System Components
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Digital Logic Computer Design lecture notes
UNIT-1 - COAL BASED THERMAL POWER PLANTS
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Project quality management in manufacturing
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
OOP with Java - Java Introduction (Basics)
Well-logging-methods_new................
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
Welding lecture in detail for understanding
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Automation-in-Manufacturing-Chapter-Introduction.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Lecture Notes Electrical Wiring System Components
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Foundation to blockchain - A guide to Blockchain Tech
Digital Logic Computer Design lecture notes
Ad
Ad

You're Building a Distributed System!