SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Offline first
Do you need internet for your app to work?
Ran.ga.na.than B @ran_than
“What is the World population?”
“Can you explain BigBang theory in 1
sentence?”
Cognitive Prosthesis
The Internet Makes You Think
You’re Smarter Than You Are
src: https://hbr.org/2015/07/the-internet-makes-you-think-youre-smarter-than-you-are
“Everything is obvious, once you know the answer.”
#FFCC00
src: http://philip.greenspun.com/images/200206-michigan/sorry-no-internet-today-1.jpg
60% of the world is still
without internet
Over 4 billion people are offline around the world
src: http://www.independent.co.uk/news/world/60-of-the-world-is-still-without-internet-9927824.html
#FFCC00
–washingtonpost
“In India, for instance, roughly 45 percent of the
population lives without electricity, making
Internet access all the more unthinkable.”
src: https://www.washingtonpost.com/news/wonk/wp/2014/10/02/4-4-billion-people-around-the-world-still-dont-have-internet-heres-w
“What is the circumference of the Earth?”
#FFCC00
src: http://www.deluxebattery.com/wp-content/uploads/2014/08/albert-einstein-intriging-questions-01.jpg
“Do you still need internet for your app to work?”
History of Hardware & Software
• Big machines
• Integrated with the machine
• Desktops & Laptops
• Standalone applications (offline)
• Browsers for online
• Mobiles & Tablets
• Apps
• Cloud
• Wearables
• Apps evolving
Offline first
“Write your app as if it has no internet
connection.”
Google Trends 2003 - 2015
Benefits
• Seamless access
• Faster
• No data loss
of offline first
Hospital system for low
resource settings
An easy to use open source EMR & hospital system
“The story of Community Health Workers.”
Patient records in paper form at JSS
Bahmni Architecture
Bahmni Architecture - Simpler version
The power of the device
1GB RAM
600MB internal storage
5.62GB SD card
Arm cortex a9 1.4ghz dual core
Technical Constraints
• Network – we would be catering to devices on intermittent
at best 2G networks.
• Disk space – devices are very low on disk space.
• Battery
• People using this will not be tech savvy (UX).
Anatomy of our Application
1. Static Data (JS, HTML, CSS, Images, etc)
2. Transactional Data (customer data)
3. REST calls
4. UI and UX
5. Security
1. Static Data
1. Browser cache
2. App cache - Demo
3. Service workers - Demo
4. Bundling
Cache First First from cache, the update from network
Request strategy
• Network first
• Cache first
• Fastest
• Cache only
• Network only
1. Static Data
1. Browser cache
2. App cache - Demo
3. Service workers - Demo
4. Bundling
2. Transactional Data
1.Cookies
• 300 cookies in total
• 4096 bytes per cookie
• 20 cookies per domain
• 20 cookies of max size 4096 = 81920 bytes per
domain
• Good for state management
2, 3.)WebStorage/localstorage
• Sessionstorage
• available per origin
• alive till page is closed
• Localstorage
• per origin
• lasts till localStorage.clear(); or localStorage.remove(‘key');
• By default, the limit is 5MB per domain
4. Web SQL Database
• queried using a variant of SQL
• ceased working on spec November 2010, since SQLite
was only backend
• By default, the limit is 5MB per domain
5. FileSystem API
• Request quota access and use file system
• April 2014, W3C stopped standardizing.
• chrome is supporting
6. indexedDB
• async
• API(query and code) not cool. But we have wrappers.
• Dexie.js
• db.js
• PouchDB
• IDBWrapper
• Lovefield (Google)
• If using temp(default), when space becomes low, chrome/firefox will clear out an IDB
data based on a LRU policy.
• 5MB (mobile), 50MB (desktop) are free, can remove the restriction with grant permission.
7. SQLite
• SQL like DB for browsers
2.Transactional Data
1. Cookies
2. Web Storage
3. Local Storage
4. Web SQL
5. FileSystem API
6. indexedDB (lovefield wrapper) for chrome
7. SQLite for android
3. REST: Pull & Push
3. REST: WebWorkers
4. UI & UX
http://github.hubspot.com/offline/docs/welcome/
No difference between online and offline
5. Security
1. Encrypted all local data with SQLCipher
2. SSL
3. Forward hashed the password
4. Regular logout
Solution
1.Static Data - Bundling
2.Transactional Data
1. lovefield for chrome
2. SQLite for android
3.REST calls - WebWorkers
4.UI and UX - Seamless
5. Security - Encrypt, SSL, and forward hash password
“Thank you.”

Weitere ähnliche Inhalte

Andere mochten auch

Chapter 3 part2- Sampling Design
Chapter 3 part2- Sampling DesignChapter 3 part2- Sampling Design
Chapter 3 part2- Sampling Design
nszakir
 
LABORATORY AND PHYSICAL ASSESSMENT DATA (1)
LABORATORY AND PHYSICAL ASSESSMENT DATA (1)LABORATORY AND PHYSICAL ASSESSMENT DATA (1)
LABORATORY AND PHYSICAL ASSESSMENT DATA (1)
Andrew Agbenin
 
Портрет слова группа 1
Портрет слова группа 1Портрет слова группа 1
Портрет слова группа 1
Harokol
 
Analysing problems creatively final
Analysing problems creatively finalAnalysing problems creatively final
Analysing problems creatively final
Zain Shaikh
 
Ang aking pananaw sa pamilya
Ang aking pananaw sa pamilyaAng aking pananaw sa pamilya
Ang aking pananaw sa pamilya
Rom Teña
 

Andere mochten auch (20)

DMDL EditorXとToad Editorの紹介
DMDL EditorXとToad Editorの紹介DMDL EditorXとToad Editorの紹介
DMDL EditorXとToad Editorの紹介
 
Winter art from Ireland
Winter art from IrelandWinter art from Ireland
Winter art from Ireland
 
Chapter 3 part2- Sampling Design
Chapter 3 part2- Sampling DesignChapter 3 part2- Sampling Design
Chapter 3 part2- Sampling Design
 
LABORATORY AND PHYSICAL ASSESSMENT DATA (1)
LABORATORY AND PHYSICAL ASSESSMENT DATA (1)LABORATORY AND PHYSICAL ASSESSMENT DATA (1)
LABORATORY AND PHYSICAL ASSESSMENT DATA (1)
 
Health literacy
Health literacyHealth literacy
Health literacy
 
samoupravlenie
samoupravleniesamoupravlenie
samoupravlenie
 
Business Game Presentation of Management Audit
Business Game Presentation of Management AuditBusiness Game Presentation of Management Audit
Business Game Presentation of Management Audit
 
why rape jokes are bad
why rape jokes are badwhy rape jokes are bad
why rape jokes are bad
 
Citrus College Sample Work
Citrus College Sample WorkCitrus College Sample Work
Citrus College Sample Work
 
Портрет слова группа 1
Портрет слова группа 1Портрет слова группа 1
Портрет слова группа 1
 
Analysing problems creatively final
Analysing problems creatively finalAnalysing problems creatively final
Analysing problems creatively final
 
Tips In Choosing Effective Patient Education Materials
Tips In Choosing Effective Patient Education MaterialsTips In Choosing Effective Patient Education Materials
Tips In Choosing Effective Patient Education Materials
 
GIDS 2016 Understanding and Building No SQLs
GIDS 2016 Understanding and Building No SQLsGIDS 2016 Understanding and Building No SQLs
GIDS 2016 Understanding and Building No SQLs
 
Blaue Tulpen - blue tulips
Blaue Tulpen - blue tulipsBlaue Tulpen - blue tulips
Blaue Tulpen - blue tulips
 
Snowmen from POland
Snowmen from POlandSnowmen from POland
Snowmen from POland
 
Receiving your State Pension abroad
Receiving your State Pension abroadReceiving your State Pension abroad
Receiving your State Pension abroad
 
samoupravlenye
samoupravlenyesamoupravlenye
samoupravlenye
 
Ang aking pananaw sa pamilya
Ang aking pananaw sa pamilyaAng aking pananaw sa pamilya
Ang aking pananaw sa pamilya
 
Technology -- the first strategy to startups
Technology  -- the first strategy to startupsTechnology  -- the first strategy to startups
Technology -- the first strategy to startups
 
JJUG CCC 2016 Fall hishidama
JJUG CCC 2016 Fall hishidamaJJUG CCC 2016 Fall hishidama
JJUG CCC 2016 Fall hishidama
 

Ähnlich wie Offline First Applications

Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
ALTER WAY
 
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Open Analytics
 
Open Data Summit Presentation by Joe Olsen
Open Data Summit Presentation by Joe OlsenOpen Data Summit Presentation by Joe Olsen
Open Data Summit Presentation by Joe Olsen
Christopher Whitaker
 
Frontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling FrameworkFrontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling Framework
sixtyone
 

Ähnlich wie Offline First Applications (20)

Apache Geode - The First Six Months
Apache Geode -  The First Six MonthsApache Geode -  The First Six Months
Apache Geode - The First Six Months
 
Joyent circa 2006 (Scale with Rails)
Joyent circa 2006 (Scale with Rails)Joyent circa 2006 (Scale with Rails)
Joyent circa 2006 (Scale with Rails)
 
IPv6 Matrix Project
IPv6 Matrix ProjectIPv6 Matrix Project
IPv6 Matrix Project
 
IPv6 Matrix Project - general presentation
IPv6 Matrix Project - general presentationIPv6 Matrix Project - general presentation
IPv6 Matrix Project - general presentation
 
WisdomEye Technologies
WisdomEye TechnologiesWisdomEye Technologies
WisdomEye Technologies
 
WisdomEye Technologies
WisdomEye TechnologiesWisdomEye Technologies
WisdomEye Technologies
 
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
 
Offline-First Progressive Web Apps
Offline-First Progressive Web AppsOffline-First Progressive Web Apps
Offline-First Progressive Web Apps
 
Deep Web and TOR Browser
Deep Web and TOR BrowserDeep Web and TOR Browser
Deep Web and TOR Browser
 
The Semantic Web: The Why? What? How?
The Semantic Web: The Why? What? How?The Semantic Web: The Why? What? How?
The Semantic Web: The Why? What? How?
 
BDI- The Beginning (Big data training in Coimbatore)
BDI- The Beginning (Big data training in Coimbatore)BDI- The Beginning (Big data training in Coimbatore)
BDI- The Beginning (Big data training in Coimbatore)
 
Facebook Scaling Overview
Facebook Scaling OverviewFacebook Scaling Overview
Facebook Scaling Overview
 
MongoDB IoT City Tour LONDON: Why your Dad's database won't work for IoT. Joe...
MongoDB IoT City Tour LONDON: Why your Dad's database won't work for IoT. Joe...MongoDB IoT City Tour LONDON: Why your Dad's database won't work for IoT. Joe...
MongoDB IoT City Tour LONDON: Why your Dad's database won't work for IoT. Joe...
 
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
Social Media, Cloud Computing, Machine Learning, Open Source, and Big Data An...
 
Open Data Summit Presentation by Joe Olsen
Open Data Summit Presentation by Joe OlsenOpen Data Summit Presentation by Joe Olsen
Open Data Summit Presentation by Joe Olsen
 
Top 17 web scraping tools for data extraction in 2022
Top 17 web scraping tools for data extraction in 2022Top 17 web scraping tools for data extraction in 2022
Top 17 web scraping tools for data extraction in 2022
 
Microblogging: A Semantic Web and Distributed Approach
Microblogging: A Semantic Web and Distributed ApproachMicroblogging: A Semantic Web and Distributed Approach
Microblogging: A Semantic Web and Distributed Approach
 
Frontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling FrameworkFrontera-Open Source Large Scale Web Crawling Framework
Frontera-Open Source Large Scale Web Crawling Framework
 
Grant: The Impact of Cloud, Mobile, and Managing the Changing Platforms of Di...
Grant: The Impact of Cloud, Mobile, and Managing the Changing Platforms of Di...Grant: The Impact of Cloud, Mobile, and Managing the Changing Platforms of Di...
Grant: The Impact of Cloud, Mobile, and Managing the Changing Platforms of Di...
 
Baabtra.com template_Basics about Internet_jijojoseph
Baabtra.com template_Basics about Internet_jijojosephBaabtra.com template_Basics about Internet_jijojoseph
Baabtra.com template_Basics about Internet_jijojoseph
 

Mehr von techmaddy

Mehr von techmaddy (6)

Qcon London2020 Scaling distributed teams
Qcon London2020  Scaling distributed teamsQcon London2020  Scaling distributed teams
Qcon London2020 Scaling distributed teams
 
Apache parquet - Apache big data North America 2017
Apache parquet - Apache big data North America 2017Apache parquet - Apache big data North America 2017
Apache parquet - Apache big data North America 2017
 
Serverless architectures
Serverless architecturesServerless architectures
Serverless architectures
 
Technology -- the first strategy to startups
Technology  -- the first strategy to startupsTechnology  -- the first strategy to startups
Technology -- the first strategy to startups
 
The best of Apache Kafka Architecture
The best of Apache Kafka ArchitectureThe best of Apache Kafka Architecture
The best of Apache Kafka Architecture
 
Apache big data 2016 - Speaking the language of Big Data
Apache big data 2016 - Speaking the language of Big DataApache big data 2016 - Speaking the language of Big Data
Apache big data 2016 - Speaking the language of Big Data
 

Kürzlich hochgeladen

6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 

Kürzlich hochgeladen (20)

Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
VVIP Pune Call Girls Mohammadwadi WhatSapp Number 8005736733 With Elite Staff...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 

Offline First Applications