SlideShare a Scribd company logo
Local Storage for Web
Applications
T-111.5502 Seminar on Media Technology B P (4-8 cr)
Presentation

Markku Laine, M.Sc. (Tech.)
markku.laine@aalto.fi

                                November 22, 2011
Presentation Outline

•  Introduction
•  Evolution
•  Revolution: The HTML5 Approach
   –    Web Storage
   –    Indexed Database API
   –    Web SQL Database
   –    HTML5 Offline
•  Research topics
•  Conclusion


                               2
Introduction




        3
Conventional Interaction Model




                      4
Modern Interaction Model




                      5
Benefits of Local Storage

•    Reduces server load
•    Less data to be transferred
•    Faster websites
•    Enables offline support
•    Improves user experience




                                   6
Evolution




       7
Cookie

•  Conventional approach
•  Simple key-value pairs
•  Information via HTTP headers
    –  Extra overhead
•  Typically used for session
   management
•  Storage size limited to 4 kB
    –  Way too small for modern Web
       applications
•  Problems when running the same
   application in multiple windows
•  Supported by major browsers

                                      8
Local Shared Object (Flash Cookie)

•  Proprietary browser plug-in (Adobe
   Flash 6+, 2002)
•  Storage size limited to 100 kB per
   domain (can be increased)
•  ExternalInterface (Adobe Flash 8+,
   2006)
   –  Easy and fast access to LSOs
      from JavaScript




                                        9
(Google) Gears: R.I.P. 2007-2011

•  Open-source browser plug-in,
   http://gears.google.com/
•  Several major APIs: e.g., Database
   (SQLite), WorkerPool, LocalServer,
   Desktop, and Geolocation
•  Storage size unlimited per domain
•  Focus from Gears to HTML5 and
   associated APIs: Indexed
   Database API, Web Workers,
   Geolocation API
•  Does not support newer browser
   versions

                                        10
Revolution:
The HTML5 Approach




           11
Motivations

•    Standardized APIs
•    Native support by major browsers (no plug-ins)
•    Increase storage limitations
•    Persistent storage




                                   12
Web Storage
 Working Draft October 25, 2011
http://www.w3.org/TR/webstorage/




                    13
Overview

•  Beloved child has many names: HTML5 Storage, Local
   Storage, DOM Storage
•  Improved cookies
   –  Simple key-value pairs
   –  Stores data in a Web browser, persistently
•  localStorage (Persisted Cookies) and sessionStorage
   (Session Cookies) accessible via global window object
•  Enables running the same application in multiple
   windows
•  Storage size limited to 5-10 MB per domain (default)

                                       14
Examples and Demo

// Store persistent data
localStorage.setItem( ”key”, ”value” )
// Retrieve persistent data
localStorage.getItem( ”key” )
// Retrieve the name of the key
localStorage.key( number )
// Retrieve the number of key-value pairs
localStorage.length
// Remove persistent data
localStorage.removeItem( ”key” )

http://html5demos.com/storage

                                   15
Browser Support




                       Source: http://caniuse.com/#search=web%20storage


                  16
Indexed Database API
   Working Draft April 19, 2011
http://www.w3.org/TR/IndexedDB/




                   17
Overview

•  Beloved child has many names: IndexedDB,
   WebSimpleDB API
•  Newest of the three specifications
•  Simple values and hierarchical objects
•  An advanced version of Web Storage, support for
   –  Robust indexes
   –  efficient searching over keys
   –  duplicate keys (multiple values for a key)
•  Allows for advanced data scenarios on the client
•  Asynchronous database requests

                                         18
(Sync) Examples

// Open a database
var db = window.indexedDBSync.open( ”todos” );
// Open an object store
var objectStore = db.openObjectStore( ”todo”, 0 ); //
  read-write
// Add data to an object store
objectStore.add( { ”text”: ”todo text”, ”timeStamp”: new
  Date().getTime() } );




                                 19
Browser Support




                       http://caniuse.com/#search=indexedDB


                  20
Web SQL Database
Working Group Note November 18, 2010
 http://www.w3.org/TR/webdatabase/




                      21
Overview

