Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Data: online and off
Search
Phil Nash
September 21, 2015
Programming
0
170
Data: online and off
Phil Nash
September 21, 2015
Tweet
Share
More Decks by Phil Nash
See All by Phil Nash
Four steps from JavaScript to TypeScript
philnash
3
550
JavaScript Apps Go Intl - GIDS Live 2021
philnash
2
350
You're on Mute! WebRTC and our Lives on Screen - GIDS Live 2021
philnash
1
350
Better API DX with a CLI - APIdays Jakarta
philnash
0
420
The trouble with webhooks - at Apidays Live Hong Kong
philnash
2
260
Four steps from JavaScript to TypeScript
philnash
0
470
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The trouble with webhooks - at APIdays Singapore
philnash
0
380
What's going on with Project Fugu? at DevTalks Reimagined
philnash
0
600
Other Decks in Programming
See All in Programming
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
180
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.7k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
470
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
630
CSC307 Lecture 06
javiergs
PRO
0
680
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
180
GISエンジニアから見たLINKSデータ
nokonoko1203
0
200
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
ThorVG Viewer In VS Code
nors
0
760
Grafana:建立系統全知視角的捷徑
blueswen
0
320
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
200
Featured
See All Featured
Bash Introduction
62gerente
615
210k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Invisible Side of Design
smashingmag
302
51k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
100k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
370
It's Worth the Effort
3n
188
29k
Building Adaptive Systems
keathley
44
2.9k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Docker and Python
trallard
47
3.7k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
130
Transcript
DATA: ONLINE AND OFF
Phil Nash @philnash http:/ /philna.sh
[email protected]
DATA: ONLINE AND OFF
OFFLINE FIRST
Offline first An application that treats the network as an
enhancement
Not offline first • Graceful failure to network requests •
Just saving data client side
None
None
THINGS TO CONSIDER
ASSETS
SERVICE WORKER
None
USER DATA
None
DATA: ONLINE AND OFF
Data: online and off • Traditional application data storage •
Traditional vs offline first • Browser based data storage • Offline first and data
TRADITIONAL APPLICATION DATA STORAGE
GET / POST
Traditional application data storage 1. POST data to a server
2. Server stores data in a database 1. GET request for data 2. Server interprets request and delivers
OFFLINE?
TRADITIONAL VS OFFLINE FIRST
INTERACT LOCALLY
Interact locally • Save data locally • Retrieve data from
local cache
Interact locally • Crazy fast! • The network doesn't matter
THEN SYNC
Sync • People have multiple devices • Good as a
backup
Sync • Can be asychronous • Can be intentional •
Requires network
DATA STORAGE IN THE FRONT END
LOCALSTORAGE
LocalStorage • Simple key value store • Synchronous (slow)
WEBSQL
WEBSQL
INDEXEDDB
IndexedDB • Asynchronous • o_O
MAKING DATA OFFLINE FIRST
Making data offline first We need something that is: •
Easily distributed • Eventually consistent • Resolves conflicts • Web friendly
None
CouchDB Apache CouchDB™ is a database that uses JSON for
documents, JavaScript for MapReduce indexes, and regular HTTP for its API
None
PouchDB • CouchDB for the browser/Node • Wraps IndexedDB or
WebSQL • LocalStorage adapter available as a plugin
DEMO
Offline first • The time for offline first is now
• Distributing data like this requires a change of mindset • Not all application data needs to be stored this way
Help me! On a scale of 0 to 10, how
likely is it that you would recommend this talk to a friend or colleague? 0203 322 5761
Thanks! @philnash http:/ /philna.sh
[email protected]
On a scale of 0
to 10, how likely is it that you would recommend this talk to a friend or colleague? 0203 322 5761