SlideShare uma empresa Scribd logo
1 de 23
A concrete talk about abstraction.
Theo Schlossnagle @postwait 1
 Founder: Circonus, OmniTI, Sparkpost, Fontdeck
 Distinguish ACM Member
 ACM Member at Large
 Avid Open Source Contributor
 Gentleman Farmer
Theo Schlossnagle @postwait 2
Boundaries in the software/hardware and software/human interface.
Also in the software/software interface.
Theo Schlossnagle @postwait 3
Transistors
Hardware Function
Micro Architecture
Instruction Set Architecture
Machine Code
Assembly Languages
Programming Languages
Algorithms/Data Structures
Applications
Theo Schlossnagle @postwait 4
Hardware
Software
Abstractions boundaries are at a
significantly lower dimension
(typically one)
than the space they separate
(typically greater than four).
Theo Schlossnagle @postwait 5
Task /
Problem
Skills
Efficiency /
Resources
Safety /
Correctness
Availability
Security /
Compliance
Time Series Data
Histogram
RocksDB
Raw Data
Column Families
Rollups
Tiers
Time Shards
LMDB
ZFS
Files
Abstractions are divides,
and the world isn’t always clean.
Performance requirements are
often a witness.
Result:
“Leaky Abstractions” or
“Abstraction Violations”
Theo Schlossnagle @postwait 6
Time Series Data
(for rebuild)
Time Series Data
(for rollup ETL)
Constraints Design
Performanc
e
AudienceScale
Resources
Techniques
API
Boundary
Abstraction
Core Problem
Abstractions aim to be generically useful.
The fewer initial consumers, the less likely this will be satisfied.
Theo Schlossnagle @postwait 7
Abstractions interfere with holistic
systems thinking.
Problems span layers.
Therefore analysis spans layers.
Abstractions are loans.
If abstraction boundaries bisect
common analysis tasks, those end
up being high-interest loans.
Theo Schlossnagle @postwait 8
Layer 1
client
communications
Layer 2
distributed
coordination
Layer 3
storage
layer
Expensive analysis
Inexpensiveanalysis
Abstractions in real-life can win, can lose, but most often do both.
Theo Schlossnagle @postwait 9
 Time Series Database
 Distributed
 Scalable
 High performance
• HTTP
• Lua
• CRDTs
• Math
• Resource Pools
• RocksDB
• C/C++/Asm
Speed Scale
AccessibilityCorrectness
Theo Schlossnagle @postwait 10
A sordid love story of layer violations and compromise.
Theo Schlossnagle @postwait 11
 libmtev is a multi-threaded, event-driven framework for
building high-performance service applications in C
 It makes it “easy”… for C developers that understand event-driven
code.
 Lua is an elegant and accessible functional language
 LuaJIT (is lua, but fast)
 LuaJIT’s embedding API make violating boundaries
convenient.
Theo Schlossnagle @postwait 12
Mistakes layered on mistakes layered on mistakes.
Theo Schlossnagle @postwait 13
 updating, appending, deleting
 reading randomly, sequentially, bulk
 It’s basically impossible to excel at all without layering
violations.
Theo Schlossnagle @postwait 14
Concurrency limitations and fair scheduling.
Theo Schlossnagle @postwait 15
 Resources (CPU, memory, disk, L2 cache, network, etc.) are
limited.
 Concurrency can help until… it hurts.
 For performance, we abstract on resource usage
boundaries/workload characteristics.
Theo Schlossnagle @postwait 16
Concrete lessons about abstractions.
Theo Schlossnagle @postwait 17
No one would get anything done. Ever.
Theo Schlossnagle @postwait 18
Microservices (in particular) afford
isolation choices beyond code
complexity: security, compliance,
availability, ownership, etc.
The dimension on which the abstraction
boundary is drawn should be selected to
yield the most benefit.
Theo Schlossnagle @postwait 19
The more things (and ultimately people)
that use the abstraction, the better it will
be designed (or subsequently
redesigned).
Never build an API without a real
consumer (TDD doesn’t count). This
should apply to all simplifications.
Theo Schlossnagle @postwait 20
They are not a goal, but they are not
evil. It should be intentional.
Some things behind an abstraction
should intuitively be hidden. Intuition
isn’t always right. When these leaks
consistently benefit multiple
stakeholders, it simply means the line of
abstraction has been redrawn.
Theo Schlossnagle @postwait 21
They happen.
They happen all the time.
I am unapologetic about this.
Violation carries cost burden.
Assess it, accept it, and move on.
Theo Schlossnagle @postwait 22
https://irondb.io/
https://github.com/circonus-labs/libmtev
Theo Schlossnagle @postwait 23

Mais conteúdo relacionado

Semelhante a Adding Simplicity to Complexity

Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2
ice799
 
Extreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on ToruswareExtreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on Torusware
Hazelcast
 
