SlideShare a Scribd company logo
1 of 89
Download to read offline
Life BEYOND
the ILLUSION
of PRESENT
Jonas Bonér
CTO Typesafe
@jboner
"Time is what prevents everything from happening at once."
- John Archibald Wheeler
Newton's
PHYSICS
THIS SIMPLIFIED MODEL IS
VERY APPEALING TO US
von Neumann
ARCHITECTURE
BACK THEN
LIFE WAS GOOD
THEN, ALONG CAME
CONCURRENCY
MADE LIFE MISERABLE
Jim Gray's
TRANSACTIONS
SAVE THE DAY
WELL, ALONG CAME
DISTRIBUTION
MADE LIFE MISERABLE, again...
But don't be surprised
UNFORTUNATELY,
THIS IS NOT
HOW THE WORLD WORKS
"The future is a function of the past."
- A. P. Robertson
"The (local) present is a merge function of
multiple concurrent pasts."
— Me
val newLocalPresent = observedPasts.
foldLeft(oldLocalPresent) { _ merge _ }
WE NEED TO EXPLICITLY MODEL THE
LOCAL PRESENT AS
FACTS DERIVED FROM THE
MERGING OF MULTIPLE
CONCURRENT PASTS
INFORMATION IS ALWAYS FROM THE PAST
THE TRUTH
IS CLOSER TO
EINSTEIN'S
PHYSICS
INFORMATION HAS
LATENCY
THE COST OF MAINTAINING
THIS ILLUSION IS INCREASED
CONTENTION &
COHERENCY
AS LATENCY GETS HIGHER, THE
ILLUSION CRACKS EVEN MORE
DISTRIBUTED SYSTEMS
EVERYWHERE
THE NETWORK IS RELIABLE...NAT
"If a tree falls in a forest and no one is around to hear it, does it make a
sound?"
— Charles Riborg Mann
Information CAN (and will) GET LOST
HOW DO WE DEAL WITH
INFORMATION LOSS
IN REAL LIFE?
WE USE A SIMPLE PROTOCOL OF
Confirm, Wait & Repeat
We fill in THE BLANKS
...AND IF WE ARE WRONG, WE TAKE
COMPENSATING ACTIONAPOLOGY-ORIENTED PROGRAMMING - PAT HELLAND (IN MEMORIES, GUESSES, AND APOLOGIES)
The bottom line:
WE CAN'T FORCE THE WORLD INTO A
SINGLE GLOBALLY CONSISTENT
PRESENT
Should we just GIVE UP?
I BELIEVE THAT THERE IS A
PATH FORWARD
WE NEED TO TREAT
TIME AS A
FIRST CLASS CONSTRUCT
WHAT IS TIME, really?
TIME IS THE
SUCCESSION OF
CAUSALLY RELATED EVENTS
How can we
MANAGE
TIME?
Think in FACTS
What is a
FACT?
"A Fact is something that truly exists or happens: something that has
actual existence, a true piece of information."
— Merriam Webster
IMMUTABILITY
is a requirement
So, do variables
HAVE A PURPOSE IN LIFE?
"The assignment statement is the von Neumann bottleneck of
programming languages and keeps us thinking in word-at-a-time terms
in much the same way the computer's bottleneck does."
— John Backus (Turing Award lecture 1977)
MUTABLE STATE
NEEDS TO BE
CONTAINED
Ok, but how should we
MANAGE FACTS?
Functional
PROGRAMMING
Logic
PROGRAMMING
Dataflow
PROGRAMMING
NEVER
DELETE
FACTS
"When bookkeeping was done with clay tablets or paper and ink,
accountants developed some clear rules about good accounting
practices. One never alters the books; if an error is made, it is
annotated and a new compensating entry is made in the books. The
books are thus a complete history of the transactions of the business.
Update-in-place strikes many systems designers as a cardinal sin: it
violates traditional accounting practices that have been observed for
hundreds of years."
— Jim Gray (1981)
CRUD
"Database is a cache of a subset of the log."
— Pat Helland (2007)
Store facts in an
EVENT LOG
The log allows
TIME
TRAVEL
Can we REWRITE THE PAST?
Allows us to shift our focus from
DATA AT REST, to
DATA IN MOTION
Stream Processing
CONSTRUCTING A SUFFICIENTLY CONSISTENT
LOCAL PRESENT
MEANS EMPLOYING
CONSISTENCY MECHANISMS
Consistency
WHAT?
WHY?
WHEN?
WE NEED TO DECOMPOSE THE SYSTEM USING
CONSISTENCY BOUNDARIES
INSIDE DATA: OUR CURRENT PRESENT
OUTSIDE DATA: BLAST FROM THE PAST
BETWEEN SERVICES: HOPE FOR THE FUTURE
— PAT HELLAND (DATA ON THE INSIDE VS DATA ON THE OUTSIDE)
MicroSERVICE
AGGREGATE Root
WITHIN THE CONSISTENCY BOUNDARY
EVENT
Sourcing
BETWEEN THE
Consistency
Boundaries
IT'S A ZOO
Decoupling in
TIME / SPACE
STRONG
CONSISTENCY
The wrong default
Here, we are living in the
LOOMING SHADOW OF
IMPOSSIBILITY
THEOREMS
FLPCONSENSUS IS IMPOSSIBLE
PROTOCOLS CLIMB THE LADDER OF KNOWLEDGE
Cɸ: Common Knowledge (infinite number of i)
Eiɸ: (Everyone knows * i) ɸ
E3ɸ: (Everyone knows * 3) ɸ
E2ɸ: Everyone knows Everyone knows ɸ
E1ɸ: Everyone knows ɸ
Sɸ: Someone knows ɸ
COMMON KNOWLEDGE
IS NOT ATTAINABLE VIA PROTOCOL- JOSEPH HALPERN
CAPCONSISTENCY IS IMPOSSIBLE
Dissecting
CAP
"The first principle of successful scalability is to batter the consistency
mechanisms down to a minimum."
– James Hamilton
EVENTUAL
CONSISTENCY
What does it really mean?
Tracking TIME is tracking CAUSALITY
RELYING ON
TIMESTAMPS
IS A BAD IDEA
Instead, rely on
LOGICAL TIME
Lamport
CLOCKS
GLOBAL CAUSAL ORDERING BETWEEN
Vector
CLOCKSPARTIAL CAUSAL ORDERING BETWEEN EVENTS
Causal
CONSISTENCY
What
CONSISTENCY
DO YOU REALLY NEED AND
when?
ACID 2.0ASSOCIATIVE
COMMUTATIVE
IDEMPOTENT
DISTRIBUTED
CONFLICT-FREE REPLICATED DATA TYPES
DISORDERLY PROGRAMMING
CALM THEOREM
WE ARE JUST GETTING STARTED
WE HAVE A LONG ROAD AHEAD OF US...
Thanks
FOR LISTENING
Life BEYOND
the ILLUSION
of PRESENT
Jonas Bonér
CTO Typesafe
@jboner

