SlideShare a Scribd company logo
1 of 35
Download to read offline
A TALE OF TWO SYSTEMS:
INSIGHTS FROM
SOFTWARE ARCHITECTURE
DAVID MAX
Senior Software Engineer
ABOUT LINKEDIN NEW YORK CITY
● Located in Empire State Building.
● Approximately 90 engineers and out of
about 1000 employees total.
● Multiple teams, front end, back end and
data science.
#nwd2018WHAT “TWO SYSTEMS”?
System 1
● A working system that is nearing the limits of its capacity.
System 2
● The replacement system designed to address the capacity issues.
○ Solves the capacity problem…
○ …but utterly fails in other ways.
ANTI-PATTERN
“A common response to a recurring
problem that is usually ineffective and
risks being highly counterproductive.”
– Wikipedia
“An antipattern is just like a pattern,
except that instead of a solution it gives
something that looks superficially like a
solution but isn’t one.”
– Andrew Koenig
COACH VS. ROOKIE
More powerful conceptual
models help us better make
sense of what we see.
WHAT THE COACH HAS IS...
“...a set of mental abstractions that allow him to convert his
perceptions of raw phenomena, such as a ball being passed, into a
condensed and integrated understanding of what is happening,
such as the success of an offensive strategy.
The coach watches the same game that the rookie does, but he
understands it better.”
– George Fairbanks, Just Enough Software Architecture
THINKING LIKE A
COACH -
CONCEPTUAL MODELS
“Software Architecture refers to the high
level structures of a software system, the
discipline of creating such structures,
and the documentation of these
structures. These structures are needed
to reason about the software system.”
– Wikipedia
“Software architecture is the set of design
decisions which, if made incorrectly, may
cause your project to be cancelled.”
― Eoin Woods
What is Software Architecture?
#nwd2018ARCHITECTURALLY SIGNIFICANT REQUIREMENTS (ASRs)
Constraints - Unchangeable design decisions, usually given, sometimes
chosen.
Quality Attributes - Externally visible properties that characterize how
the system operates in a specific context.
Influential Functional Requirements - Features and functions that
require special attention in the architecture.
Other Influencers - Time, knowledge, experience, skills, office politics,
your own geeky biases, and all the other stuff that sways your decision
making.
― Michael Keeling, Design It!
#nwd2018QUALITY ATTRIBUTES - STANDARD BLENDER
Pros:
● Powerful motor (550 Watts)
● Sits well on kitchen counter
● Dishwasher safe
Cons:
● Must be plugged in
● Limited portability
(example from Design It! by Michael Keeling)
#nwd2018CORDLESS RECHARGEABLE HAND BLENDER
Pros:
● Small, very portable
● Doesn’t need electric outlet to operate
● Very easy to clean
Cons:
● Less powerful (2.5 Watts)
● Needs to be recharged after 20 minutes
● Must hold in hand to operate
#nwd2018CHAINSAW BLENDER
Pros
● Portable, doesn’t need
electric outlet
● Powerful! (37cc gas-powered
engine)
Cons
● Tad loud
● Emits exhaust unsafe for
indoor use
● Not suitable for kitchen
countertop use
#nwd2018TAKEAWAYS
● Three solutions for accomplishing the same task
● Each solution promotes a different set of quality attributes
● Quality attributes often trade off against each other
● The “best” design depends on which properties are most highly valued
#nwd2018
Processing
AGGREGATION
Input files
Output file
#nwd2018OLD SYSTEM FLOW
#nwd2018OLD SYSTEM FLOW
#nwd2018PROBLEMS
● Aggregator terminates with an out-of-memory error on the
largest inputs.
● Task Manager shows there’s plenty of memory left.
● A single memory allocation is requesting well over 500MB at
once, and fails.
WHO NEEDS 500MB at once?
If there is plenty of memory left, why is it failing?
#nwd2018WIN32 PROCESS ADDRESS SPACE
2 GB
8000000
FFFFFFFF
0000000
System virtual address space.
Reserved for use by system.
0000000
2 GB
0000000
7FFFFFFF
Per-process virtual address space.
Available for use by applications
#nwd2018MEMORY MAPPED FILE
#nwd2018ADDRESS SPACE FRAGMENTATION
Even with plenty of memory available, fragmentation of the
address space means there’s not enough contiguous address space
to fit this new block:
#nwd2018COACHABLE MOMENT
● Don’t wait until your system is already blowing up.
● Some scaling problems can’t be solved by buying a bigger computer.
#nwd2018LET’S FIX IT!
Symptom: Aggregator is failing with an out-of-memory error.
Reason: Output file is too large to fit in a Win32 memory mapped file.
Analysis: Current implementation can’t scale beyond a certain size output.
Conclusion: We have a scalability problem.
Solution: Replace aggregation data store with a more scalable solution.
#nwd2018IN-MEMORY DISTRIBUTED DATA CACHE
#nwd2018NEW ARCHITECTURE HAS NICE NEW ATTRIBUTES
#nwd2018NEW ARCHITECTURE OFFERS NEW SCALABILITY OPTIONS
Increasing Scalability
#nwd2018OLD SYSTEM FLOW
#nwd2018NEW SYSTEM FLOW
#nwd2018RUN TIME PERFORMANCE (NIGHTLY BATCH)
#nwd2018ROOKIE MISTAKES
● Include all constraints
○ Fixated on scalability
○ Forgot that we also had important time constraint as well!
● Quality Attributes
○ Worried mainly about scalability, time to implement, and reducing
changes to other parts of the system.
○ Forgot that quality attributes trade off against each other, and did
not analyze to what extent scalability is an ASR.
● Other differences
○ Single process memory mapped files have different performance
characteristics from in-memory distributed data caches.
#nwd2018SIGNIFICANT DIFFERENCES
Scenario - Lots of workers writing to same record.
Memory Mapped File - Best performance because the memory page is
most likely to be in memory. Less likely to need to swap to disk.
File on Disk
Mapped
Address
Range
Memory PageCPU Cache
Worker
Worker
Worker
Worker
Worker
#nwd2018IN-MEMORY DISTRIBUTED CACHE
Scenario - Lots of workers writing to same record.
Worst performance when workers write to the
same record on different machines because of
node-to-node synchronization.
Node Node
NodeNode
Node Node
Worker
Worker
Worker
Worker
#nwd2018IN-MEMORY DISTRIBUTED CACHE
Scenario - Lots of workers writing to same node.
Poor performance because unable to distribute load.
Node Node
NodeNode
Node Node
Worker
Worker
Worker
Worker
Worker
Worker
Worker
Worker
#nwd2018MEMORY MAPPED FILE
Scenario - Every worker writes to a different record.
Worse performance, because fewer cache hits,
more page faults, and more disk I/O.
File on Disk
Mapped
Address
Range
Memory PageCPU Cache
Worker
Worker
Worker
Worker
Worker
Memory Page
Page Fault
#nwd2018IN-MEMORY DISTRIBUTED CACHE
Scenario - Records associated with particular nodes. Load distributed over nodes.
Best performance. Record locality minimizes node-to-node synchronization.
Distributing connections over the cluster promotes better scaling.
Node Node
NodeNode
Node Node
Worker
Worker
Worker
Worker
Worker
Worker
Worker
Worker
Worker
#nwd2018CONCLUSION
● Thinking about the architecture helps us better understand how what
we are building addresses the important requirements.
● Promoting one quality attribute usually involves some kind of tradeoff.
Software Engineering is the discipline of balancing tradeoffs.
● The architecture is the hardest thing to change after the fact, so it pays
to invest some time up front analyzing the ASRs.
● Don’t wait until your system is falling over to make needed changes.
Less time spent on the architecture up front often means more time
spent doing avoidable rework later.
Thank You!
linkedin.com/in/davidpmax

