SlideShare uma empresa Scribd logo
1 de 82
Baixar para ler offline
HI!
WHO AM I?
▸Pedro Teixeira
▸@pgte
▸Partner and Chief Futurist @ YLD
▸Node.js Developer
▸Offline-first enthusiast
HOW TO BUILD A
RELIABLE CHECKOUT
EXPERIENCE
…USING NODE.JS,
POUCHDB AND
REPLICATED TRANSACTION
DOCUMENTS
E-COMMERCE
THE CHECKOUT
EXPERIENCE
IS A JOURNEY THAT BEGINS
WITH THE OPTIMISTIC
CHECKOUT BUTTON
BUT ONLY REALLY
BEGINS WITH THE
CONFIRMATION BUTTON
BEHIND THE
SCENES…
WHICH
EVENTUALLY END
IN SUCCESS
AND A
CONFIRMATION
E-MAIL
WHAT
CAN GO
WRONG?
DUPLICATE
TRANSACTIONS
UNDEFINED
STATE
CLIENT
CRASHES
LET’S TALK
ABOUT
MOBILE
https://youtu.be/aqvz5Oqs238
(LAST SLIDE TAKEN FROM
ILYA GRIGORIK’S GOOGLE
IO TALK)
MAIN TAKEAWAY IS
DEVELOPING RELIABLE
MOBILE APPS IS
PARTICULARLY DIFFICULT
SOLUTION?
HELLO
OFFLINE-
FIRST!
SERVICE
WORKERS
HTTPS://WWW.YOUTUBE.COM/WATCH?V=CMGR0RSZHC8
DATA
AND
TRANSACTIONS
LET’S GRADE
HOW APPS DEAL WITH
NETWORKING FAILURES
E
NO ERROR
HANDLING
D
CUSTOMER IS NOTIFIED
OF THE ERROR
C
CUSTOMER CAN RECOVER
FROM ERROR
B
APP CAN RECOVER FROM
SOME SYSTEM ERRORS
A
APP CAN RECOVER FROM SOME
SYSTEM AND USER ERRORS
LAST STAGE IS
PARTICULARLY
EXPENSIVE
WHY?
LET’S LOOK AT
SYSTEMS
ARCHITECTURE
TOO MUCH
RESPONSIBILITY
HTTP
IS THE WRONG LEVEL
OF ABSTRACTION
“WORKS ON MY LAPTOP”
BUT
WAIT…
ALL WE NEED IS
SYNC
WHICH
SYNC
PROTOCOL?
‣OPEN-SOURCE
‣DOC-ORIENTED
‣MVCC
‣CHANGES FEED
‣REPLICATION
PROTOCOL
ONE DATABASE
PER CUSTOMER
ONE DOCUMENT PER
TRANSACTION
SYNC PROTOCOL REPLICATES
TRANSACTION DOC
(BI-DIRECTIONAL)
= OFFLINE TOLERANCE
THE CLERK
[MISSING IMAGE]
CLERK REACTS TO
TRANSACTION
STATE CHANGES
CLERK INJECTS
TRANSACTION STATE
CHANGES
(WHEN BACK-END EVENT OCCURS)
SHOW ME
THE CODE!
UI
POUCH-REDUX-MIDDLEWARE
BACK-END
POUCH-CLERK
CLERK
1. STATE TRANSITIONS
2. ASYNC UPDATERS
STATE
TRANSITIONS
ASYNC
UPDATERS
QUICK
DEMO
DEMO IS ALSO OPEN SOURCE
https://github.com/
pgte/pouch-clerk-example-app
FUTURE?
‣ LONG-RUNNING TRANSACTIONS
‣ COLLABORATIVE GAMES
‣ …
SUPPORT FOR
SLIDES
http://www.slideshare.net/pgte/how-to-build-a-reliable-checkout-
experience-66857209
THANK
YOU!
QS?

Mais conteúdo relacionado

Semelhante a How to build a reliable checkout experience

Project Management experiences, do's and don'ts
Project Management experiences, do's and don'tsProject Management experiences, do's and don'ts
Project Management experiences, do's and don'ts
Tapio Järvenpää
 

Semelhante a How to build a reliable checkout experience (20)