More Related Content

What's hot

What's hot (20)

Elastic Observability
Elastic Observability Elastic Observability
Elastic Observability
 
Sw 100 fr docker conteneurisation des applications
Sw 100 fr docker conteneurisation des applicationsSw 100 fr docker conteneurisation des applications
Sw 100 fr docker conteneurisation des applications
 
Provision GCP resources using Terraform @ GDG Craiova
Provision GCP resources using Terraform @ GDG CraiovaProvision GCP resources using Terraform @ GDG Craiova
Provision GCP resources using Terraform @ GDG Craiova
 
stackconf 2022: Open Source for Better Observability
stackconf 2022: Open Source for Better Observabilitystackconf 2022: Open Source for Better Observability
stackconf 2022: Open Source for Better Observability
 
Introduction to Kafka Streams
Introduction to Kafka StreamsIntroduction to Kafka Streams
Introduction to Kafka Streams
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)
 
DevOps Monitoring and Alerting
DevOps Monitoring and AlertingDevOps Monitoring and Alerting
DevOps Monitoring and Alerting
 
Why to Cloud Native
Why to Cloud NativeWhy to Cloud Native
Why to Cloud Native
 
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and ManageEnd to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
 
Monitoring with prometheus
Monitoring with prometheusMonitoring with prometheus
Monitoring with prometheus
 
Traffic Control with Envoy Proxy
Traffic Control with Envoy ProxyTraffic Control with Envoy Proxy
Traffic Control with Envoy Proxy
 
Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...
 
System monitoring
System monitoringSystem monitoring
System monitoring
 
Docker Tours Meetup #1 - Introduction à Docker
Docker Tours Meetup #1 - Introduction à DockerDocker Tours Meetup #1 - Introduction à Docker
Docker Tours Meetup #1 - Introduction à Docker
 
Batch Processing vs Stream Processing Difference
Batch Processing vs Stream Processing DifferenceBatch Processing vs Stream Processing Difference
Batch Processing vs Stream Processing Difference
 
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
 
kafka
kafkakafka
kafka
 
How Kubernetes helps Devops
How Kubernetes helps DevopsHow Kubernetes helps Devops
How Kubernetes helps Devops
 