More Related Content

What's hot

Becoming a Rock Star DBA
Becoming a Rock Star DBABecoming a Rock Star DBA
Becoming a Rock Star DBASheeri Cabral
 
Using AWS, Eucalyptus and Chef for the Optimal Hybrid Cloud
Using AWS, Eucalyptus and Chef for the Optimal Hybrid CloudUsing AWS, Eucalyptus and Chef for the Optimal Hybrid Cloud
Using AWS, Eucalyptus and Chef for the Optimal Hybrid Clouddboze
 
Branch Office Infrastructure
Branch Office InfrastructureBranch Office Infrastructure
Branch Office InfrastructureAidan Finn
 
Citrix XenDesktop: Dealing with Failure - SYN408
Citrix XenDesktop: Dealing with Failure - SYN408Citrix XenDesktop: Dealing with Failure - SYN408
Citrix XenDesktop: Dealing with Failure - SYN408Tom Gamull
 
5 Ways Your Backup Design Can Impact Virtualized Data Protection
5 Ways Your Backup Design Can Impact Virtualized Data Protection5 Ways Your Backup Design Can Impact Virtualized Data Protection
5 Ways Your Backup Design Can Impact Virtualized Data ProtectionStorage Switzerland
 
DBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentDBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentKyle Hailey
 
