SlideShare ist ein Scribd-Unternehmen logo
1 von 89
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie Life Beyond the Illusion of Present

Ähnlich wie 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
 

Mehr von 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
 

Mehr von Jonas Bonér (19)

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)
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Life Beyond the Illusion of Present