SlideShare a Scribd company logo
1 of 98
Occasionally
Connected Devices
Chris Ballance
Diligent
@ballance
What we’ll cover
• Synchronization - Offline First!
• CAP Theorem
• Mobile Security
• Responsive Design & Engineering
• Case Studies
• Testing / Tools
Photo by Chris Ballance
Places where
I’ve built things…
Test Man
Test Man, 2002, reproduced under fair use
Common Fallacies
• Networks are reliable
• Data must always be 100% consistent between
nodes
• CRUD can handle that (not very well)
Back to the Future, reproduced under fair use
Mobile First + Offline First
Designing Offline First Web Apps
Alex Feyerke, 2013
http://alistapart.com/article/offline-first
Offline is not a feature
Design for Offline
Add Sync as a feature
Your users will thank you…
Development Considerations
• Idempotence
• Immutability
• Event Sourcing
• Local Caching
• Queueing
Immutability
Idempotency
Event Sourcing
• Append only
• All actions on nodes are stored
• Actions can be replayed to any point in history
• Current state is original + sum of all changes
• Addresses inherent limitations of CRUD
• Soft deletes only
CQRS
• Command Query Responsibility Segregation
• Able to scale read and write separately
• Separation between read / write code
• Safety - Queries are guaranteed to be free of side effects
• Better allows for specialization on the read side using
caching models such as CDNs
Project Delivery Triangle
Good
Fast Cheap
Project Delivery Triangle
Good
Fast Cheap
CAP Theorem
Consistent
Available Partition Tolerant
CAP Theorem
Consistent
Available Partition Tolerant
Available Partition Tolerant
Consistent
Consistent
Partition TolerantAvailable
Consistent
Available Partition Tolerant
Consistent
Available Partition Tolerant
Partition Tolerance is a myth!
We can guarantee Consistency, but not Availability.
We may time out or fail to return anything
Consistent
Available Partition Tolerant
We can guarantee Availability, but our data
may not be Consistent with other nodes
Consistent
Available Partition Tolerant
Our business needs will drive whether
we choose Consistency or Availability
Available Partition Tolerant
Consistent
Implementations
Consistent
Available Partition TolerantAP
Cassandra, CouchDB
CP
MongoDB,
Big Table (GFS)
CA
RDBMS
SQL Server
A contrived example for
Consistency
A B
User writes S1 to Node B
A B
S0 S0
S1
User queries Node A
Nodes B & A have not sync’d
A B
S1S0
Query is blocked
until B syncs with A
A B
S0 S1
?
Once B syncs with A,
the query on A is unblocked
and returns S1 as expected
A B
S1 S1S1
S1 :-)
* The query could potentially time out
A contrived example for
Availability
A B
User writes S1 to Node B
A B
S1
S0 S0
User queries Node A for S1
A B
S1S0
Query returns current state of
A, but is not consistent with B
A B
S1
S0
S0 S1
?
A later query of A yields S1 previously written to B.
Eventual consistency has been achieved.
A B
S1
S1
S1 S1
:-)
• Which of these are Idempotent?
• Console.WriteLine(person.FirstName);
• person.FirstName = “Chris”
• person.OrderBeer();
• person.TakeOffShoes();
Effective & Unobtrusive
Get Smart, 1970, reproduced under fair use
Security
• Device security
• Data at rest
• Data in transit
• Data in memory
• Remote wipe
Data in Transit
Data at Rest
Security
Walkthrough
Device
Generates
Asymmetric
Key Pair
Device sends
public key
to server
404!
WTFBBQ?
Testing Considerations
• Network Latency
• Data - loss in transit
• Data - order of arrival
• Device simulation
Testing Tools
• DummyNet (Windows, etc)
• Network Link Conditioner (OSX) [demo]
• SoftPerfect (free for 30 second sessions)
• Charles (Windows)
• Android Simulator
Be Responsive!
• Responsive UX
• Responsive Engineering
Android Devices
source: http://opensignal.com/reports/2014/android-fragmentation/
Android OS
source: http://opensignal.com/reports/2014/android-fragmentation/
Facebook Lite
source: http://www.wired.com/2015/06/facebook-launches-facebook-lite-super-slow-connections/
Case Studies
My Public Github
)-:
My Work GitHub
(-:
A Gift Card System
https://www.flickr.com/photos/68751915@N05/6710868859
Gift Card System
• The business values availability over
consistency to a certain tolerance ($100)
• Eventual consistency is preferred to timeouts or
failures
• Low chance of double-spend if this is a brick &
mortar store
SpaceBook
https://www.flickr.com/photos/nasahqphoto/8116469859/
Social Media for Astronauts
• Network Latency to Low
Earth Orbit is high
• May have network
outages depending on
position in orbit
• Dropped Packets
• P2P for app use when
disconnected from
Earth
Photo by NASA
Financial Markets
https://www.flickr.com/photos/laughingsquid/14313066998/
Considerations for
Financial Markets
• Consistency is more important than Availability
• Multiple markets (node partitions)
• Ultra-low Network latency is crucial
• Front-running orders*
Cryptocurrency
Blockchains
https://www.flickr.com/photos/laughingsquid/14313066998/
RunKeeper
Occasionally Connected
Devices are different…
• Must work when disconnected
• Device and its data are vulnerable at rest
• Often connect over unsecured networks
• WIFI and cellular networks can be unreliable
• Other differences?
Further Reading
• Designing Offline-First web apps
http://alistapart.com/article/offline-first
• CQRS - Martin Fowler Blog Post
• Amazon Dynamo -
http://www.eurecom.fr/~michiard/teaching/slides/clouds
/cap-dynamo.pdf
• Facebook Lite -
http://www.wired.com/2015/06/facebook-launches-
facebook-lite-super-slow-connections/
What we covered
• Synchronization - Offline First!
• CAP Theorem
• Mobile Security
• Responsive Design & Engineering
• Case Studies
• Testing / Tools
Questions?

More Related Content

What's hot

Cloud fail scaling to infinity but not beyond
Cloud fail   scaling to infinity but not beyondCloud fail   scaling to infinity but not beyond
Cloud fail scaling to infinity but not beyondKunal Johar
 
Data consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decideData consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decideLouis Jacomet
 
Solving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi HevroniSolving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi HevroniDevOpsDays Tel Aviv
 
2020-Feb: Testing: Cables and Chains
2020-Feb: Testing: Cables and Chains2020-Feb: Testing: Cables and Chains
2020-Feb: Testing: Cables and ChainsMark Windholtz
 
Patterns, Code Smells, and The Pragmattic Programmer
Patterns, Code Smells, and The Pragmattic ProgrammerPatterns, Code Smells, and The Pragmattic Programmer
Patterns, Code Smells, and The Pragmattic ProgrammerJason McCreary
 
Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Carl Brown
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksServerlessConf
 
20160520 The Future of Services
20160520 The Future of Services20160520 The Future of Services
20160520 The Future of Servicesshinolajla
 
Test automation architecture. Advanced level
Test automation architecture. Advanced levelTest automation architecture. Advanced level
Test automation architecture. Advanced levelAnton Skomarovskyi
 
Microservices pros and cons - houston tech fest
Microservices pros and cons - houston tech festMicroservices pros and cons - houston tech fest
Microservices pros and cons - houston tech festAndrew Siemer
 
Agile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsAgile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsJoEllen Carter
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Dakiry
 
Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1Damian Legawiec
 
Reactive All the Way Down the Stack
Reactive All the Way Down the StackReactive All the Way Down the Stack
Reactive All the Way Down the StackSteve Pember
 
Gr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for GroovyGr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for GroovySteve Pember
 
Serverless testing-serverless-sydney-20181018
Serverless testing-serverless-sydney-20181018Serverless testing-serverless-sydney-20181018
Serverless testing-serverless-sydney-20181018Rowan Udell
 

What's hot (20)

Cloud fail scaling to infinity but not beyond
Cloud fail   scaling to infinity but not beyondCloud fail   scaling to infinity but not beyond
Cloud fail scaling to infinity but not beyond
 
Data consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decideData consistency: Analyse, understand and decide
Data consistency: Analyse, understand and decide
 
Solving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi HevroniSolving trust issues at scale - Omer Levi Hevroni
Solving trust issues at scale - Omer Levi Hevroni
 
2020-Feb: Testing: Cables and Chains
2020-Feb: Testing: Cables and Chains2020-Feb: Testing: Cables and Chains
2020-Feb: Testing: Cables and Chains
 
Patterns, Code Smells, and The Pragmattic Programmer
Patterns, Code Smells, and The Pragmattic ProgrammerPatterns, Code Smells, and The Pragmattic Programmer
Patterns, Code Smells, and The Pragmattic Programmer
 
Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New Tricks
 
20160520 The Future of Services
20160520 The Future of Services20160520 The Future of Services
20160520 The Future of Services
 
Introduction to jOOQ
Introduction to jOOQIntroduction to jOOQ
Introduction to jOOQ
 
Test automation architecture. Advanced level
Test automation architecture. Advanced levelTest automation architecture. Advanced level
Test automation architecture. Advanced level
 
Akka dotnet presentation ndc 2017
Akka dotnet presentation ndc 2017Akka dotnet presentation ndc 2017
Akka dotnet presentation ndc 2017
 
Microservices pros and cons - houston tech fest
Microservices pros and cons - houston tech festMicroservices pros and cons - houston tech fest
Microservices pros and cons - houston tech fest
 
Agile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsAgile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing Fundamentals
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
 
Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1Intro to Flux - ReactJS Warsaw #1
Intro to Flux - ReactJS Warsaw #1
 
Scaling the guardian
Scaling the guardianScaling the guardian
Scaling the guardian
 
Reactive All the Way Down the Stack
Reactive All the Way Down the StackReactive All the Way Down the Stack
Reactive All the Way Down the Stack
 
Gr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for GroovyGr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for Groovy
 
Serverless testing-serverless-sydney-20181018
Serverless testing-serverless-sydney-20181018Serverless testing-serverless-sydney-20181018
Serverless testing-serverless-sydney-20181018
 

Similar to Ocassionally connected devices spark final

CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...
CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...
CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...Adrian Cockcroft
 
AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...
AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...
AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...Amazon Web Services
 
Chaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWSChaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWSBilal Aybar
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture PatternsAmazon Web Services
 
serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfAmazon Web Services
 
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020Tim Wagner
 
AWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley Wood
AWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley WoodAWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley Wood
AWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley WoodAmazon Web Services
 
Navigate Data Service using AWS
Navigate Data Service using AWSNavigate Data Service using AWS
Navigate Data Service using AWSArno Broekhof
 
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...Andreas Grabner
 
Yow Conference Dec 2013 Netflix Workshop Slides with Notes
Yow Conference Dec 2013 Netflix Workshop Slides with NotesYow Conference Dec 2013 Netflix Workshop Slides with Notes
Yow Conference Dec 2013 Netflix Workshop Slides with NotesAdrian Cockcroft
 
Design for scale
Design for scaleDesign for scale
Design for scaleDoug Lampe
 
Big Data - in the cloud or rather on-premises?
Big Data - in the cloud or rather on-premises?Big Data - in the cloud or rather on-premises?
Big Data - in the cloud or rather on-premises?Guido Schmutz
 
AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS
AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS
AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS Amazon Web Services
 
Journey Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersJourney Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersAdrian Hornsby
 
An introduction to AWS Direct Connect
An introduction to AWS Direct ConnectAn introduction to AWS Direct Connect
An introduction to AWS Direct ConnectJulien SIMON
 
Azure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAzure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAndre Essing
 
Above the cloud joarder kamal
Above the cloud   joarder kamalAbove the cloud   joarder kamal
Above the cloud joarder kamalJoarder Kamal
 
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...Andre Essing
 
A real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloudA real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloudJulien SIMON
 
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)Amazon Web Services
 