Software Process... the good parts
Software Process... the good partsSoftware Process... the good parts
Software Process... the good partsAndrew Shafer
 
VMWare Winnipeg Forum - 2011
VMWare Winnipeg Forum - 2011VMWare Winnipeg Forum - 2011
VMWare Winnipeg Forum - 2011asedha
 

What's hot (9)

Becoming a Rock Star DBA
Becoming a Rock Star DBABecoming a Rock Star DBA
Becoming a Rock Star DBA
 
Using AWS, Eucalyptus and Chef for the Optimal Hybrid Cloud
Using AWS, Eucalyptus and Chef for the Optimal Hybrid CloudUsing AWS, Eucalyptus and Chef for the Optimal Hybrid Cloud
Using AWS, Eucalyptus and Chef for the Optimal Hybrid Cloud
 
Branch Office Infrastructure
Branch Office InfrastructureBranch Office Infrastructure
Branch Office Infrastructure
 
Citrix XenDesktop: Dealing with Failure - SYN408
Citrix XenDesktop: Dealing with Failure - SYN408Citrix XenDesktop: Dealing with Failure - SYN408
Citrix XenDesktop: Dealing with Failure - SYN408
 
Dileep-Resume
Dileep-ResumeDileep-Resume
Dileep-Resume
 
5 Ways Your Backup Design Can Impact Virtualized Data Protection
5 Ways Your Backup Design Can Impact Virtualized Data Protection5 Ways Your Backup Design Can Impact Virtualized Data Protection
5 Ways Your Backup Design Can Impact Virtualized Data Protection
 
DBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentDBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application Development
 
Software Process... the good parts
Software Process... the good partsSoftware Process... the good parts
Software Process... the good parts
 
VMWare Winnipeg Forum - 2011
VMWare Winnipeg Forum - 2011VMWare Winnipeg Forum - 2011
VMWare Winnipeg Forum - 2011
 

Similar to A Tale of Two Systems - Insights from Software Architecture

Solving the Database Problem
Solving the Database ProblemSolving the Database Problem
Solving the Database ProblemJay Gordon
 
Elephant grooming: quality with Hadoop
Elephant grooming: quality with HadoopElephant grooming: quality with Hadoop
Elephant grooming: quality with HadoopRoman Nikitchenko
 
Building a High Performance Analytics Platform
Building a High Performance Analytics PlatformBuilding a High Performance Analytics Platform
Building a High Performance Analytics PlatformSantanu Dey
 
Disrupting the Storage Industry talk at SNIA Data Storage Innovation Conference
Disrupting the Storage Industry talk at SNIA Data Storage Innovation ConferenceDisrupting the Storage Industry talk at SNIA Data Storage Innovation Conference
Disrupting the Storage Industry talk at SNIA Data Storage Innovation ConferenceAdrian Cockcroft
 