QCon NY 2014 - Evolving REST for an IoT World
QCon NY 2014 - Evolving REST for an IoT WorldQCon NY 2014 - Evolving REST for an IoT World
QCon NY 2014 - Evolving REST for an IoT World
Todd Montgomery
 
Joe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystemsJoe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystems
Sentifi
 

Semelhante a Adding Simplicity to Complexity (20)

FIWARE Wednesday Webinars - Performing Big Data Analysis Using Cosmos With Sp...
FIWARE Wednesday Webinars - Performing Big Data Analysis Using Cosmos With Sp...FIWARE Wednesday Webinars - Performing Big Data Analysis Using Cosmos With Sp...
FIWARE Wednesday Webinars - Performing Big Data Analysis Using Cosmos With Sp...
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
 
Reactive Programming Models for IoT
Reactive Programming Models for IoTReactive Programming Models for IoT
Reactive Programming Models for IoT
 
Concurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple SpacesConcurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple Spaces
 
Overview of QP Frameworks and QM Modeling Tools (Notes)
Overview of QP Frameworks and QM Modeling Tools (Notes)Overview of QP Frameworks and QM Modeling Tools (Notes)
Overview of QP Frameworks and QM Modeling Tools (Notes)
 
Need for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applicationsNeed for Async: Hot pursuit for scalable applications
Need for Async: Hot pursuit for scalable applications
 
Introduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVAIntroduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVA
 
Introduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVAIntroduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVA
 
Erlang
ErlangErlang
Erlang
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
 
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
 
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesBUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
 
Clair Tolan - Passwords for the clouds
Clair Tolan - Passwords for the cloudsClair Tolan - Passwords for the clouds
Clair Tolan - Passwords for the clouds
 
Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2
 
UTOPOLL白皮書.pdf
UTOPOLL白皮書.pdfUTOPOLL白皮書.pdf
UTOPOLL白皮書.pdf
 
Modern Embedded Software
Modern Embedded SoftwareModern Embedded Software
Modern Embedded Software
 
Extreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on ToruswareExtreme Network Performance with Hazelcast on Torusware
Extreme Network Performance with Hazelcast on Torusware
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simple
 
QCon NY 2014 - Evolving REST for an IoT World
QCon NY 2014 - Evolving REST for an IoT WorldQCon NY 2014 - Evolving REST for an IoT World
QCon NY 2014 - Evolving REST for an IoT World
 
Joe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystemsJoe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystems
 

Mais de Theo Schlossnagle

A Coherent Discussion About Performance
A Coherent Discussion About PerformanceA Coherent Discussion About Performance
A Coherent Discussion About Performance
Theo Schlossnagle
 
OmniOS Motivation and Design ~ LISA 2012
OmniOS Motivation and Design ~ LISA 2012OmniOS Motivation and Design ~ LISA 2012
OmniOS Motivation and Design ~ LISA 2012
Theo Schlossnagle
 
Monitoring and observability
Monitoring and observabilityMonitoring and observability
Monitoring and observability
Theo Schlossnagle
 

Mais de Theo Schlossnagle (20)

Monitoring 101
Monitoring 101Monitoring 101
Monitoring 101
 
Distributed Systems - Like It Or Not
Distributed Systems - Like It Or NotDistributed Systems - Like It Or Not
Distributed Systems - Like It Or Not
 
Applying SRE techniques to micro service design
Applying SRE techniques to micro service designApplying SRE techniques to micro service design
Applying SRE techniques to micro service design
 
Craftsmanship
CraftsmanshipCraftsmanship
Craftsmanship
 
SRECon Coherent Performance
SRECon Coherent PerformanceSRECon Coherent Performance
SRECon Coherent Performance
 
Commandments of scale
Commandments of scaleCommandments of scale
Commandments of scale
 
Adaptive availability
Adaptive availabilityAdaptive availability
Adaptive availability
 
Project reality
Project realityProject reality
Project reality
 
Monitoring the #DevOps way
Monitoring the #DevOps wayMonitoring the #DevOps way
Monitoring the #DevOps way
 
Operational Software Design
Operational Software DesignOperational Software Design
Operational Software Design
 
A Coherent Discussion About Performance
A Coherent Discussion About PerformanceA Coherent Discussion About Performance
A Coherent Discussion About Performance
 
The math behind big systems analysis.
The math behind big systems analysis.The math behind big systems analysis.
The math behind big systems analysis.
 
Understanding Slowness
Understanding SlownessUnderstanding Slowness
Understanding Slowness
 
OmniOS Motivation and Design ~ LISA 2012
OmniOS Motivation and Design ~ LISA 2012OmniOS Motivation and Design ~ LISA 2012
OmniOS Motivation and Design ~ LISA 2012
 
Monitoring and observability
Monitoring and observabilityMonitoring and observability
Monitoring and observability
 
