SlideShare a Scribd company logo
1 of 52
Download to read offline
NoSQL &
Distributed Log
Diego Pacheco
Design
Requirements
Going to the Beach “Metaphor”
❏ Let's say dont have requirements about:
❏ Beers
❏ Corn
❏ Surf
❏ Fun
❏ shower
❏ But you know we are going to a beach so even
if anyone DID NOT asked you need to GET
AHEAD and connect the dot.
❏ Architecture / Design are about being
“flexible” enough to accommodate future
possible changes.
❏ Not Necessary means CODING but for sure
means thinking and being ready for.
Architecture/Design is all about Tradeoffs
❏ Given a USE CASE:
❏ What Benefits?
❏ What issues it has?
❏ What dependencies?
❏ What risks?
❏ How we improve it?
❏ How we validate it?
❏ How we know we are right?
❏ Build VS Buy Analysis
❏ Open Source VS Paid software
❏ How much up to front work?
SQL
The universe as we know...
The universe as we know...
=
=
The universe as we know...
Declarative: I don't care, just get it done....
Relational abuse !!!
NoSQL
Much Bigger Universe...
a Different universe...
❏ What is NoSQL about?
❏ High Scalability
❏ Low Latency
❏ High Throughput
❏ High Availability (IF “AP” system)
❏ Fast Performance
❏ Linear Scalability
❏ Better Design Options
❏ Great for Big Data
❏ Easier Replication (less schema constraints)
❏ Relation DB striped in several parts - Application and Ops do more.
❏ No Free Lunch: Operation: Several times is hard
Different ways do ASK and ANSWER questions....
❏ NoSQL WAY
❏ “No Tables”
❏ “No Joins”
❏ “No ACID”
❏ Different “schema”
❏ More Data Structures
❏ I need to know what I'm m doing.
❏ What do I want todo?
❏ What Access patterns do I have?
❏ I need fix problem in “parts”.
❏ Looks like much more work... (yes)
❏ ... Much better Performance / Scalability
❏ ... “RIGHT DESIGN”
❏ What about integrity?
❏ Be my guest ! LOL
❏ Looks like we “strip” the “DB” and we are
doing all the work on APP side? YES!
❏ Seriously? YES!
NoSQL is about Access Patterns. What queries / questions you need to answer?
CAP: Pick 1, forget the P.
Low Level in Detail
Trade-offs
* Data Structures
* Memory / Disk
* IO / Storage
* Monolith DB vs The Log
In 2013 Facebook was
scaling pretty much
based on Memcached
which is a in-memory
NoSQL memory
database.
Reduce number of DB
Calls (100M -> 5M)
28 TB of RAM and
+800 servers was used
by Facebook in 2013 .
Disk DS Trade-offs
Relation Data Structure = B+ Trees
Data Structures: LSM Trees
NoSQL Data Structure = LSM Trees
Bloom Filters
Distributed Logs
❏ What is a Log?
❏ Simple “record”
❏ Ordered Sequence of Immutable Event
❏ Needed for Data Intensive “Big” Systems.
❏ System using it:
❏ Kafka
❏ Amazon Aurora
❏ Raft Protocol
❏ Relational DBs (for Durability/Recovery) “redo” logs
❏ Who does use it?
❏ LinkedIN, Facebook, Twitter, Netflix,
Apple, Google, Uber, Lyft, Spotify...
No Places, RAW Events.
Immutability == Append ONLY
Segregation == Scalability
AWs Aurora Serverless Database == Modern, Well Engineered,
totally based in Distributed Logs. Re-build the DB by the LOG,
“The Log is the Database == Source of Truth”.
AWs Aurora Serverless Database == “The log is the Database”.
More Throughput Thanks to the Log. Log is out from DB engine.
Distributed writes - thanks to the log.
Exercises
Constraints: This are theoretical exercises, however you
need to submit PRs in Github. You can Create 01.md file
and use markdown syntax.
1. What are the good USE CASES for SQL / Relational DBs?
2. What are the good USE CASEs for NoSQL?
3. When you should use Distributed Logs? What use cases?
NoSQL &
Distributed Log
Diego Pacheco

More Related Content

Similar to NoSQL & Distributed Log

CMF: a pain in the F @ PHPDay 05-14-2011
CMF: a pain in the F @ PHPDay 05-14-2011CMF: a pain in the F @ PHPDay 05-14-2011
CMF: a pain in the F @ PHPDay 05-14-2011Alessandro Nadalin
 