•  Beloved child has many names: WebDB
•  As of November 18, 2010 a deprecated specification
   –  Not enough independent implementations
   –  All use SQLite as the database engine
•  Manipulate client-side databases using SQL
   –  A variant of SQL
•  Asynchronous database requests
•  The most advanced client storage specification




                                    22
Example and Demo

// Insert new tweet
t.executeSql( ”INSERT INTO tweets (id, screen_name, date,
  text) VALUES (?, ?, ?, ?), [tweet.id, tweet.from_user,
  tweet / 1000, tweet.text]” );


http://html5demos.com/database




                                 23
Browser Support




                       http://caniuse.com/#search=web%20sql%20database


                  24
HTML5 Offline
       Working Draft May 25, 2011
http://www.w3.org/TR/html5/offline.html




                        25
Research Topics




          26
Silo

•  A system that reduces both the number of HTTP
   requests and the bandwidth required to construct a page
•  Uses JavaScript and Web Storage à no plug-ins
   needed
•  The idea is to store JavaScript and CSS fragments in a
   local storage. When a web page is requested, only the
   server asks which fragments are missing and sends
   them to the client in one file




                                 27
Sync Kit

•  Client-server toolkit
•  Uses JavaScript and (Google) Gears
•  Offloads some data storage and processing from a web
   server onto the web browsers
•  Synchronizes relational database tables between the
   browser and the web server
•  Persists both data and templates across web sessions
•  Increases server load handling capability from 3 to 4
   times


                                28
Conclusion




       29
Comparison of Local Storage Options

Name                   Standard                      Features              Data type         Storage space    Browser support

Cookie                 IETF RFC 2109, IETF RFC       simple key-value      string            4 kB             all major
                       2965                          pairs, information    (serialization)
                                                     via HTTP headers
Local Shared Object    proprietary browser plug-in   alternative to        Flash data        100 kB per       all major via Adobe
(Flash cookie)         (Adobe)                       cookies,              types             domain (can be   Flash Player 6+ plug-in
                                                     accessible from                         increased)
                                                     JavaScript
(Google) Gears         open source browser plug-     relational            many              unlimited per    deprecated (old
                       in (BSD License)              database (SQLite)                       domain (SQLite   versions via Gears
                                                                                             limitations)     plug-in)
Web Storage            Working Draft                 simple key-value      string            5-10 MB (can     IE 8+, Firefox 2.0/3.5+,
                                                     pairs, no duplicate   (serialization)   be increased)    Chrome 4/5+, Safari
                                                     values for a key                                         4+, Opera 10.5+
Indexed Database API   Working Draft                 indexed key-value     many              N/A              IE 10+, Firefox 4+,
                                                     pairs, duplicate                                         Chrome 11+
                                                     values for a key,
                                                     efficient searching
                                                     over keys
Web SQL Database       Working Group Note            SQL queries           many              5 MB (can be     “deprecated” Chrome
                                                     (variant)                               increased)       4+, Safari 3.1/4.0+,
                                                                                                              Opera 10.5+



                                                                            30
References

•  Local Storage – Dive into HTML5:
   http://diveintohtml5.info/storage.html
•  Lawson, B. and Sharp, R. ”Introducing HTML5”. New
   Riders, 2011.
•  Mickens, J. ”Silo: Exploiting JavaScript and DOM
   Storage for Faster Page Loads”. In WebApps/USENIX,
   2010.
•  Benson, E. et al. ”Sync Kit: A Persistent Client-Side
   Database Caching Toolkit for Data Intensive Websites”.
   In WWW, 2010.
•  Cannon, B. and Wohlstadter, E. ”Automated Object
   Persistence for JavaScript”. In WWW, 2010.
                                 31
Thank You!




             Questions? Comments?
              markku.laine@aalto.fi




                           32

More Related Content

What's hot

Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
Arvind Devaraj
 
Apache web service
Apache web serviceApache web service
Apache web service
Manash Kumar Mondal
 
VMware vSphere Networking deep dive
VMware vSphere Networking deep diveVMware vSphere Networking deep dive
VMware vSphere Networking deep dive
Sanjeev Kumar
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Software Infrastructure
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overview
Oleksii Prohonnyi
 