Omnios and unix
Omnios and unixOmnios and unix
Omnios and unix
 
Monitoring and observability
Monitoring and observabilityMonitoring and observability
Monitoring and observability
 
Xtreme Deployment
Xtreme DeploymentXtreme Deployment
Xtreme Deployment
 
Atldevops
AtldevopsAtldevops
Atldevops
 
It's all about telemetry
It's all about telemetryIt's all about telemetry
It's all about telemetry
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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)
 

Adding Simplicity to Complexity

  • 1. A concrete talk about abstraction. Theo Schlossnagle @postwait 1
  • 2.  Founder: Circonus, OmniTI, Sparkpost, Fontdeck  Distinguish ACM Member  ACM Member at Large  Avid Open Source Contributor  Gentleman Farmer Theo Schlossnagle @postwait 2
  • 3. Boundaries in the software/hardware and software/human interface. Also in the software/software interface. Theo Schlossnagle @postwait 3
  • 4. Transistors Hardware Function Micro Architecture Instruction Set Architecture Machine Code Assembly Languages Programming Languages Algorithms/Data Structures Applications Theo Schlossnagle @postwait 4 Hardware Software
  • 5. Abstractions boundaries are at a significantly lower dimension (typically one) than the space they separate (typically greater than four). Theo Schlossnagle @postwait 5 Task / Problem Skills Efficiency / Resources Safety / Correctness Availability Security / Compliance
  • 6. Time Series Data Histogram RocksDB Raw Data Column Families Rollups Tiers Time Shards LMDB ZFS Files Abstractions are divides, and the world isn’t always clean. Performance requirements are often a witness. Result: “Leaky Abstractions” or “Abstraction Violations” Theo Schlossnagle @postwait 6 Time Series Data (for rebuild) Time Series Data (for rollup ETL)
  • 7. Constraints Design Performanc e AudienceScale Resources Techniques API Boundary Abstraction Core Problem Abstractions aim to be generically useful. The fewer initial consumers, the less likely this will be satisfied. Theo Schlossnagle @postwait 7
  • 8. Abstractions interfere with holistic systems thinking. Problems span layers. Therefore analysis spans layers. Abstractions are loans. If abstraction boundaries bisect common analysis tasks, those end up being high-interest loans. Theo Schlossnagle @postwait 8 Layer 1 client communications Layer 2 distributed coordination Layer 3 storage layer Expensive analysis Inexpensiveanalysis
  • 9. Abstractions in real-life can win, can lose, but most often do both. Theo Schlossnagle @postwait 9
  • 10.  Time Series Database  Distributed  Scalable  High performance • HTTP • Lua • CRDTs • Math • Resource Pools • RocksDB • C/C++/Asm Speed Scale AccessibilityCorrectness Theo Schlossnagle @postwait 10
  • 11. A sordid love story of layer violations and compromise. Theo Schlossnagle @postwait 11
  • 12.  libmtev is a multi-threaded, event-driven framework for building high-performance service applications in C  It makes it “easy”… for C developers that understand event-driven code.  Lua is an elegant and accessible functional language  LuaJIT (is lua, but fast)  LuaJIT’s embedding API make violating boundaries convenient. Theo Schlossnagle @postwait 12
  • 13. Mistakes layered on mistakes layered on mistakes. Theo Schlossnagle @postwait 13
  • 14.  updating, appending, deleting  reading randomly, sequentially, bulk  It’s basically impossible to excel at all without layering violations. Theo Schlossnagle @postwait 14
  • 15. Concurrency limitations and fair scheduling. Theo Schlossnagle @postwait 15
  • 16.  Resources (CPU, memory, disk, L2 cache, network, etc.) are limited.  Concurrency can help until… it hurts.  For performance, we abstract on resource usage boundaries/workload characteristics. Theo Schlossnagle @postwait 16
  • 17. Concrete lessons about abstractions. Theo Schlossnagle @postwait 17
  • 18. No one would get anything done. Ever. Theo Schlossnagle @postwait 18
  • 19. Microservices (in particular) afford isolation choices beyond code complexity: security, compliance, availability, ownership, etc. The dimension on which the abstraction boundary is drawn should be selected to yield the most benefit. Theo Schlossnagle @postwait 19
  • 20. The more things (and ultimately people) that use the abstraction, the better it will be designed (or subsequently redesigned). Never build an API without a real consumer (TDD doesn’t count). This should apply to all simplifications. Theo Schlossnagle @postwait 20
  • 21. They are not a goal, but they are not evil. It should be intentional. Some things behind an abstraction should intuitively be hidden. Intuition isn’t always right. When these leaks consistently benefit multiple stakeholders, it simply means the line of abstraction has been redrawn. Theo Schlossnagle @postwait 21
  • 22. They happen. They happen all the time. I am unapologetic about this. Violation carries cost burden. Assess it, accept it, and move on. Theo Schlossnagle @postwait 22