SlideShare une entreprise Scribd logo
1  sur  52
Imagining the
  Future of
  Real Time
Where are we?
How do we build
something bigger?
The Obvious
The Page Jail
Peer to Peer
Multiplexing
Search
The Not-So-Obvious
Algorithms
Average value
solution:

store a running sum
     and count
solution:

windowing
Variance
Set membership
1. build a set of
     members
2. test if input is a
     member
Bloom filters
State
Distributed Databases

    how to trade
    C and A for P
Consistent
Paxos
Available
Vector Clocks
Example:

What did you play?
jack:1

{ pacman }
jack:1, julien:1

{ pacman, pinball }
jack:1, julien:1, bear:1

{ pacman, pinball, racing }
jack:1, julien:1, fritzy:1

{ pacman, pinball, starwars }
jack:1, julien:1, bear:1
 { pacman, pinball, racing }

   jack:1, julien:1, fritzy:1
{ pacman, pinball, starwars }
jack:2, julien:1, bear:1,
         fritzy:1

  { pacman, pinball,
  racing, starwars }
Shared Editing
adam, henrik edit:

      ktcof
adam:        henrik:

A: add(r, 2)
  krtcof
adam:          henrik:

A: add(r, 2)
  krtcof
               A: add(r, 2)
                 krtcof
adam:          henrik:

A: add(r, 2)
  krtcof
               A: add(r, 2)
                 krtcof

               H: add(n, 6)
                krtconf
adam:          henrik:

A: add(r, 2)
  krtcof
               A: add(r, 2)
                 krtcof

               H: add(n, 6)
                krtconf
H: add(n, 6)
 krtconf
adam:          henrik:

A: add(r, 2)   H: add(n, 5)
  krtcof         ktconf
adam:          henrik:

A: add(r, 2)   H: add(n, 5)
  krtcof         ktconf


H: add(n,5)    A: add(r, 2)
 krtcnof        krtconf
adam:          henrik:

A: add(r, 2)   H: add(n, 5)
  krtcof         ktconf


H: add(n,5)    A: add(r, 2)
 krtcnof        krtconf

WTF?!?
Transformation
adam:          henrik:

A: add(r, 2)   H: add(n, 5)
  krtcof         ktconf
adam:          henrik:

A: add(r, 2)   H: add(n, 5)
  krtcof         ktconf

H: add(n, 5)   A: add(r, 2)
adam:          henrik:

A: add(r, 2)    H: add(n, 5)
  krtcof          ktconf

H: add(n, 5)    A: add(r, 2)
H': add(n, 6)   A': add(r, 2)
adam:          henrik:

A: add(r, 2)    H: add(n, 5)
  krtcof          ktconf

H: add(n, 5)    A: add(r, 2)
H': add(n, 6)   A': add(r, 2)

  krtconf         krtconf
Implementation

< 200 lines of JS
Tomorrow's apps will
   be awesome.
Building tomorrow's
     apps will be
     challenging.
Make the future.
Jack Moffitt
jack@metajack.im
http://metajack.im
    @metajack

Contenu connexe

