SlideShare a Scribd company logo
1 of 8
Download to read offline
Supporting Stateful and 
Stateless Clients 
Joyce Stack 
! 
@MendeleyStack 
Maintaining application state on multiple clients using a stateless protocol is difficult.
Our Vision 
• Our mission is to transform the world of academic 
research…. 
• by delivering social collaboration tools 
• forming virtual communities and 
• driving innovation via our open platform 
We wish to support industry and accelerate the progress of science with: 
• Reference management tools 
• Social network - thousands of professional research groups 
• Provides access to our extensive catalogue & document statistics. 
• These article level metrics can help researchers understand their scientific impact better of papers and how their papers are cited e.g. leads to 
funding or coveted positions in faculties
What do we mean by state? 
• Application state 
• client-side state e.g. iOS and Android clients 
• Resource state 
• server-side state e.g. online web library 
Application state: 
• Unrealistic to have some clients be able to round trip to the server all the time. 
! 
Resource state: 
• We have other online clients that change state frequently.
Offline is hard 
Supporting offline is a major requirement from our users (discuss researchers) 
! 
We have cases of long offline periods (day, weeks, months and even seen years) 
Application state drifts from server state due to multiple mutating clients so this leads to distributed state.
PATCH over PUT 
{ 
"title": "Mutate iOS" 
} 
If-Unmodified-Since: Thu, 04 Sep 2014 13:43:01 GMT 
{ 
"title": "Mutate JS" 
} 
• Resources have large representations 
• Using a PUT is cumbersome and uses bandwidth 
• Seldom going to change ALL metadata about a document. 
• Prevent clients from making changes that has been changed by someone else since retrieving it by using preconditions 
• Minimize race conditions
Sync only differences 
• modified_since & deleted_since filtering 
! 
GET /documents?modified_since=2014-04-24T16:38:02Z 
GET /documents?deleted_since=2014-04-24T16:38:02Z 
! 
200 OK 
[ 
.. documents 
] 
We have a large collection of resources which don’t change all too frequently. 
Clients shouldn’t have to send full JSON bodies over the wire just to stay up to date with latest changes, especially mobile. 
Google’s Neil Fraser published a paper in 2009 about Differential Synchronisation. 
Implementing real-time multi-user synchronisation systems is difficult and even harder to explain. 
We know, we tried. So we needed something simpler.
Arbitrary client data 
Folders: 
! 
{ 
"client_data": "{"sync_files":"notset"}", 
} 
! 
! 
Profiles: 
{ 
"client_data": "{"sync_files": true, 
"sync_publications": false}” 
} 
Allow clients to set an arbitrary blob of data in a field associated with a resource. 
Tactical approach - settings associated with a particular resource, required by one client. 
Avoiding clients having two back ends. 
May roll it out to all other clients in the future. 
!
Questions? 
! 
@MendeleyStack

More Related Content

What's hot (6)

SQL vs NoSQL
SQL vs NoSQLSQL vs NoSQL
SQL vs NoSQL
 
Database basics
Database basicsDatabase basics
Database basics
 
Rest vs Soap
Rest vs SoapRest vs Soap
Rest vs Soap
 
smashdocs - simplifying document reviews compared to WORD or GoogleDocs
smashdocs - simplifying document reviews compared to WORD or GoogleDocssmashdocs - simplifying document reviews compared to WORD or GoogleDocs
smashdocs - simplifying document reviews compared to WORD or GoogleDocs
 
Soap Vs Rest
Soap Vs RestSoap Vs Rest
Soap Vs Rest
 
Nodejs - ITVoyagers
Nodejs - ITVoyagersNodejs - ITVoyagers
Nodejs - ITVoyagers
 

Viewers also liked

FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014
FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014
FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014
Deborah Weinswig
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Todd Fritz
 

Viewers also liked (7)

FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014
FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014
FBIC Global Deborah Weinswig New Tech Presentation Dec. 3 2014
 
Stream Based Architecture
Stream Based ArchitectureStream Based Architecture
Stream Based Architecture
 
Big Data Open Source Security LLC: Realtime log analysis with Mesos, Docker, ...
Big Data Open Source Security LLC: Realtime log analysis with Mesos, Docker, ...Big Data Open Source Security LLC: Realtime log analysis with Mesos, Docker, ...
Big Data Open Source Security LLC: Realtime log analysis with Mesos, Docker, ...
 
Fast dataarchitecture
Fast dataarchitectureFast dataarchitecture
Fast dataarchitecture
 
Kafka spark cassandra webinar feb 16 2016
Kafka spark cassandra   webinar feb 16 2016 Kafka spark cassandra   webinar feb 16 2016
Kafka spark cassandra webinar feb 16 2016
 
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaLambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
 

Similar to Supporting Stateful and Stateless Clients

Why Bad Data May Be Your Best Opportunity
Why Bad Data May Be Your Best OpportunityWhy Bad Data May Be Your Best Opportunity
Why Bad Data May Be Your Best Opportunity
Zach Gardner
 
Jayashree-4.5 Years Exp on JAVA-J2EE
Jayashree-4.5 Years Exp on JAVA-J2EEJayashree-4.5 Years Exp on JAVA-J2EE
Jayashree-4.5 Years Exp on JAVA-J2EE
Jayashree Panda
 