Dori Exterman, Considerations for choosing the parallel computing strategy th...
Dori Exterman, Considerations for choosing the parallel computing strategy th...Dori Exterman, Considerations for choosing the parallel computing strategy th...
Dori Exterman, Considerations for choosing the parallel computing strategy th...Sergey Platonov
 
Webinar: Overcoming the Storage Roadblock to Data Center Modernization
Webinar: Overcoming the Storage Roadblock to Data Center ModernizationWebinar: Overcoming the Storage Roadblock to Data Center Modernization
Webinar: Overcoming the Storage Roadblock to Data Center ModernizationStorage Switzerland
 
Tales from the Field
Tales from the FieldTales from the Field
Tales from the FieldMongoDB
 
MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014Dylan Tong
 
VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops
VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops
VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops VMworld
 
Automatic Undo for Cloud Management via AI Planning
Automatic Undo for Cloud Management via AI PlanningAutomatic Undo for Cloud Management via AI Planning
Automatic Undo for Cloud Management via AI PlanningHiroshi Wada
 
Altitude SF 2017: Reddit - How we built and scaled r/place
Altitude SF 2017: Reddit - How we built and scaled r/placeAltitude SF 2017: Reddit - How we built and scaled r/place
Altitude SF 2017: Reddit - How we built and scaled r/placeFastly
 
Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...
Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...
Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...Amazon Web Services
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture corehard_by
 
Big Data: fall seven times, stand up eight!
Big Data: fall seven times, stand up eight!Big Data: fall seven times, stand up eight!
Big Data: fall seven times, stand up eight!Roman Nikitchenko
 
BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...
BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...
BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...Big Data Montreal
 
VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...
VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...
VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...VMworld
 

Similar to A Tale of Two Systems - Insights from Software Architecture (20)

Solving the Database Problem
Solving the Database ProblemSolving the Database Problem
Solving the Database Problem
 
NoSQL and ACID
NoSQL and ACIDNoSQL and ACID
NoSQL and ACID
 
AWS User Group October
AWS User Group OctoberAWS User Group October
AWS User Group October
 
Big data nyu
Big data nyuBig data nyu
Big data nyu
 
Elephant grooming: quality with Hadoop
Elephant grooming: quality with HadoopElephant grooming: quality with Hadoop
Elephant grooming: quality with Hadoop
 
Building a High Performance Analytics Platform
Building a High Performance Analytics PlatformBuilding a High Performance Analytics Platform
Building a High Performance Analytics Platform
 
Cloud arch patterns
Cloud arch patternsCloud arch patterns
Cloud arch patterns
 
Disrupting the Storage Industry talk at SNIA Data Storage Innovation Conference
Disrupting the Storage Industry talk at SNIA Data Storage Innovation ConferenceDisrupting the Storage Industry talk at SNIA Data Storage Innovation Conference
Disrupting the Storage Industry talk at SNIA Data Storage Innovation Conference
 
Dori Exterman, Considerations for choosing the parallel computing strategy th...
Dori Exterman, Considerations for choosing the parallel computing strategy th...Dori Exterman, Considerations for choosing the parallel computing strategy th...
Dori Exterman, Considerations for choosing the parallel computing strategy th...
 
Webinar: Overcoming the Storage Roadblock to Data Center Modernization
Webinar: Overcoming the Storage Roadblock to Data Center ModernizationWebinar: Overcoming the Storage Roadblock to Data Center Modernization
Webinar: Overcoming the Storage Roadblock to Data Center Modernization
 
Tales from the Field
Tales from the FieldTales from the Field
Tales from the Field
 
MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014
 
VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops
VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops
VMworld 2013: Low-Cost, High-Performance Storage for VMware Horizon Desktops
 
Automatic Undo for Cloud Management via AI Planning
Automatic Undo for Cloud Management via AI PlanningAutomatic Undo for Cloud Management via AI Planning
Automatic Undo for Cloud Management via AI Planning
 