Introduction to Powershell Version 5
Introduction to Powershell Version 5Introduction to Powershell Version 5
Introduction to Powershell Version 5
Nishtha Kesarwani
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentalsRaghu nath
 
Chrome DevTools
Chrome DevToolsChrome DevTools
Chrome DevTools
roadster43
 
Html5-Web-Storage
Html5-Web-StorageHtml5-Web-Storage
Html5-Web-Storage
Mindfire Solutions
 
IBM Notes Traveler Best Practices
IBM Notes Traveler Best PracticesIBM Notes Traveler Best Practices
IBM Notes Traveler Best Practicesjayeshpar2006
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
Erik van Appeldoorn
 
Apache web server
Apache web serverApache web server
Apache web server
Rishabh Bahukhandi
 
HCL Sametime 12.0 on Docker - Step-By-Step.pdf
HCL Sametime 12.0 on Docker - Step-By-Step.pdf HCL Sametime 12.0 on Docker - Step-By-Step.pdf
HCL Sametime 12.0 on Docker - Step-By-Step.pdf
Ales Lichtenberg
 
Power shell training
Power shell trainingPower shell training
Power shell training
David Brabant
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage Virtualization
rjain51
 
VMware
VMwareVMware
VMware
InstituteIBA
 
WebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewWebLogic Scripting Tool Overview
WebLogic Scripting Tool Overview
James Bayer
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
Thomas Lee
 

What's hot (20)

Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Apache web service
Apache web serviceApache web service
Apache web service
 
VMware vSphere Networking deep dive
VMware vSphere Networking deep diveVMware vSphere Networking deep dive
VMware vSphere Networking deep dive
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overview
 
Introduction to Powershell Version 5
Introduction to Powershell Version 5Introduction to Powershell Version 5
Introduction to Powershell Version 5
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentals
 
Chrome DevTools
Chrome DevToolsChrome DevTools
Chrome DevTools
 
PowerShell Remoting
PowerShell RemotingPowerShell Remoting
PowerShell Remoting
 
Html5-Web-Storage
Html5-Web-StorageHtml5-Web-Storage
Html5-Web-Storage
 
IBM Notes Traveler Best Practices
IBM Notes Traveler Best PracticesIBM Notes Traveler Best Practices
IBM Notes Traveler Best Practices
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
Apache web server
Apache web serverApache web server
Apache web server
 
HCL Sametime 12.0 on Docker - Step-By-Step.pdf
HCL Sametime 12.0 on Docker - Step-By-Step.pdf HCL Sametime 12.0 on Docker - Step-By-Step.pdf
HCL Sametime 12.0 on Docker - Step-By-Step.pdf
 
Power shell training
Power shell trainingPower shell training
Power shell training
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage Virtualization
 
VMware
VMwareVMware
VMware
 
WebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewWebLogic Scripting Tool Overview
WebLogic Scripting Tool Overview
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
 

Similar to Local Storage for Web Applications

Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud Developers
Brian Huff
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
Jason Casden
 
Html 5
Html 5Html 5
Prueba ppt
Prueba pptPrueba ppt
Prueba ppt
Ulises Torelli
 
Html5v1
Html5v1Html5v1
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
Richard Esplin
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
chuckbt
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat ClientPaul Klipp
 
Denodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me AnythingDenodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo
 
your browser, your storage
your browser, your storageyour browser, your storage
your browser, your storage
Francesco Fullone
 
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
Rob Tweed
 
your browser, my storage
your browser, my storageyour browser, my storage
your browser, my storage
Francesco Fullone
 
HDF Cloud Services
HDF Cloud ServicesHDF Cloud Services
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8
David Chou
 
Your browser, your storage (extended version)
Your browser, your storage (extended version)Your browser, your storage (extended version)
Your browser, your storage (extended version)
Francesco Fullone
 
Web Tools for GemStone/S
Web Tools for GemStone/SWeb Tools for GemStone/S
Web Tools for GemStone/S
ESUG
 
IE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIGIE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIG
Reagan Hwang
 
Drupal is not your Website
Drupal is not your Website Drupal is not your Website
Drupal is not your Website Phase2
 
HDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the CloudHDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the Cloud
The HDF-EOS Tools and Information Center
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use Cases
Marco Gralike
 

Similar to Local Storage for Web Applications (20)

Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud Developers
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Html 5
Html 5Html 5
Html 5
 
Prueba ppt
Prueba pptPrueba ppt
Prueba ppt
 
Html5v1
Html5v1Html5v1
Html5v1
 
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
Alfresco Tech Talk Live (Episode 70): Customizing Alfresco Share 4.2
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
 
Denodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me AnythingDenodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me Anything
 
your browser, your storage
your browser, your storageyour browser, your storage
your browser, your storage
 
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
 
your browser, my storage
your browser, my storageyour browser, my storage
your browser, my storage
 
HDF Cloud Services
HDF Cloud ServicesHDF Cloud Services
HDF Cloud Services
 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8
 
Your browser, your storage (extended version)
Your browser, your storage (extended version)Your browser, your storage (extended version)
Your browser, your storage (extended version)
 
Web Tools for GemStone/S
Web Tools for GemStone/SWeb Tools for GemStone/S
Web Tools for GemStone/S
 
IE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIGIE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIG
 
Drupal is not your Website
Drupal is not your Website Drupal is not your Website
Drupal is not your Website
 
HDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the CloudHDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the Cloud
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use Cases
 

More from Markku Laine

Responsive and Personalized Web Layouts with Integer Programming
Responsive and Personalized Web Layouts with Integer ProgrammingResponsive and Personalized Web Layouts with Integer Programming
Responsive and Personalized Web Layouts with Integer Programming
Markku Laine
 
Layout as a Service (LaaS): A Service Platform for Self-Optimizing Web Layouts
Layout as a Service (LaaS): A Service Platform for Self-Optimizing Web LayoutsLayout as a Service (LaaS): A Service Platform for Self-Optimizing Web Layouts
Layout as a Service (LaaS): A Service Platform for Self-Optimizing Web Layouts
Markku Laine
 
Monitoring the Spreading of Infectious Diseases in Finland
Monitoring the Spreading of Infectious Diseases in FinlandMonitoring the Spreading of Infectious Diseases in Finland
Monitoring the Spreading of Infectious Diseases in Finland
Markku Laine
 
XFormsDB: An XForms-Based Framework for Simplifying Web Application Development
XFormsDB: An XForms-Based Framework for Simplifying Web Application DevelopmentXFormsDB: An XForms-Based Framework for Simplifying Web Application Development
XFormsDB: An XForms-Based Framework for Simplifying Web Application Development
Markku Laine
 
XIDE: Expanding End-User Web Development
XIDE: Expanding End-User Web DevelopmentXIDE: Expanding End-User Web Development
XIDE: Expanding End-User Web Development
Markku Laine
 
Connecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup LanguageConnecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup Language
Markku Laine
 
Editable Documents on the Web
Editable Documents on the WebEditable Documents on the Web
Editable Documents on the Web
Markku Laine
 
Performance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the WebPerformance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the Web
Markku Laine
 
Web Services for the Internet of Things
Web Services for the Internet of ThingsWeb Services for the Internet of Things
Web Services for the Internet of Things
Markku Laine
 
Extending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityExtending XForms with Server-Side Functionality
Extending XForms with Server-Side Functionality
Markku Laine
 

More from Markku Laine (10)

Responsive and Personalized Web Layouts with Integer Programming
Responsive and Personalized Web Layouts with Integer ProgrammingResponsive and Personalized Web Layouts with Integer Programming
Responsive and Personalized Web Layouts with Integer Programming
 
Layout as a Service (LaaS): A Service Platform for Self-Optimizing Web Layouts
Layout as a Service (LaaS): A Service Platform for Self-Optimizing Web LayoutsLayout as a Service (LaaS): A Service Platform for Self-Optimizing Web Layouts
Layout as a Service (LaaS): A Service Platform for Self-Optimizing Web Layouts
 
Monitoring the Spreading of Infectious Diseases in Finland
Monitoring the Spreading of Infectious Diseases in FinlandMonitoring the Spreading of Infectious Diseases in Finland
Monitoring the Spreading of Infectious Diseases in Finland
 