Similar to Ocassionally connected devices spark final (20)

CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...
CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...
CMG2013 Workshop: Netflix Cloud Native, Capacity, Performance and Cost Optimi...
 
AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...
AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...
AWS re:Invent 2016: Moving Mission Critical Apps from One Region to Multi-Reg...
 
Chaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWSChaos engineering & Gameday on AWS
Chaos engineering & Gameday on AWS
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture Patterns
 
serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdf
 
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
 
AWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley Wood
AWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley WoodAWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley Wood
AWS Summit 2013 | India - Web, Mobile and Social Apps on AWS, Kingsley Wood
 
Navigate Data Service using AWS
Navigate Data Service using AWSNavigate Data Service using AWS
Navigate Data Service using AWS
 
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
Performance Quality Metrics for Mobile Web and Mobile Native - Agile Testing ...
 
Yow Conference Dec 2013 Netflix Workshop Slides with Notes
Yow Conference Dec 2013 Netflix Workshop Slides with NotesYow Conference Dec 2013 Netflix Workshop Slides with Notes
Yow Conference Dec 2013 Netflix Workshop Slides with Notes
 
Design for scale
Design for scaleDesign for scale
Design for scale
 
Big Data - in the cloud or rather on-premises?
Big Data - in the cloud or rather on-premises?Big Data - in the cloud or rather on-premises?
Big Data - in the cloud or rather on-premises?
 
AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS
AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS
AWS Public Sector Symposium 2014 Canberra | Black Belt Tips on AWS
 
Journey Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersJourney Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million Users
 
An introduction to AWS Direct Connect
An introduction to AWS Direct ConnectAn introduction to AWS Direct Connect
An introduction to AWS Direct Connect
 
Azure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAzure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep Dive
 
Above the cloud joarder kamal
Above the cloud   joarder kamalAbove the cloud   joarder kamal
Above the cloud joarder kamal
 
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
 
A real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloudA real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloud
 
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
AWS re:Invent 2016: Serverless IoT Back Ends (IOT401)
 

Recently uploaded

Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 

Recently uploaded (20)

Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 

Ocassionally connected devices spark final

Editor's Notes

  1. Thank Mark and the other co-organizer for putting on this event. Thank the Enterprise Developer’s guild for putting on such an awesome free event every year. I’m Chris Ballance, and I’m excited to have the opportunity to hang out with all the smart people here and to speak to you guys today. My company was nice enough to overnight me a shirt with our new logo for this event, so mention that Diligent is hiring. We’re a .NET, iOS, and Node.js shop and are looking for the Spolsky ideal of “smart and gets things done,” so catch me later if you’re looking.
  2. This is me at my desk writing code on a typical day. Segway: I know a lot of folks end up in a Development role from a wide variety of other disciplines. I’ve worked with sculptors, attorneys, classically trained musicians, and various others who excel at writing software. If you’re new to software, I encourage you to stick with it, you’ll never get bored. Oddly enough, I knew I wanted to write software since I was about Five years old. This video can explain…
  3. Volvo - Common web platform. Started as a junior dev and left 4 years later as a tech lead on a product called Dealer SiteBuilder which syndicated content globally to Volvo dealer sites and allowed them to customize these. Microsoft - Joined the team in Charlotte working on a product called Bemis that was the authoring backend for the Knowledge Base articles you see on support.microsoft.com for another 4 years. When I was burned out of BigCorp, I left Microsoft to join a startup called Triumph Research Intelligence based outside of London. I lead development of a Risk Based Monitoring product on a visualization platform we also built called VisualOPRA. It was fantastic right up until the moment we shipped v1.0 and ran out of money :-) <pause> Back in December I joined a new company to Charlotte called Diligent and we’ve been heads-down developing a collaboration product called TEAMS that we’re shipping in Q3.
  4. So, I like to make analogies to the real world when I talk about software - sometimes to a fault. For Occasionally Connected Devices, I thought this was fitting. Anyone remember this guy?
  5. Doc Brown the right attitude for developing software for Occasionally Connected Devices
  6. Open and read this site (have backup on desktop)
  7. Relate “have you thought about offline”
  8. This slide needs moving
  9. Need to at least get this slide to living beside the Immutability bullet list slide. Synchronization of mutable objects is hard Refine consistency using immutable objects to achieve eventual consistency
  10. If an operation is applied multiple times, the result is the same as if it was applied only once Spilled milk cannot be “more” spilled. (find a better example)
  11. Before I get into CAP theorem, I’d like to start off with another very similar triangle you’re already familiar with…
  12. CAP Theorem is similar. We have three competing interests
  13. Choose two
  14. Consistency - Always reads the most recent write - One version of the truth - But, if nodes are partitioned, we cannot guarantee consistency. - We can wait until we’re consistent, but in the meantime we may timeout and cannot continue.
  15. Every (unfailed) node always returns query results Eventually consistent No errors or timeouts, but data may be stale If partitioned, a node can return its current state, but it may be an old version of the truth
  16. Are all nodes always consistent? What is the lag time between node updates? One version of the truth Transactions are atomic
  17. -Be dramatic… PARTITION TOLERANCE IS A MYTH!!1! -This is just the nature of networks. Nothing is guaranteed. -So really, we just have two competing interests, Consistency, and Availability. -Choosing which to favor cannot be an entirely technical decision, but something to discuss with your stakeholders and it depends on the type of app you’re building.
  18. Once choice would be to favor Consistency. While this isn’t as popular with most workflows, it has its place.
  19. -Another choice would be to favor Availability. You’ll find this is very common in social media, and media in general.
  20. Here’s an example where we’re favoring consistency. We have a stick guy with data to write, and two nodes to write to and read from.
  21. S1 is going to be our payload, and we send it to node B.
  22. After we’ve sent our write (S1) to node B, we query Node A for the value of S. We might not even know that we’re being routed to node A for the read when we just wrote to node B. This can be even more confusing to even savvy users if this redirection is fully transparent behind a load balancer (and it typically is).
  23. Stick man is not a patient fellow and he’s tapping his foot, waiting for his query to return. He’s probably just going to assume the system is broken after a few seconds…
  24. Finally, Node A is able to synchronize with Node B to get S1 and return it to Stick guy. There’s a real risk of starving Stuck guy, and he’s already looking mighty thin.
  25. Now let’s look at a different approach. This time, we will favor Availability over Consistency.
  26. Our buddy, Stick guy, again sends S1 to Node B.
  27. Now he queries Node A.
  28. He immediately gets a reply, but it is stale data, since Nodes A & B have not yet synchronized. We don’t have to wait for the query to return, but we do get stale data that is older than what we have already sent out.
  29. On the later query, stick guy gets back the value S1 that he is expecting, consistent with what he previously sent to Node B.
  30. This needs a header slide. Not sure where it went. Now on to security…
  31. Things to point out about this hokey security - Security is ineffective - Causes more trouble than value add - In the end, is not used and abandoned
  32. TODO: change to “Physical device security”
  33. SSL / TLS, but this is not enough. -Securing the channel is important, but not sufficient. - Man in the middle attacks are a vulnerability (We could talk about Bob, Alice, and the other person in the crypto gang of three, but I’ll leave that for a different talk) - 128-bit symmetric keys are the SSL standard. How long do you think it takes to brute-force AES 128-bit? Less than half as long as it did last year… In a few years my refrigerator will be capable of breaking AES.
  34. If the data isn’t moving, encrypt it DPAPI, Asymmetric, etc.
  35. We’ll start with a generic App that needs to send data. In this case an iPhone 5. I wanted to use the iPhone 6 Plus, but I couldn’t get it to fit on the slide.
  36. We need to give the user an indicator that we have stored the data, and are prepared to sync it at the next opportunity. It should not slow down at all if we don’t have a network connection at the moment.
  37. Server can either inspect the payload or not. There may be routing, a service bus, or some processing that needs to occur to the payload. In the case of a social media app, its content may be syndicated to other places.
  38. Enter Android, wanting to synchronize.
  39. I’m skipping how the Android phone set up its security contract. Assume it is already in place from a previous synchronization.
  40. We’ve read the message / data / photo and store it encrypted locally. The next time we send a synchronization request, we’ll include some sequence information or date we last synchronized to prevent re-sending data we’ve already synchronized which hasn’t changed since we retrieved it last.
  41. Need a slide showing what responsive design looks like.
  42. This is scary, and it is significantly more scary than last year. There are 2 billion devices coming online in the next few years in developing nations. They’re probably not going to be iPhones at their current price point… Need a slide on the rise of users in developing nations with limited funds to purchase equipment and very limited connectivity.
  43. Add notes from this article http://www.wired.com/2015/06/facebook-launches-facebook-lite-super-slow-connections/
  44. I had planned to build some live demos to demonstrate, however….
  45. It has been a busy year… segway to case studies
  46. Some aspects of a financial system, but less risk adverse.
  47. Starbucks example —> race condition So I got an idea to buy 3 Starbucks cards $5 each.
  48. Completely decentralized Security based on strong cryptography, not on passwords Fits the “Occasionally Connected” model natively Partition Tolerant