Altitude SF 2017: Reddit - How we built and scaled r/place
Altitude SF 2017: Reddit - How we built and scaled r/placeAltitude SF 2017: Reddit - How we built and scaled r/place
Altitude SF 2017: Reddit - How we built and scaled r/place
 
Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...
Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...
Application Optimized Performance: Choosing the Right Instance (CPN212) | AWS...
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
 
Big Data: fall seven times, stand up eight!
Big Data: fall seven times, stand up eight!Big Data: fall seven times, stand up eight!
Big Data: fall seven times, stand up eight!
 
BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...
BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...
BDM37: Hadoop in production – the war stories by Nikolaï Grigoriev, Principal...
 
VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...
VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...
VMworld 2013: Re-imagining VDI Design: New Strategies for Solving VDI Challen...
 

Recently uploaded

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 

A Tale of Two Systems - Insights from Software Architecture

  • 1. A TALE OF TWO SYSTEMS: INSIGHTS FROM SOFTWARE ARCHITECTURE DAVID MAX Senior Software Engineer
  • 2. ABOUT LINKEDIN NEW YORK CITY ● Located in Empire State Building. ● Approximately 90 engineers and out of about 1000 employees total. ● Multiple teams, front end, back end and data science.
  • 3. #nwd2018WHAT “TWO SYSTEMS”? System 1 ● A working system that is nearing the limits of its capacity. System 2 ● The replacement system designed to address the capacity issues. ○ Solves the capacity problem… ○ …but utterly fails in other ways.
  • 4. ANTI-PATTERN “A common response to a recurring problem that is usually ineffective and risks being highly counterproductive.” – Wikipedia “An antipattern is just like a pattern, except that instead of a solution it gives something that looks superficially like a solution but isn’t one.” – Andrew Koenig
  • 5. COACH VS. ROOKIE More powerful conceptual models help us better make sense of what we see.
  • 6. WHAT THE COACH HAS IS... “...a set of mental abstractions that allow him to convert his perceptions of raw phenomena, such as a ball being passed, into a condensed and integrated understanding of what is happening, such as the success of an offensive strategy. The coach watches the same game that the rookie does, but he understands it better.” – George Fairbanks, Just Enough Software Architecture
  • 7. THINKING LIKE A COACH - CONCEPTUAL MODELS “Software Architecture refers to the high level structures of a software system, the discipline of creating such structures, and the documentation of these structures. These structures are needed to reason about the software system.” – Wikipedia “Software architecture is the set of design decisions which, if made incorrectly, may cause your project to be cancelled.” ― Eoin Woods What is Software Architecture?
  • 8. #nwd2018ARCHITECTURALLY SIGNIFICANT REQUIREMENTS (ASRs) Constraints - Unchangeable design decisions, usually given, sometimes chosen. Quality Attributes - Externally visible properties that characterize how the system operates in a specific context. Influential Functional Requirements - Features and functions that require special attention in the architecture. Other Influencers - Time, knowledge, experience, skills, office politics, your own geeky biases, and all the other stuff that sways your decision making. ― Michael Keeling, Design It!
  • 9. #nwd2018QUALITY ATTRIBUTES - STANDARD BLENDER Pros: ● Powerful motor (550 Watts) ● Sits well on kitchen counter ● Dishwasher safe Cons: ● Must be plugged in ● Limited portability (example from Design It! by Michael Keeling)
  • 10. #nwd2018CORDLESS RECHARGEABLE HAND BLENDER Pros: ● Small, very portable ● Doesn’t need electric outlet to operate ● Very easy to clean Cons: ● Less powerful (2.5 Watts) ● Needs to be recharged after 20 minutes ● Must hold in hand to operate
  • 11. #nwd2018CHAINSAW BLENDER Pros ● Portable, doesn’t need electric outlet ● Powerful! (37cc gas-powered engine) Cons ● Tad loud ● Emits exhaust unsafe for indoor use ● Not suitable for kitchen countertop use
  • 12. #nwd2018TAKEAWAYS ● Three solutions for accomplishing the same task ● Each solution promotes a different set of quality attributes ● Quality attributes often trade off against each other ● The “best” design depends on which properties are most highly valued
  • 16. #nwd2018PROBLEMS ● Aggregator terminates with an out-of-memory error on the largest inputs. ● Task Manager shows there’s plenty of memory left. ● A single memory allocation is requesting well over 500MB at once, and fails. WHO NEEDS 500MB at once? If there is plenty of memory left, why is it failing?
  • 17. #nwd2018WIN32 PROCESS ADDRESS SPACE 2 GB 8000000 FFFFFFFF 0000000 System virtual address space. Reserved for use by system. 0000000 2 GB 0000000 7FFFFFFF Per-process virtual address space. Available for use by applications
  • 19. #nwd2018ADDRESS SPACE FRAGMENTATION Even with plenty of memory available, fragmentation of the address space means there’s not enough contiguous address space to fit this new block:
  • 20. #nwd2018COACHABLE MOMENT ● Don’t wait until your system is already blowing up. ● Some scaling problems can’t be solved by buying a bigger computer.
  • 21. #nwd2018LET’S FIX IT! Symptom: Aggregator is failing with an out-of-memory error. Reason: Output file is too large to fit in a Win32 memory mapped file. Analysis: Current implementation can’t scale beyond a certain size output. Conclusion: We have a scalability problem. Solution: Replace aggregation data store with a more scalable solution.
  • 23. #nwd2018NEW ARCHITECTURE HAS NICE NEW ATTRIBUTES
  • 24. #nwd2018NEW ARCHITECTURE OFFERS NEW SCALABILITY OPTIONS Increasing Scalability
  • 27. #nwd2018RUN TIME PERFORMANCE (NIGHTLY BATCH)
  • 28. #nwd2018ROOKIE MISTAKES ● Include all constraints ○ Fixated on scalability ○ Forgot that we also had important time constraint as well! ● Quality Attributes ○ Worried mainly about scalability, time to implement, and reducing changes to other parts of the system. ○ Forgot that quality attributes trade off against each other, and did not analyze to what extent scalability is an ASR. ● Other differences ○ Single process memory mapped files have different performance characteristics from in-memory distributed data caches.
  • 29. #nwd2018SIGNIFICANT DIFFERENCES Scenario - Lots of workers writing to same record. Memory Mapped File - Best performance because the memory page is most likely to be in memory. Less likely to need to swap to disk. File on Disk Mapped Address Range Memory PageCPU Cache Worker Worker Worker Worker Worker
  • 30. #nwd2018IN-MEMORY DISTRIBUTED CACHE Scenario - Lots of workers writing to same record. Worst performance when workers write to the same record on different machines because of node-to-node synchronization. Node Node NodeNode Node Node Worker Worker Worker Worker
  • 31. #nwd2018IN-MEMORY DISTRIBUTED CACHE Scenario - Lots of workers writing to same node. Poor performance because unable to distribute load. Node Node NodeNode Node Node Worker Worker Worker Worker Worker Worker Worker Worker
  • 32. #nwd2018MEMORY MAPPED FILE Scenario - Every worker writes to a different record. Worse performance, because fewer cache hits, more page faults, and more disk I/O. File on Disk Mapped Address Range Memory PageCPU Cache Worker Worker Worker Worker Worker Memory Page Page Fault
  • 33. #nwd2018IN-MEMORY DISTRIBUTED CACHE Scenario - Records associated with particular nodes. Load distributed over nodes. Best performance. Record locality minimizes node-to-node synchronization. Distributing connections over the cluster promotes better scaling. Node Node NodeNode Node Node Worker Worker Worker Worker Worker Worker Worker Worker Worker
  • 34. #nwd2018CONCLUSION ● Thinking about the architecture helps us better understand how what we are building addresses the important requirements. ● Promoting one quality attribute usually involves some kind of tradeoff. Software Engineering is the discipline of balancing tradeoffs. ● The architecture is the hardest thing to change after the fact, so it pays to invest some time up front analyzing the ASRs. ● Don’t wait until your system is falling over to make needed changes. Less time spent on the architecture up front often means more time spent doing avoidable rework later.