Dernier

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Dernier (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Imagining the future of real time kr tconf 2011

Notes de l'éditeur

  1. * this talk is more abstract\n\n* let&apos;s try and think a year or two ahead, and figure out what those apps will be built with\n\n* not the specific apis or languages, but general design and architecture\n\n* some things will surely need to be invented, but some can be stolen from other fields\n\n* this is a small tour of things i believe will become very important\n
  2. * we came from static\n\n* we got xhr and made things better\n\n* we figured out long polling to get to the first real-time apps\n\n* now we are just getting past the low hanging fruit\n\n* already seeing higher level frameworks like derby\n\n** most of these problems are not unique to the web.\n
  3. - MMORPG or first person shooters\n\n- collaborative spaces\n\n- mashups of real-time apps\n
  4. \n
  5. how many single page app frameworks have we seen at this conference?\n\nsome of this stuff needs to go into browsers\n\nShared WebWorkers may be an initial answer\n
  6. multimedia, filesharing, and later better state management\n\n\n
  7. * halo network protocol\n
  8. * silos\n\n* crawlers deal with only static content\n
  9. \n
  10. many of the common algorithms we use will fail to help us. \n\njust like big data, real-time apps will need new solutions.\n
  11. * We&apos;ll start with something easy\n\n* How do you calculate the average of a set of numbers?\n
  12. * pretty much everyone knows this\n\n* notice that you have to count the list, which means you have to have a list. this takes up a lot of space if the list is large. what if the list is infinite?\n\n
  13. If we tally the sum and the count as they go by, then we can just divide at any time to get the average.\n\nThis still takes a bit of space, but not nearly as much O(log n) instead of O(n)\n
  14. Store the last N values and use that for the average\n\ncan smooth this out by using exponentially weighted averages (think stock charts)\n
  15. * let&apos;s get a little bit harder\n\n* how do you calculate the variance?\n
  16. * note that you need the number of elements and each element minus the average\n
  17. * after some algebra, you can get this\n\n* now we just need running totals for the mean and the mean of the squares, and the count\n\n* easy\n\n* note that you don&apos;t need to know any math for this, you just need to assume such things are possible, and go look them up.\n
  18. * how do you test if something is in a set?\n
  19. * very simple. a hash or dictionary can be used to make this a constant time operation\n\n* however, it consumes space proportional to the members. what if the list of members is quite large?\n\n
  20. * bloom filters can solve this problem\n\n* probabilistic data structure. if it says not a member, 100% certainty. has a small chance to give you a false positive, which can be tuned\n\n* it takes constant space, and can never fill up\n\n* set union (and to some extent) set intersection are trivial (bitwise OR and AND)\n\n* used in databases and caches to prevent disk lookups for nonexistant stuff\n\n* several variants for different use cases (counting, scalable, etc)\n
  21. * interesting applications tend to have a lot of state\n\n* many applications are collaborative, which means state is shared\n\n* state is often shared in non-collaborative apps since the user might have multiple tabs open\n\n* we are now in a really hard place\n\n* traditionally, we rely on databases to get us out of this mess, but this has severe limits for real-time apps\n\n* future apps will need to bring these kind of database features up to a higher layer, closer to the app\n\n* this is happening in general even on single machines with many cores. programming languages themselves are getting database semantics.\n
  22. * there are tons of new databases around, many of which attempt to solve horizontal scalability issues\n\n* brewer&apos;s CAP theorem says we must trade availability or consistency for the partition tolerance we require\n\n* let&apos;s briefly discuss those two tradeoffs\n
  23. * if we choose consistency, what does it look like?\n\n* all nodes must agree on state changes, how can we do this?\n\n* how do people do this? we vote.\n\n* in computer science, this is called consensus, and we determine consensus using a consensus protocol\n\n* we determine the master by consensus and send the update requests there\n\n* note that commit protocols don&apos;t work (ie, asking everyone to agree to some change, as opposed to a majority for example). they don&apos;t work in async environments and they fail harder.\n
  24. * paxos is probably the most important consensus protocol\n\n* it works very well in the face of failure, and variants work even when nodes lie and cheat\n\n* unfortunately, if consensus cannot be reached, no progress can be made (this is the availability sacrifice)\n\n* overcoming failures costs latency, and latency is paramount. imagine what happens if some nodes are really slow\n\n\n
  25. * let&apos;s trade off consistency instead\n\n* we can relax consistency to eventual consistency. this means current values will eventually make it to everyone, but at any given time the data may be inconsistent temporarily.\n\n* this model turns out to map very well to real-time web applications, and is what people are doing now in a simplified manner. we don&apos;t wait for absolute consistency, but we trust it will eventually converge.\n\n* how do we implement this?\n
  26. * one way to deal with eventual consistency is to order the events by time, and then apply them in order.\n\n* unfortunately, synchronized clocks don&apos;t really exist, so we need an abstract notion of time instead\n\n* use actor id and a counter, and each time we see a message, increment our count and stamp the message.\n\n* we can detect conflicts easily. two vclocks conflict if neither is descended from the other. these conflicts must be resolved somehow.\n\n* whether this conflict resolution is manual, automatic, easy or difficult depends on the application.\n\n* using these, all participants deal with distributed state changes quickly and easily, until a conflict is detected, and many times, that conflict can be easily resolved (for example, picking randomly or set union).\n
  27. * imagine you&apos;re at a party playing old video games\n\n* what games did everyone play?\n\n* we can use vector clocks manage the shared state of the list, shared by all the participants\n
  28. * on the left is the actor and version, on the right is the value\n\n* jack is hanging out with some friends\n\n* jack says he played pacman\n\n
  29. * julien says he played pinball\n\n* julien goes over to another group and asks the same question\n\n* jack goes off for one last game\n\n
  30. * in this other group, bear says he played some racing games\n
  31. meanwhile, in the original group, fritzy says he played star wars\n
  32. * later julien reports what he learned from the other group\n\n* neither of the two values is a descendant of the other\n\n* note that this is easy to detect\n\n* in this case it&apos;s also easy to automatically resolve. just use the union of both sets\n
  33. * jack resolves the conflict, updating his version and including seen clocks\n
  34. * let&apos;s talk about a specific example, shared editing\n\n* two computer scientists, Ellis and Gibbs, figured out one way to do this in 1989 (22 years ago!), and it&apos;s called operational transformation. if you saw or used google wave, this is how it worked as well.\n\n* it builds on vector clocks to do automatic conflict resolution in a very nice way.\n
  35. * both users start with a misspelled word\n\n* let&apos;s see what happens\n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. * henrik sees the right think, but adam does not\n\n* adam needs to transform henriks \n
  42. * henrik sees the right think, but adam does not\n\n* adam needs to transform henriks \n
  43. both parties can transform the incoming events based on their own actions.\n\nadam can transform henrik&apos;s edit by taking into account his own insert\n\nhenrik doesn&apos;t need to transform adam&apos;s edit since his delete didn&apos;t affect anything earlier in the string\n\nnow both can apply the transformed edits, and we have a consistent state\n
  44. \n
  45. * now adams and henrik get the others events\n
  46. The transformed event from henrik must be moved over one to account for the change adam made.\n\nHenrik&apos;s changes didn&apos;t affect the positions before his change, so adam&apos;s event is unchanged\n
  47. everything now looks great on both sides\n
  48. * i implemented this as an example in my xmpp book in under 200 lines of javascript\n\n* you keep track of the vector clocks, priorities, and logs of editing requests and previously executed edits in order to make the transformations. you also need to define a set of operations like add/delete in the most trivial case.\n\n\n
  49. * so far we&apos;ve all seen and created amazing things using real-time techniques\n\n* the future looks very bright as we get more creative and ambitious\n
  50. * unfortunately, we&apos;ve accepted a task that is among one of the hardest\n\n* we must rethink search\n\n* we must find ways to more efficiently use the network, both in size and architecture (multiplexing, peer to peer)\n\n* we will need to overcome (as always) limitations of browsers\n\n* we must rethink algorithms we&apos;ve always taken for granted\n\n* and most difficult, we must find practical ways to manage the shared state at the heart of our apps\n
  51. * \n
  52. \n