Development to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersDevelopment to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersSeveralnines
 
Scalable data systems at Traveloka
Scalable data systems at TravelokaScalable data systems at Traveloka
Scalable data systems at TravelokaRendy Bambang Junior
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]Huy Do
 
Hybrid my sql_hadoop_datawarehouse
Hybrid my sql_hadoop_datawarehouseHybrid my sql_hadoop_datawarehouse
Hybrid my sql_hadoop_datawarehouseLaine Campbell
 
When NOT to use MongoDB
When NOT to use MongoDBWhen NOT to use MongoDB
When NOT to use MongoDBMike Michaud
 
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureCQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureThomas Jaskula
 
My life with MongoDB
My life with MongoDBMy life with MongoDB
My life with MongoDBMitch Pirtle
 
Prophet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopProphet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopJesse Vincent
 
Unit testing traning
Unit testing traningUnit testing traning
Unit testing traningDiego Pacheco
 
Everything We Learned About In-Memory Data Layout While Building VoltDB
Everything We Learned About In-Memory Data Layout While Building VoltDBEverything We Learned About In-Memory Data Layout While Building VoltDB
Everything We Learned About In-Memory Data Layout While Building VoltDBjhugg
 
The Right Data for the Right Job
The Right Data for the Right JobThe Right Data for the Right Job
The Right Data for the Right JobEmily Curtin
 
Reality and traps of real time data engineering - Milos Solujic
Reality and traps of real time data engineering - Milos SolujicReality and traps of real time data engineering - Milos Solujic
Reality and traps of real time data engineering - Milos SolujicInstitute of Contemporary Sciences
 
Sql Health in a SharePoint environment
Sql Health in a SharePoint environmentSql Health in a SharePoint environment
Sql Health in a SharePoint environmentEnrique Lima
 
Delta: Building Merge on Read
Delta: Building Merge on ReadDelta: Building Merge on Read
Delta: Building Merge on ReadDatabricks
 
Mvp4 croatia - Being a dba in a devops world
Mvp4 croatia - Being a dba in a devops worldMvp4 croatia - Being a dba in a devops world
Mvp4 croatia - Being a dba in a devops worldAlessandro Alpi
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!mold
 
Relational Databases - Benefits and Challenges
Relational Databases - Benefits and ChallengesRelational Databases - Benefits and Challenges
Relational Databases - Benefits and ChallengesElvis Saravia
 

Similar to NoSQL & Distributed Log (20)

Devops down-under
Devops down-underDevops down-under
Devops down-under
 
CMF: a pain in the F @ PHPDay 05-14-2011
CMF: a pain in the F @ PHPDay 05-14-2011CMF: a pain in the F @ PHPDay 05-14-2011
CMF: a pain in the F @ PHPDay 05-14-2011
 
Development to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersDevelopment to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB Clusters
 
Scalable data systems at Traveloka
Scalable data systems at TravelokaScalable data systems at Traveloka
Scalable data systems at Traveloka
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]
 
Hybrid my sql_hadoop_datawarehouse
Hybrid my sql_hadoop_datawarehouseHybrid my sql_hadoop_datawarehouse
Hybrid my sql_hadoop_datawarehouse
 
When NOT to use MongoDB
When NOT to use MongoDBWhen NOT to use MongoDB
When NOT to use MongoDB
 
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureCQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architecture
 
My life with MongoDB
My life with MongoDBMy life with MongoDB
My life with MongoDB
 
NoSQL
NoSQLNoSQL
NoSQL
 
Prophet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopProphet - Beijing Perl Workshop
Prophet - Beijing Perl Workshop
 
Unit testing traning
Unit testing traningUnit testing traning
Unit testing traning
 
Everything We Learned About In-Memory Data Layout While Building VoltDB
Everything We Learned About In-Memory Data Layout While Building VoltDBEverything We Learned About In-Memory Data Layout While Building VoltDB
Everything We Learned About In-Memory Data Layout While Building VoltDB
 
The Right Data for the Right Job
The Right Data for the Right JobThe Right Data for the Right Job
The Right Data for the Right Job
 
Reality and traps of real time data engineering - Milos Solujic
Reality and traps of real time data engineering - Milos SolujicReality and traps of real time data engineering - Milos Solujic
Reality and traps of real time data engineering - Milos Solujic
 