Understanding Technical Debt: A Primer for Product Owners and Founders
Understanding Technical Debt: A Primer for Product Owners and FoundersUnderstanding Technical Debt: A Primer for Product Owners and Founders
Understanding Technical Debt: A Primer for Product Owners and Founders
 
103 Understanding Technical Debt
103 Understanding Technical Debt103 Understanding Technical Debt
103 Understanding Technical Debt
 
Observing, Remembering & Sharing
Observing, Remembering & SharingObserving, Remembering & Sharing
Observing, Remembering & Sharing
 
Enplug - interactive digital signage
Enplug - interactive digital signageEnplug - interactive digital signage
Enplug - interactive digital signage
 
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNE
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNELe DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNE
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest BRETAGNE
 
Cloud Native App Security
Cloud Native App SecurityCloud Native App Security
Cloud Native App Security
 
Keycloak cloud native
Keycloak cloud nativeKeycloak cloud native
Keycloak cloud native
 
Of innovation and impatience - Future Decoded 2015
Of innovation and impatience - Future Decoded 2015Of innovation and impatience - Future Decoded 2015
Of innovation and impatience - Future Decoded 2015
 
How to make people work together? - ending keynote - devfest du bout du monde...
How to make people work together? - ending keynote - devfest du bout du monde...How to make people work together? - ending keynote - devfest du bout du monde...
How to make people work together? - ending keynote - devfest du bout du monde...
 
DEVOPS AND IT AUTOMATION, THE WAY OF THE EFFICIENT DEVELOPER - Wolves Summit ...
DEVOPS AND IT AUTOMATION, THE WAY OF THE EFFICIENT DEVELOPER - Wolves Summit ...DEVOPS AND IT AUTOMATION, THE WAY OF THE EFFICIENT DEVELOPER - Wolves Summit ...
DEVOPS AND IT AUTOMATION, THE WAY OF THE EFFICIENT DEVELOPER - Wolves Summit ...
 
DevOpsDays Istanbul 2019 - AI with a devops mindset
DevOpsDays Istanbul 2019 - AI with a devops mindsetDevOpsDays Istanbul 2019 - AI with a devops mindset
DevOpsDays Istanbul 2019 - AI with a devops mindset
 
Digital transformation in the Public Sector. By Tommaso Di Bartolo. Silicon V...
Digital transformation in the Public Sector. By Tommaso Di Bartolo. Silicon V...Digital transformation in the Public Sector. By Tommaso Di Bartolo. Silicon V...
Digital transformation in the Public Sector. By Tommaso Di Bartolo. Silicon V...
 
Metaverse + Sustainability Convergence
Metaverse + Sustainability ConvergenceMetaverse + Sustainability Convergence
Metaverse + Sustainability Convergence
 
What I learnt from building a chatbot - BrightonSEO 2017
What I learnt from building a chatbot - BrightonSEO 2017What I learnt from building a chatbot - BrightonSEO 2017
What I learnt from building a chatbot - BrightonSEO 2017
 
Impact Analysis - LoopConf
Impact Analysis - LoopConfImpact Analysis - LoopConf
Impact Analysis - LoopConf
 
Impactanalysis 150507054758-lva1-app6891
Impactanalysis 150507054758-lva1-app6891Impactanalysis 150507054758-lva1-app6891
Impactanalysis 150507054758-lva1-app6891
 
The Laws of User Experience: Making it or breaking it with the UX Factor
The Laws of User Experience: Making it or breaking it with the UX FactorThe Laws of User Experience: Making it or breaking it with the UX Factor
The Laws of User Experience: Making it or breaking it with the UX Factor
 
The Laws of User Experience: Making it or Breaking It with the UX Factor
The Laws of User Experience: Making it or Breaking It with the UX FactorThe Laws of User Experience: Making it or Breaking It with the UX Factor
The Laws of User Experience: Making it or Breaking It with the UX Factor
 
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest Forum i...
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest Forum i...Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest Forum i...
Le DevOps, levier d'automatisation et de passage au cloud - ADN Ouest Forum i...
 
Project Management experiences, do's and don'ts
Project Management experiences, do's and don'tsProject Management experiences, do's and don'ts
Project Management experiences, do's and don'ts
 

Último

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 

How to build a reliable checkout experience