XFormsDB: An XForms-Based Framework for Simplifying Web Application Development
XFormsDB: An XForms-Based Framework for Simplifying Web Application DevelopmentXFormsDB: An XForms-Based Framework for Simplifying Web Application Development
XFormsDB: An XForms-Based Framework for Simplifying Web Application Development
 
XIDE: Expanding End-User Web Development
XIDE: Expanding End-User Web DevelopmentXIDE: Expanding End-User Web Development
XIDE: Expanding End-User Web Development
 
Connecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup LanguageConnecting XForms to Databases: An Extension to the XForms Markup Language
Connecting XForms to Databases: An Extension to the XForms Markup Language
 
Editable Documents on the Web
Editable Documents on the WebEditable Documents on the Web
Editable Documents on the Web
 
Performance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the WebPerformance Evaluation of XMPP on the Web
Performance Evaluation of XMPP on the Web
 
Web Services for the Internet of Things
Web Services for the Internet of ThingsWeb Services for the Internet of Things
Web Services for the Internet of Things
 
Extending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityExtending XForms with Server-Side Functionality
Extending XForms with Server-Side Functionality
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 

Local Storage for Web Applications

  • 1. Local Storage for Web Applications T-111.5502 Seminar on Media Technology B P (4-8 cr) Presentation Markku Laine, M.Sc. (Tech.) markku.laine@aalto.fi November 22, 2011
  • 2. Presentation Outline •  Introduction •  Evolution •  Revolution: The HTML5 Approach –  Web Storage –  Indexed Database API –  Web SQL Database –  HTML5 Offline •  Research topics •  Conclusion 2
  • 6. Benefits of Local Storage •  Reduces server load •  Less data to be transferred •  Faster websites •  Enables offline support •  Improves user experience 6
  • 8. Cookie •  Conventional approach •  Simple key-value pairs •  Information via HTTP headers –  Extra overhead •  Typically used for session management •  Storage size limited to 4 kB –  Way too small for modern Web applications •  Problems when running the same application in multiple windows •  Supported by major browsers 8
  • 9. Local Shared Object (Flash Cookie) •  Proprietary browser plug-in (Adobe Flash 6+, 2002) •  Storage size limited to 100 kB per domain (can be increased) •  ExternalInterface (Adobe Flash 8+, 2006) –  Easy and fast access to LSOs from JavaScript 9
  • 10. (Google) Gears: R.I.P. 2007-2011 •  Open-source browser plug-in, http://gears.google.com/ •  Several major APIs: e.g., Database (SQLite), WorkerPool, LocalServer, Desktop, and Geolocation •  Storage size unlimited per domain •  Focus from Gears to HTML5 and associated APIs: Indexed Database API, Web Workers, Geolocation API •  Does not support newer browser versions 10
  • 12. Motivations •  Standardized APIs •  Native support by major browsers (no plug-ins) •  Increase storage limitations •  Persistent storage 12
  • 13. Web Storage Working Draft October 25, 2011 http://www.w3.org/TR/webstorage/ 13
  • 14. Overview •  Beloved child has many names: HTML5 Storage, Local Storage, DOM Storage •  Improved cookies –  Simple key-value pairs –  Stores data in a Web browser, persistently •  localStorage (Persisted Cookies) and sessionStorage (Session Cookies) accessible via global window object •  Enables running the same application in multiple windows •  Storage size limited to 5-10 MB per domain (default) 14
  • 15. Examples and Demo // Store persistent data localStorage.setItem( ”key”, ”value” ) // Retrieve persistent data localStorage.getItem( ”key” ) // Retrieve the name of the key localStorage.key( number ) // Retrieve the number of key-value pairs localStorage.length // Remove persistent data localStorage.removeItem( ”key” ) http://html5demos.com/storage 15
  • 16. Browser Support Source: http://caniuse.com/#search=web%20storage 16
  • 17. Indexed Database API Working Draft April 19, 2011 http://www.w3.org/TR/IndexedDB/ 17
  • 18. Overview •  Beloved child has many names: IndexedDB, WebSimpleDB API •  Newest of the three specifications •  Simple values and hierarchical objects •  An advanced version of Web Storage, support for –  Robust indexes –  efficient searching over keys –  duplicate keys (multiple values for a key) •  Allows for advanced data scenarios on the client •  Asynchronous database requests 18
  • 19. (Sync) Examples // Open a database var db = window.indexedDBSync.open( ”todos” ); // Open an object store var objectStore = db.openObjectStore( ”todo”, 0 ); // read-write // Add data to an object store objectStore.add( { ”text”: ”todo text”, ”timeStamp”: new Date().getTime() } ); 19
  • 20. Browser Support http://caniuse.com/#search=indexedDB 20
  • 21. Web SQL Database Working Group Note November 18, 2010 http://www.w3.org/TR/webdatabase/ 21
  • 22. Overview •  Beloved child has many names: WebDB •  As of November 18, 2010 a deprecated specification –  Not enough independent implementations –  All use SQLite as the database engine •  Manipulate client-side databases using SQL –  A variant of SQL •  Asynchronous database requests •  The most advanced client storage specification 22
  • 23. Example and Demo // Insert new tweet t.executeSql( ”INSERT INTO tweets (id, screen_name, date, text) VALUES (?, ?, ?, ?), [tweet.id, tweet.from_user, tweet / 1000, tweet.text]” ); http://html5demos.com/database 23
  • 24. Browser Support http://caniuse.com/#search=web%20sql%20database 24
  • 25. HTML5 Offline Working Draft May 25, 2011 http://www.w3.org/TR/html5/offline.html 25
  • 27. Silo •  A system that reduces both the number of HTTP requests and the bandwidth required to construct a page •  Uses JavaScript and Web Storage à no plug-ins needed •  The idea is to store JavaScript and CSS fragments in a local storage. When a web page is requested, only the server asks which fragments are missing and sends them to the client in one file 27
  • 28. Sync Kit •  Client-server toolkit •  Uses JavaScript and (Google) Gears •  Offloads some data storage and processing from a web server onto the web browsers •  Synchronizes relational database tables between the browser and the web server •  Persists both data and templates across web sessions •  Increases server load handling capability from 3 to 4 times 28
  • 30. Comparison of Local Storage Options Name Standard Features Data type Storage space Browser support Cookie IETF RFC 2109, IETF RFC simple key-value string 4 kB all major 2965 pairs, information (serialization) via HTTP headers Local Shared Object proprietary browser plug-in alternative to Flash data 100 kB per all major via Adobe (Flash cookie) (Adobe) cookies, types domain (can be Flash Player 6+ plug-in accessible from increased) JavaScript (Google) Gears open source browser plug- relational many unlimited per deprecated (old in (BSD License) database (SQLite) domain (SQLite versions via Gears limitations) plug-in) Web Storage Working Draft simple key-value string 5-10 MB (can IE 8+, Firefox 2.0/3.5+, pairs, no duplicate (serialization) be increased) Chrome 4/5+, Safari values for a key 4+, Opera 10.5+ Indexed Database API Working Draft indexed key-value many N/A IE 10+, Firefox 4+, pairs, duplicate Chrome 11+ values for a key, efficient searching over keys Web SQL Database Working Group Note SQL queries many 5 MB (can be “deprecated” Chrome (variant) increased) 4+, Safari 3.1/4.0+, Opera 10.5+ 30
  • 31. References •  Local Storage – Dive into HTML5: http://diveintohtml5.info/storage.html •  Lawson, B. and Sharp, R. ”Introducing HTML5”. New Riders, 2011. •  Mickens, J. ”Silo: Exploiting JavaScript and DOM Storage for Faster Page Loads”. In WebApps/USENIX, 2010. •  Benson, E. et al. ”Sync Kit: A Persistent Client-Side Database Caching Toolkit for Data Intensive Websites”. In WWW, 2010. •  Cannon, B. and Wohlstadter, E. ”Automated Object Persistence for JavaScript”. In WWW, 2010. 31
  • 32. Thank You! Questions? Comments? markku.laine@aalto.fi 32