Sql Health in a SharePoint environment
Sql Health in a SharePoint environmentSql Health in a SharePoint environment
Sql Health in a SharePoint environment
 
Delta: Building Merge on Read
Delta: Building Merge on ReadDelta: Building Merge on Read
Delta: Building Merge on Read
 
Mvp4 croatia - Being a dba in a devops world
Mvp4 croatia - Being a dba in a devops worldMvp4 croatia - Being a dba in a devops world
Mvp4 croatia - Being a dba in a devops world
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!
 
Relational Databases - Benefits and Challenges
Relational Databases - Benefits and ChallengesRelational Databases - Benefits and Challenges
Relational Databases - Benefits and Challenges
 

More from Diego Pacheco

Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!Diego Pacheco
 
Continuous Discovery Habits Book Review.pdf
Continuous Discovery Habits  Book Review.pdfContinuous Discovery Habits  Book Review.pdf
Continuous Discovery Habits Book Review.pdfDiego Pacheco
 
Thoughts about Shape Up
Thoughts about Shape UpThoughts about Shape Up
Thoughts about Shape UpDiego Pacheco
 
Encryption Deep Dive
Encryption Deep DiveEncryption Deep Dive
Encryption Deep DiveDiego Pacheco
 
Management: Doing the non-obvious! III
Management: Doing the non-obvious! IIIManagement: Doing the non-obvious! III
Management: Doing the non-obvious! IIIDiego Pacheco
 
Design is not Subjective
Design is not SubjectiveDesign is not Subjective
Design is not SubjectiveDiego Pacheco
 
Architecture & Engineering : Doing the non-obvious!
Architecture & Engineering :  Doing the non-obvious!Architecture & Engineering :  Doing the non-obvious!
Architecture & Engineering : Doing the non-obvious!Diego Pacheco
 
Management doing the non-obvious II
Management doing the non-obvious II Management doing the non-obvious II
Management doing the non-obvious II Diego Pacheco
 
Testing in production
Testing in productionTesting in production
Testing in productionDiego Pacheco
 
Nine lies about work
Nine lies about workNine lies about work
Nine lies about workDiego Pacheco
 
Management: doing the nonobvious!
Management: doing the nonobvious!Management: doing the nonobvious!
Management: doing the nonobvious!Diego Pacheco
 
Dealing with dependencies
Dealing  with dependenciesDealing  with dependencies
Dealing with dependenciesDiego Pacheco
 
Dealing with dependencies in tests
Dealing  with dependencies in testsDealing  with dependencies in tests
Dealing with dependencies in testsDiego Pacheco
 

More from Diego Pacheco (20)

Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!
 
Continuous Discovery Habits Book Review.pdf
Continuous Discovery Habits  Book Review.pdfContinuous Discovery Habits  Book Review.pdf
Continuous Discovery Habits Book Review.pdf
 
Thoughts about Shape Up
Thoughts about Shape UpThoughts about Shape Up
Thoughts about Shape Up
 
Holacracy
HolacracyHolacracy
Holacracy
 
AWS IAM
AWS IAMAWS IAM
AWS IAM
 
CDKs
CDKsCDKs
CDKs
 
Encryption Deep Dive
Encryption Deep DiveEncryption Deep Dive
Encryption Deep Dive
 
Sec 101
Sec 101Sec 101
Sec 101
 
Reflections on SCM
Reflections on SCMReflections on SCM
Reflections on SCM
 
Management: Doing the non-obvious! III
Management: Doing the non-obvious! IIIManagement: Doing the non-obvious! III
Management: Doing the non-obvious! III
 
Design is not Subjective
Design is not SubjectiveDesign is not Subjective
Design is not Subjective
 
Architecture & Engineering : Doing the non-obvious!
Architecture & Engineering :  Doing the non-obvious!Architecture & Engineering :  Doing the non-obvious!
Architecture & Engineering : Doing the non-obvious!
 
Management doing the non-obvious II
Management doing the non-obvious II Management doing the non-obvious II
Management doing the non-obvious II
 
Testing in production
Testing in productionTesting in production
Testing in production
 
Nine lies about work
Nine lies about workNine lies about work
Nine lies about work
 
Management: doing the nonobvious!
Management: doing the nonobvious!Management: doing the nonobvious!
Management: doing the nonobvious!
 
AI and the Future
AI and the FutureAI and the Future
AI and the Future
 