Resume_Harikrishna_Tekkam (1)
Resume_Harikrishna_Tekkam (1)Resume_Harikrishna_Tekkam (1)
Resume_Harikrishna_Tekkam (1)
Harikrishna Snr
 
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
Woodruff Solutions LLC
 

Similar to Supporting Stateful and Stateless Clients (20)

Why Bad Data May Be Your Best Opportunity
Why Bad Data May Be Your Best OpportunityWhy Bad Data May Be Your Best Opportunity
Why Bad Data May Be Your Best Opportunity
 
Jayashree-4.5 Years Exp on JAVA-J2EE
Jayashree-4.5 Years Exp on JAVA-J2EEJayashree-4.5 Years Exp on JAVA-J2EE
Jayashree-4.5 Years Exp on JAVA-J2EE
 
ASTQB washington-sept-2015
ASTQB washington-sept-2015ASTQB washington-sept-2015
ASTQB washington-sept-2015
 
Postgres Foreign Data Wrappers
Postgres Foreign Data Wrappers  Postgres Foreign Data Wrappers
Postgres Foreign Data Wrappers
 
USG Rock Eagle 2017 - PWP at 1000 Days
USG Rock Eagle 2017 - PWP at 1000 DaysUSG Rock Eagle 2017 - PWP at 1000 Days
USG Rock Eagle 2017 - PWP at 1000 Days
 
Oracle_Plsql_ShellScripting
Oracle_Plsql_ShellScriptingOracle_Plsql_ShellScripting
Oracle_Plsql_ShellScripting
 
Delivering Changes for Applications and Databases
Delivering Changes for Applications and DatabasesDelivering Changes for Applications and Databases
Delivering Changes for Applications and Databases
 
Service Architectures at Scale
Service Architectures at ScaleService Architectures at Scale
Service Architectures at Scale
 
Rajesh Paleru
Rajesh PaleruRajesh Paleru
Rajesh Paleru
 
Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014
 
Hari Babu-DBA Resume
Hari Babu-DBA ResumeHari Babu-DBA Resume
Hari Babu-DBA Resume
 
TR.Bhavani_Inf
TR.Bhavani_InfTR.Bhavani_Inf
TR.Bhavani_Inf
 
Microservices Journey NYC
Microservices Journey NYCMicroservices Journey NYC
Microservices Journey NYC
 
Resume_Harikrishna_Tekkam (1)
Resume_Harikrishna_Tekkam (1)Resume_Harikrishna_Tekkam (1)
Resume_Harikrishna_Tekkam (1)
 
Migrate a successful transactional database to azure
Migrate a successful transactional database to azureMigrate a successful transactional database to azure
Migrate a successful transactional database to azure
 
2016 05 sanger
2016 05 sanger2016 05 sanger
2016 05 sanger
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
 
Puneet Verma CV
Puneet Verma CVPuneet Verma CV
Puneet Verma CV
 
Resume - Deepak v.s
Resume -  Deepak v.sResume -  Deepak v.s
Resume - Deepak v.s
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Supporting Stateful and Stateless Clients

  • 1. Supporting Stateful and Stateless Clients Joyce Stack ! @MendeleyStack Maintaining application state on multiple clients using a stateless protocol is difficult.
  • 2. Our Vision • Our mission is to transform the world of academic research…. • by delivering social collaboration tools • forming virtual communities and • driving innovation via our open platform We wish to support industry and accelerate the progress of science with: • Reference management tools • Social network - thousands of professional research groups • Provides access to our extensive catalogue & document statistics. • These article level metrics can help researchers understand their scientific impact better of papers and how their papers are cited e.g. leads to funding or coveted positions in faculties
  • 3. What do we mean by state? • Application state • client-side state e.g. iOS and Android clients • Resource state • server-side state e.g. online web library Application state: • Unrealistic to have some clients be able to round trip to the server all the time. ! Resource state: • We have other online clients that change state frequently.
  • 4. Offline is hard Supporting offline is a major requirement from our users (discuss researchers) ! We have cases of long offline periods (day, weeks, months and even seen years) Application state drifts from server state due to multiple mutating clients so this leads to distributed state.
  • 5. PATCH over PUT { "title": "Mutate iOS" } If-Unmodified-Since: Thu, 04 Sep 2014 13:43:01 GMT { "title": "Mutate JS" } • Resources have large representations • Using a PUT is cumbersome and uses bandwidth • Seldom going to change ALL metadata about a document. • Prevent clients from making changes that has been changed by someone else since retrieving it by using preconditions • Minimize race conditions
  • 6. Sync only differences • modified_since & deleted_since filtering ! GET /documents?modified_since=2014-04-24T16:38:02Z GET /documents?deleted_since=2014-04-24T16:38:02Z ! 200 OK [ .. documents ] We have a large collection of resources which don’t change all too frequently. Clients shouldn’t have to send full JSON bodies over the wire just to stay up to date with latest changes, especially mobile. Google’s Neil Fraser published a paper in 2009 about Differential Synchronisation. Implementing real-time multi-user synchronisation systems is difficult and even harder to explain. We know, we tried. So we needed something simpler.
  • 7. Arbitrary client data Folders: ! { "client_data": "{"sync_files":"notset"}", } ! ! Profiles: { "client_data": "{"sync_files": true, "sync_publications": false}” } Allow clients to set an arbitrary blob of data in a field associated with a resource. Tactical approach - settings associated with a particular resource, required by one client. Avoiding clients having two back ends. May roll it out to all other clients in the future. !