End-to-End Deep Learning with Horovod on Apache Spark
End-to-End Deep Learning with Horovod on Apache SparkEnd-to-End Deep Learning with Horovod on Apache Spark
End-to-End Deep Learning with Horovod on Apache Spark
 

Similar to Life Beyond the Illusion of Present

Similar to Life Beyond the Illusion of Present (11)

Designing the Future Perfect: Developing a temporal understanding of the int...
Designing the Future Perfect: Developing a temporal understanding of the int...Designing the Future Perfect: Developing a temporal understanding of the int...
Designing the Future Perfect: Developing a temporal understanding of the int...
 
Time and Transition : RSD5
Time and Transition : RSD5Time and Transition : RSD5
Time and Transition : RSD5
 
Timeless streams
Timeless streamsTimeless streams
Timeless streams
 
Real-time Web: Timeshifting Organizational Learning
Real-time Web: Timeshifting Organizational LearningReal-time Web: Timeshifting Organizational Learning
Real-time Web: Timeshifting Organizational Learning
 
Life Is Beautiful On The Edge
Life Is Beautiful On The EdgeLife Is Beautiful On The Edge
Life Is Beautiful On The Edge
 
What is Complexity For?
What is Complexity For?What is Complexity For?
What is Complexity For?
 
THE KEY WORLD LAW ONE MUST KNOW: AB REVERSIBILITY PRINCIPLE: Prime-Principle ...
THE KEY WORLD LAW ONE MUST KNOW: AB REVERSIBILITY PRINCIPLE: Prime-Principle ...THE KEY WORLD LAW ONE MUST KNOW: AB REVERSIBILITY PRINCIPLE: Prime-Principle ...
THE KEY WORLD LAW ONE MUST KNOW: AB REVERSIBILITY PRINCIPLE: Prime-Principle ...
 
Martin Geddes - Lean Networking
Martin Geddes - Lean NetworkingMartin Geddes - Lean Networking
Martin Geddes - Lean Networking
 
Setting Time Aright
Setting Time ArightSetting Time Aright
Setting Time Aright
 
Gifford Lecture One: Cosmos, Time, Memory
Gifford Lecture One: Cosmos, Time, MemoryGifford Lecture One: Cosmos, Time, Memory
Gifford Lecture One: Cosmos, Time, Memory
 
Toward a Quantum Theory of Media
Toward a Quantum Theory of MediaToward a Quantum Theory of Media
Toward a Quantum Theory of Media
 

More from Jonas Bonér

Kalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge ContinuumKalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge Continuum
Jonas Bonér
 
Cloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessCloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful Serverless
Jonas Bonér
 
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVMState: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
Jonas Bonér
 

More from Jonas Bonér (20)

We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?
 
Kalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge ContinuumKalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge Continuum
 
The Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsThe Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native Applications
 
Cloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessCloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful Serverless
 
Designing Events-first Microservices
Designing Events-first MicroservicesDesigning Events-first Microservices
Designing Events-first Microservices
 
How Events Are Reshaping Modern Systems
How Events Are Reshaping Modern SystemsHow Events Are Reshaping Modern Systems
How Events Are Reshaping Modern Systems
 
Reactive Microsystems: The Evolution of Microservices at Scale
Reactive Microsystems: The Evolution of Microservices at ScaleReactive Microsystems: The Evolution of Microservices at Scale
Reactive Microsystems: The Evolution of Microservices at Scale
 
From Microliths To Microsystems
From Microliths To MicrosystemsFrom Microliths To Microsystems
From Microliths To Microsystems
 
Without Resilience, Nothing Else Matters
Without Resilience, Nothing Else MattersWithout Resilience, Nothing Else Matters
Without Resilience, Nothing Else Matters
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
 
Reactive Supply To Changing Demand
Reactive Supply To Changing DemandReactive Supply To Changing Demand
Reactive Supply To Changing Demand
 
Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)
 
Go Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
Go Reactive: Event-Driven, Scalable, Resilient & Responsive SystemsGo Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
Go Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
 
Introducing Akka
Introducing AkkaIntroducing Akka
Introducing Akka
 
Building Scalable, Highly Concurrent & Fault Tolerant Systems - Lessons Learned
Building Scalable, Highly Concurrent & Fault Tolerant Systems -  Lessons LearnedBuilding Scalable, Highly Concurrent & Fault Tolerant Systems -  Lessons Learned
Building Scalable, Highly Concurrent & Fault Tolerant Systems - Lessons Learned
 
Event Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveEvent Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspective
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
 
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVMState: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Life Beyond the Illusion of Present