Dealing with dependencies
Dealing  with dependenciesDealing  with dependencies
Dealing with dependencies
 
Dealing with dependencies in tests
Dealing  with dependencies in testsDealing  with dependencies in tests
Dealing with dependencies in tests
 
Kanban 2020
Kanban 2020Kanban 2020
Kanban 2020
 

Recently uploaded

ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Recently uploaded (20)

ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

NoSQL & Distributed Log

  • 2.
  • 5. Going to the Beach “Metaphor” ❏ Let's say dont have requirements about: ❏ Beers ❏ Corn ❏ Surf ❏ Fun ❏ shower ❏ But you know we are going to a beach so even if anyone DID NOT asked you need to GET AHEAD and connect the dot. ❏ Architecture / Design are about being “flexible” enough to accommodate future possible changes. ❏ Not Necessary means CODING but for sure means thinking and being ready for.
  • 6.
  • 7. Architecture/Design is all about Tradeoffs ❏ Given a USE CASE: ❏ What Benefits? ❏ What issues it has? ❏ What dependencies? ❏ What risks? ❏ How we improve it? ❏ How we validate it? ❏ How we know we are right? ❏ Build VS Buy Analysis ❏ Open Source VS Paid software ❏ How much up to front work?
  • 8.
  • 9.
  • 10. SQL
  • 11. The universe as we know...
  • 12.
  • 13. The universe as we know... = =
  • 14. The universe as we know...
  • 15. Declarative: I don't care, just get it done....
  • 17. NoSQL
  • 20. ❏ What is NoSQL about? ❏ High Scalability ❏ Low Latency ❏ High Throughput ❏ High Availability (IF “AP” system) ❏ Fast Performance ❏ Linear Scalability ❏ Better Design Options ❏ Great for Big Data ❏ Easier Replication (less schema constraints) ❏ Relation DB striped in several parts - Application and Ops do more. ❏ No Free Lunch: Operation: Several times is hard
  • 21. Different ways do ASK and ANSWER questions.... ❏ NoSQL WAY ❏ “No Tables” ❏ “No Joins” ❏ “No ACID” ❏ Different “schema” ❏ More Data Structures ❏ I need to know what I'm m doing. ❏ What do I want todo? ❏ What Access patterns do I have? ❏ I need fix problem in “parts”. ❏ Looks like much more work... (yes) ❏ ... Much better Performance / Scalability ❏ ... “RIGHT DESIGN” ❏ What about integrity? ❏ Be my guest ! LOL ❏ Looks like we “strip” the “DB” and we are doing all the work on APP side? YES! ❏ Seriously? YES!
  • 22. NoSQL is about Access Patterns. What queries / questions you need to answer?
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. CAP: Pick 1, forget the P.
  • 28.
  • 29. Low Level in Detail Trade-offs * Data Structures * Memory / Disk * IO / Storage * Monolith DB vs The Log
  • 30.
  • 31.
  • 32. In 2013 Facebook was scaling pretty much based on Memcached which is a in-memory NoSQL memory database. Reduce number of DB Calls (100M -> 5M) 28 TB of RAM and +800 servers was used by Facebook in 2013 .
  • 36. NoSQL Data Structure = LSM Trees
  • 37.
  • 40. ❏ What is a Log? ❏ Simple “record” ❏ Ordered Sequence of Immutable Event ❏ Needed for Data Intensive “Big” Systems. ❏ System using it: ❏ Kafka ❏ Amazon Aurora ❏ Raft Protocol ❏ Relational DBs (for Durability/Recovery) “redo” logs ❏ Who does use it? ❏ LinkedIN, Facebook, Twitter, Netflix, Apple, Google, Uber, Lyft, Spotify...
  • 41.
  • 42.
  • 43.
  • 44. No Places, RAW Events.
  • 47. AWs Aurora Serverless Database == Modern, Well Engineered, totally based in Distributed Logs. Re-build the DB by the LOG, “The Log is the Database == Source of Truth”.
  • 48. AWs Aurora Serverless Database == “The log is the Database”.
  • 49. More Throughput Thanks to the Log. Log is out from DB engine.
  • 50. Distributed writes - thanks to the log.
  • 51. Exercises Constraints: This are theoretical exercises, however you need to submit PRs in Github. You can Create 01.md file and use markdown syntax. 1. What are the good USE CASES for SQL / Relational DBs? 2. What are the good USE CASEs for NoSQL? 3. When you should use Distributed Logs? What use cases?