SlideShare a Scribd company logo
1 of 43
MICROSERVICES,
DISTRIBUTED COMPUTING
& CAP THEOREM
28/10/2018
Orhan Burak Bozan
Software Architecture
& Automation Consultant
OUTLINE
● MOTIVATION
● SCALING
● DISTRIBUTED SYSTEMS FUNDAMENTALS
● CAP THEOREM
● DATA MANAGEMENT – ACRONYMS
● CONSISTENCY TYPES
● EVENTUAL CONSISTENCY
MOTIVATION
● CONCEPTUAL OVERVIEW
● THINKING DISTRIBUTED
● SCALING
INTERNET TRAFFIC OVER TIME
MICROSERVICES TREND
TRAFFIC
HOW TO HANDLE MORE TRAFFIC?
TRADITIONAL APPLICATIONS
ACID RDBMS
MONOLITH
APP
TRADITIONAL APPLICATIONS
HOW TO HANDLE MORE TRAFFIC?
● SCALING
○ SCALE UP - VERTICAL SCALING
○ SCALE OUT - HORIZONTAL SCALING
VERTICAL SCALING
● Adding more resources to the server
● Advantages
○ No extra development
○ Less Networking
○ Better for process intensive apps
● Disadvantages
○ Extra Cost
○ Risky
HORIZONTAL SCALING
● Adding more servers w/ less capacity.
● Advantages
○ $ $ $ CHEAPER $ $ $
○ More fault tolerant
○ Better for enterprise apps
● Disadvantages
○ Complex design
○ More Networking
HORIZONTAL OR VERTICAL SCALING?
● Cost effectiveness
● Single Source of Failure
HORIZONTAL SCALING, BUT HOW?
HORIZONTAL SCALING, BUT HOW?
● SCALE CUBE
○ by Michael Fisher
X AXIS SCALING
● Horizontal Duplication
● Scale by Cloning Services
Y AXIS SCALING
● Functional Decomposition
● Scale by Using Microservices
● Polyglot Persistence
Y AXIS SCALING
Y AXIS SCALING
Z AXIS SCALING
● Data Partitioning
● Scale by Sharding Databases
MULTI DIMENSIONAL SCALING
SCALABLE DISTRIBUTED APPLICATIONS
SCALABLE DISTRIBUTED APPLICATIONS
● Networked Shared Multi Resource Systems
FUNDAMENTALS
● COMMON PITFALLS IN DISTRIBUTED COMPUTING
○ Consistency
○ Availability
○ Partition Tolerance
FUNDAMENTALS - CONSISTENCY
● Every read receives the most recent write or an
error.
● ex. If I get my cart on my shopping site, it must
contain all the previously added items.
FUNDAMENTALS - AVAILABILITY
● Every request receives a (non-error) response –
without guarantee that it contains the most recent
write
● ex. I will eventually Access my shopping cart.
FUNDAMENTALS - PARTITION TOLERANCE
● The system continues to operate even if there is a
partition / communication break
● ex. I should go shopping on my shopping site in a
partition.
CAP THEOREM
● “Of three properties of shared-data
systems (Consistency, Availability and
tolerance to network Partitions) only two
can be achieved at any given moment in
time.”
● 2000: Eric Brewer, PODC conference
keynote
CAP THEOREM
CA - FORFEIT PARTITIONS
● High-Availability Consistency
● 2-Phase Commit
● Single-site databases, Oracle,
Postgres, MySQL
CP - BEST EFFORT AVAILABILITY
● Strong Consistency w/ Partition
Tolerance
● Pessimistic Locking
● DNS, MongoDB, Redis
AP - BEST EFFORT CONSISTENCY
● Relax consistency in order to achieve
full availability.
● Optimistic locking
● Hazelcast, CouchBase, Cassandra
DATA MANAGEMENT - ACRONYMS
● ACID
○ Traditional monolith systems
○ RDBMS
● BASE
○ Distributed Systems
ACID
● ATOMIC
○ each transaction be "all or nothing"
● CONSISTENT
○ any transaction will bring the database from one valid state to another
● ISOLATED
○ transactions doesn’t interfere / concurrency
● DURABLE
○ once a transaction has been committed, it will remain so
BASE
● BASICALLY AVAILABLE
○ System mostly available and there might be subsystems temporarily
unavailable
● SOFT STATE
○ The state of system could change over time, even without any input.
● EVENTUAL CONSISTENT
○ Eventually all accesses will return the last updated value
CONSISTENCY TYPES
● STRONG CONSISTENCY
○ All subsequent accesses return the updated value after the update.
● WEAK CONSISTENCY
○ Subsequent accesses might not always be returning the updated value.
● EVENTUAL CONSISTENCY
○ Given, if no new updates to a data item, eventually all accesses to that
item will return the last updated value
EVENTUAL CONSISTENCY - EXAMPLES
● ALIEXPRESS
○ Payment
● INSTAGRAM
○ New follower
● SHAKE SHACK
○ Shaking Control
NEXT ...
● Restful Services
● Containerization
● Orchestration & Choreography
● Service/Resource Discovery
● API Gateway
● Event Sourcing & CQRS
● Eventapis
REFERENCES
● https://www.nginx.com/blog/introduction-to-microservices/
● http://microservices.io/
● https://en.wikipedia.org/wiki/Two-phase_commit_protocol
● https://en.wikipedia.org/wiki/CAP_theorem
● http://www.vtagion.com/scalability-scale-up-scale-out-care/
● https://en.wikipedia.org/wiki/Eventual_consistency
● http://www.fredberinger.com/2009/12/musings-on-nosql/
● http://blog.nahurst.com/visual-guide-to-nosql-systems
● http://broabandtrafficmanagement.blogspot.com.tr/2012/01/itu-internet-bandwidth-has-grown.html
Questions?
Orhan Burak Bozan
Senior Software Engineer
https://www.linkedin.com/in/bozan
http://microservices.kloia.com
https://github.com/kloiasoft/eventapis

More Related Content

What's hot

Cloud & Big Data: Lessons Learnt
Cloud & Big Data: Lessons LearntCloud & Big Data: Lessons Learnt
Cloud & Big Data: Lessons Learnt
philipbalinov
 
WSO2 Advantage Webinar WSO2 BAM2 Integration with mule esb
WSO2 Advantage Webinar  WSO2 BAM2 Integration with mule esbWSO2 Advantage Webinar  WSO2 BAM2 Integration with mule esb
WSO2 Advantage Webinar WSO2 BAM2 Integration with mule esb
WSO2
 
Mailerqnewpresentation
MailerqnewpresentationMailerqnewpresentation
Mailerqnewpresentation
Copernica BV
 

What's hot (19)

The role of databases in modern application development
The role of databases in modern application developmentThe role of databases in modern application development
The role of databases in modern application development
 
Mystery Machine Overview
Mystery Machine OverviewMystery Machine Overview
Mystery Machine Overview
 
Cloud & Big Data: Lessons Learnt
Cloud & Big Data: Lessons LearntCloud & Big Data: Lessons Learnt
Cloud & Big Data: Lessons Learnt
 
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
 
Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.
Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.
Clusternaut: Orchestrating Percona XtraDB Cluster with Kubernetes.
 
Improve search optimization engine with ssr in nextjs
Improve search optimization engine with ssr in nextjsImprove search optimization engine with ssr in nextjs
Improve search optimization engine with ssr in nextjs
 
Types of replication, pooling and ha
Types of replication, pooling and haTypes of replication, pooling and ha
Types of replication, pooling and ha
 
Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut:  Orchestrating  Percona XtraDB Cluster with KubernetesClusternaut:  Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
 
Nginx caching
Nginx cachingNginx caching
Nginx caching
 
Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...
 
WSO2 Advantage Webinar WSO2 BAM2 Integration with mule esb
WSO2 Advantage Webinar  WSO2 BAM2 Integration with mule esbWSO2 Advantage Webinar  WSO2 BAM2 Integration with mule esb
WSO2 Advantage Webinar WSO2 BAM2 Integration with mule esb
 
Architectural patterns for high performance microservices in kubernetes
Architectural patterns for high performance microservices in kubernetesArchitectural patterns for high performance microservices in kubernetes
Architectural patterns for high performance microservices in kubernetes
 
RedisConf18 - The Intelligent Database Proxy
RedisConf18 - The Intelligent Database Proxy  RedisConf18 - The Intelligent Database Proxy
RedisConf18 - The Intelligent Database Proxy
 
The architecture of SkySQL
The architecture of SkySQLThe architecture of SkySQL
The architecture of SkySQL
 
How Orwell built a geo-distributed Bank-as-a-Service with microservices
How Orwell built a geo-distributed Bank-as-a-Service with microservicesHow Orwell built a geo-distributed Bank-as-a-Service with microservices
How Orwell built a geo-distributed Bank-as-a-Service with microservices
 
How Pixid dropped Oracle and went hybrid with MariaDB
How Pixid dropped Oracle and went hybrid with MariaDBHow Pixid dropped Oracle and went hybrid with MariaDB
How Pixid dropped Oracle and went hybrid with MariaDB
 
Mailerqnewpresentation
MailerqnewpresentationMailerqnewpresentation
Mailerqnewpresentation
 
Magento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationMagento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed Optimization
 
RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.
 

Similar to Microservices, Distributed Computing and CAP Theorem

LOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMSLOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMS
tanmayshah95
 
Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...
Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...
Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...
Continuent
 

Similar to Microservices, Distributed Computing and CAP Theorem (20)

Orchestrating Cassandra with Kubernetes Operator and PaaSTA
Orchestrating Cassandra with Kubernetes Operator and PaaSTAOrchestrating Cassandra with Kubernetes Operator and PaaSTA
Orchestrating Cassandra with Kubernetes Operator and PaaSTA
 
Data Patterns
Data PatternsData Patterns
Data Patterns
 
Data management in cloud computing trainee
Data management in cloud computing  traineeData management in cloud computing  trainee
Data management in cloud computing trainee
 
Mma 10g r2_936
Mma 10g r2_936Mma 10g r2_936
Mma 10g r2_936
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Cloud Migration Strategy and Best Practices
Cloud Migration Strategy and Best PracticesCloud Migration Strategy and Best Practices
Cloud Migration Strategy and Best Practices
 
Benefits of an Agile Data Fabric for Business Intelligence
Benefits of an Agile Data Fabric for Business IntelligenceBenefits of an Agile Data Fabric for Business Intelligence
Benefits of an Agile Data Fabric for Business Intelligence
 
NOSQL in the Cloud
NOSQL in the CloudNOSQL in the Cloud
NOSQL in the Cloud
 
Big Data LDN 2018: CHARTING ZERO LATENCY FUTURE WITH REDIS
Big Data LDN 2018: CHARTING ZERO LATENCY FUTURE WITH REDISBig Data LDN 2018: CHARTING ZERO LATENCY FUTURE WITH REDIS
Big Data LDN 2018: CHARTING ZERO LATENCY FUTURE WITH REDIS
 
Scylla Summit 2019 Keynote - Avi Kivity
Scylla Summit 2019 Keynote - Avi KivityScylla Summit 2019 Keynote - Avi Kivity
Scylla Summit 2019 Keynote - Avi Kivity
 
NoSQL Architecture Overview
NoSQL Architecture OverviewNoSQL Architecture Overview
NoSQL Architecture Overview
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
 
How Optimizely (Safely) Maximizes Database Concurrency.pdf
How Optimizely (Safely) Maximizes Database Concurrency.pdfHow Optimizely (Safely) Maximizes Database Concurrency.pdf
How Optimizely (Safely) Maximizes Database Concurrency.pdf
 
LOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMSLOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMS
 
Designing for operability and managability
Designing for operability and managabilityDesigning for operability and managability
Designing for operability and managability
 
Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...
Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...
Picking the Right Clustering for MySQL - Cloud-only Services or Flexible Tung...
 
JavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsJavaScript for Enterprise Applications
JavaScript for Enterprise Applications
 
Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!
 

More from kloia

React Bootcamp Day 2 - Yunus Demirpolat
React Bootcamp Day 2 - Yunus DemirpolatReact Bootcamp Day 2 - Yunus Demirpolat
React Bootcamp Day 2 - Yunus Demirpolat
kloia
 
React Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus DemirpolatReact Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus Demirpolat
kloia
 

More from kloia (20)

re:Invent recap - Application Modernization
re:Invent recap - Application Modernizationre:Invent recap - Application Modernization
re:Invent recap - Application Modernization
 
Isovalent-kloia Cilium Workshop
Isovalent-kloia Cilium WorkshopIsovalent-kloia Cilium Workshop
Isovalent-kloia Cilium Workshop
 
Kloia - Why Microsoft Modernisation Matters
Kloia - Why Microsoft Modernisation MattersKloia - Why Microsoft Modernisation Matters
Kloia - Why Microsoft Modernisation Matters
 
DotNetKonf23 - NET Modernization Problems & Solutions.pdf
DotNetKonf23 - NET Modernization Problems & Solutions.pdfDotNetKonf23 - NET Modernization Problems & Solutions.pdf
DotNetKonf23 - NET Modernization Problems & Solutions.pdf
 
AWS User Group Meetup Feb2023.pptx
AWS User Group Meetup Feb2023.pptxAWS User Group Meetup Feb2023.pptx
AWS User Group Meetup Feb2023.pptx
 
re:Invent Recap
re:Invent Recapre:Invent Recap
re:Invent Recap
 
The New era in QA: k6
The New era in QA: k6The New era in QA: k6
The New era in QA: k6
 
Etkili Blog Yazım Teknikleri - Tuğba Sertkaya
Etkili Blog Yazım Teknikleri - Tuğba SertkayaEtkili Blog Yazım Teknikleri - Tuğba Sertkaya
Etkili Blog Yazım Teknikleri - Tuğba Sertkaya
 
AWS re:Invent 2021 Recap by APN Ambassador
AWS re:Invent 2021 Recap by APN AmbassadorAWS re:Invent 2021 Recap by APN Ambassador
AWS re:Invent 2021 Recap by APN Ambassador
 
Camunda BPM - Said Mengi
Camunda BPM - Said MengiCamunda BPM - Said Mengi
Camunda BPM - Said Mengi
 
AlOps - Yetişkan Eliaçık
AlOps - Yetişkan EliaçıkAlOps - Yetişkan Eliaçık
AlOps - Yetişkan Eliaçık
 
Zaman Yönetimi - Aras Bilgen
Zaman Yönetimi - Aras Bilgen Zaman Yönetimi - Aras Bilgen
Zaman Yönetimi - Aras Bilgen
 
Gravitee API Management - Ahmet AYDIN
 Gravitee API Management  -  Ahmet AYDIN Gravitee API Management  -  Ahmet AYDIN
Gravitee API Management - Ahmet AYDIN
 
React Bootcamp Day 2 - Yunus Demirpolat
React Bootcamp Day 2 - Yunus DemirpolatReact Bootcamp Day 2 - Yunus Demirpolat
React Bootcamp Day 2 - Yunus Demirpolat
 
React Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus DemirpolatReact Bootcamp Day 1 - Yunus Demirpolat
React Bootcamp Day 1 - Yunus Demirpolat
 
Contract testing - Baran Gayretli
Contract testing - Baran Gayretli Contract testing - Baran Gayretli
Contract testing - Baran Gayretli
 
Contract Testing
Contract TestingContract Testing
Contract Testing
 
Using Design Methods to Establish Healthy DevOps Practices - Aras Bilgen
Using Design Methods to Establish Healthy DevOps Practices - Aras BilgenUsing Design Methods to Establish Healthy DevOps Practices - Aras Bilgen
Using Design Methods to Establish Healthy DevOps Practices - Aras Bilgen
 
Kloia Quality Assurance
Kloia Quality AssuranceKloia Quality Assurance
Kloia Quality Assurance
 
DevOps Turkey Test Automation with Docker and Seleniumhub
DevOps Turkey Test Automation with Docker and SeleniumhubDevOps Turkey Test Automation with Docker and Seleniumhub
DevOps Turkey Test Automation with Docker and Seleniumhub
 

Recently uploaded

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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

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
 
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: 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...
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
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
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Microservices, Distributed Computing and CAP Theorem

Editor's Notes

  1. -DENEME1 -DENEME2 -DENEME3 -DENEME4 -DENEME5 -DENEME6 -DENEME7 -DENEME8
  2. -BİLGİSAYAR MÜH -7 YILDIR BİLİŞİM SEKTÖRÜNDE ÇALIŞIYORUM -5 YILDAN BERİ MİKROSERVİS MİMARİLERİ TASARLIYORUM VE AKTİF OLARAK BU MİMARİLERDE ÇALIŞIYORUM -3 YILDAN BERI KLOIA’DA MÜŞTERİLERİMİZE YAZILIM MİMARİLERİ, TEST VE DEVOPS SÜREÇLERİNİN OTOMASYONU KONULARINDA DANIŞMANLIK YAPIYORUM
  3. -MIKROSERVIS SEBEP -SCL- ÖLÇEKLEME -DAĞITIK HESAPLAMA TEMEL - CAP THEOREM -DATA MNG ACRONY / VERİ YNTM KISALTMA -CONSISTENCY / TUTARLILIK -NİHAİ TUTAR
  4. -MICRO->ARKASINDA SEBEP -NEDEN MICROSERVIS -SCALING, ÖLÇEKLEME -KAVRAMLAR,CONCEPT -DİSTRİBUTED THİNKİNG -DAĞITIK GELİŞTİRME
  5. -2001-2011 INTERNET TRAFIK -EXPONANSIYEL LİNEER -ŞU DEMEK OLUYOR -BUGUN YÜKÜ TRAFİĞİ KALDIRIYOR -SENEYE BELKİ KALDIRAMAYACAK -HATTA 1 GÜN SONRA?
  6. -GOOGLE TRENDS -GRAFİK BİZE NE SÖYLÜYOR? -MİKRO TRENDİ TRAFİK İLE + CORR -ARADA Bİ FAZ FARKI VAR - TRAFİK SORUNU Bİ VİDEO ÖRN
  7. BALIKLARIN ARTIŞ HIZI EXPONANTIEL BALIKÇILARIMIZ FAİL EDİYOR
  8. -PEKİ BİZİM BU UYGULAMAMIZ →NASIL TRAFİĞİ & YÜKÜ KALDIRACAK? →EĞER MAKİNALARLA ÇALIŞMASAYDIK →MOTİVASYON İLE HALLEDEBİLİRDİK →BAMBAM →AMA MÜHENDİSİZ →BU YÜZDEN VARIZ →MÜKEMMEL DEĞİL HERŞEY
  9. -APPLICATION LOGIC APPTA -TÜM DATA DB’de - YEKPARE
  10. →ÖRN TOMCATTE KOŞAN UYGULAM →ARKADA MYSQL →BASİT BİR WEB APP →DEVELOP+TEST+DEBUG+YEDEK ***APPLICATION COMPLEXITY *** HANDLING LOAD
  11. PEKİ BİZİM BU UYGULAMAMIZ →NASIL TRAFİĞİ & YÜKÜ KALDIRACAK? PEKİ NE YAPIYORUZ? →UYGULAMALARIMIZI SCALE EDİYORUZ →SCALING DE DİKEY VE YATAY OLARAK 2
  12. →VAR OLAN SİSTEM/UYG EXTRA KAYNAK →CPU MEMORY →BİZE SAĞLADIĞI →DEZAVANTAJI NEDİR? →COST INEFECTIVE →RİSKLİ →SINGLE POINT OF FAİLURE
  13. STND KAPST YENİ SİST/UYG EK UPGRADE YERİNE YENİ SİSTEM DATA CENTER’ İHTİYAC YOK CLOUD BETTER FOR ENTERPRİSE
  14. PEKİ HANGİSİNİ TERCİH ETMELİYİZ?? →HORIZONTAL SCALING DAHA COST EFECTIVE →SON YILLARDAKİ CLOUD TRENDİ ile beraber → NO COST FOR DATA CENTERS etc.
  15. OK ÇOK GÜZEL →HORIZONTAL AMA NASIL? BİRAZ HORİZONTAL SCALING METODOLOJİLERİNİ ÜZERİNE ÇALIŞMAMIZ LAZIM
  16. -MİCHAEL FİSHER → THE ART OF SCALABİLİTY -3 BOYUTLU BİR SCALABİLİTY MODEL -MODELİMİZİN ADI SCALE CUBE -YATAY SCALE TEKN TEMSİL EDİYOR -3D UZAYDAKİ X,Y,Z EKSEN BENZETİYOR -ORİJİN NOKTASI → MONOLITH SAĞ ÜST KÖŞE → MAKSIMUM SCALE -→SO → x,y,z tek başına değil →HEPSİ BİR ARADA DA OLABİLİR
  17. →YATAY KLONLAMA + LB ARKSINDA N TANE KLONLA + HER BİR KLON 1/N LOAD + EN YAYGINI BU, BASİT AMA - BÜTÜN KLONLAR AYNI DB ERİŞ - HALA KOMPLEX MONOLITH UYG
  18. + X YERINE→ANLAMSAL&FONK DEĞER + HER SERVİS BİR GÖREV ÜSTLEN + PARÇALAMA→NOUNve VERB + POLYGLOT PER → ÇOK DİLLİ + BEST PRACTİCE ENTİTY CAPABİL MULTI RESOURCE DATA MGMT NETWORKING
  19. + X YERINE→ANLAMSAL&FONK DEĞER + HER SERVİS BİR GÖREV ÜSTLEN + PARÇALAMA→NOUNve VERB + POLYGLOT PER → ÇOK DİLLİ + BEST PRACTİCE ENTİTY CAPABİL MULTI RESOURCE DATA MGMT NETWORKING
  20. + X YERINE→ANLAMSAL&FONK DEĞER + HER SERVİS BİR GÖREV ÜSTLEN + PARÇALAMA→NOUNve VERB + POLYGLOT PER → ÇOK DİLLİ + BEST PRACTİCE ENTİTY CAPABİL MULTI RESOURCE DATA MGMT NETWORKING
  21. + X GİBİ →AYNI UYG KLONLUYOR + HER KLON → FARKLI DATA ALTKÜME + SHARDED DATABASES + ROUTING KRİTERLERİ (van) + FARKLI UYG. AYNI DATA ERŞ. YOK YİNE HİGH APP COMPLEX DB PARTITIONING SCHEMA LAZIM
  22. SCALE CUBE DE DE GÖRDÜ GİBİ →SADECETEK YÖN ZORUNLU DEİL →ÖRNEĞİN BURDA MİKROSERVİS →VE HER BİR SERVİS X AXİS SCALING
  23. HANGİ METODU KULLANIRSAK KULL İHTİYACIMIZ NETWORK ÜZERİNDE PAYLAŞILAN RESOURCE NETWORK PROGRAMLAMA THAT REQUIRES DISTRIBUTED COMPUTING
  24. HANGİ METODU KULLANIRSAK KULL İHTİYACIMIZ NETWORK ÜZERİNDE PAYLAŞILAN RESOURCE NETWORK PROGRAMLAMA THAT REQUIRES DISTRIBUTED COMPUTING
  25. DİSTRİBUTED PROGRAMLAMA →DÜŞÜNMEMİZ GEREKEN →TEMEL ÖZELLİKLER →SORUN YARATABİLECEK TEHLİKE/TUZAK NOKTALARI →kavramlar
  26. CONSİSTENCY →TUTARLILIK → TEK BİR KOPYA GİBİ GÖZÜKMESİ →HER KOPYADA AYNI DURUMDA OLMA TEML ÖZELK→BİR ENTITY için HER ZMN EN GÜNCEL DEĞERİ OKU CART→GÜNCEL, Önceki TÜM EKLEDİK STOK→STOK İLE 2 KİŞİ İŞLEM YAPIYORS DEĞİŞTİĞİNDE→DİĞERİ DE İŞLEM CONSISTENCY → HEP İSTERİZ ?????
  27. İSMİNDEN DE ANLAŞILDIĞI ÜZERE SİSTEMİMİZİN HER ZAMAN MEVCUDİYET/MÜSAİT/HAZIR →Yazmak istiyorsam yazmalıyım →Okumak istiyorsam okumalıyım →Sistemim HİÇ → System Unavailable CART→önceki ekledikle olsada olmasada STOK→Eksik de olsa fazla da olsa AVALABILITY OLMALI MI??
  28. SPLİT BRAİN KORPUS KALLOSUM BEYNİN 2LOB ARSIN NETWORK MADDE KORPUS KALLOSUM’un kopması PARTİTİON ORACLE PARTITION SINCE DISTR→Som tims Seperated Any Network Breaking might cause Components cant talk Hayati işlemlerine devam edebilmesi Fault tolerance → hataya dayanıklılık, doğru senaryo, uç senaryo FAULT TOLERANCE INEVITABLE
  29. TEMEL ÖZELLİKLERDEN HEPSİ GÜZEL HEPSİNİ İSTİYORUZ SİSTEMİMİZDEAMA İMKANSIZ ERİC BREWER’a göre Distributed bir sistemde aynı anda →Hem Consistency … →SAĞLANAMAZ → NOSQL veritabanları da burdan başlıyor
  30. →CAP ÜÇGENE BENZETİRSEK →DİSTRİBUTED MAX. 1 KENARDA OLA →MERKEZDE OLAMAZ →Her Bir KENARI İNCELEYELİM ** SCALING→ P SEÇENEK DEİL, İHTİYAÇ ** ASLINDA SEÇİM C ve A arasında ** Ve genelde A > C
  31. -FARKLI FARKLI RESOURCELAR ARASINDA -DATA YÖNETİMİ İÇİN 2PC BİLEN ??? -Prepare Phase, Commit Phase -En bilinen örnekler ACID COMPLIANT -RDBMS, OtherSingle Site DB’s
  32. →CP→STRONG CONS W P →TAMAMEN UNAVAİLBALE DEĞİL →P OLDUĞUNDA C İÇİN UNAVAİLABLE →GENELDE PESİMİLOCK BİLEN ???? →CRİTİCAL SECTİON VS. →ÇOK COLLİSİON BEKLERSEK İYİ
  33. →HEP İNCONSİSTENT DEĞİL → HATALAR DÜZELTİLİR AMA ZAMAN/KAÇAN GERİ GELMEZ →OPTİMİSTİC LOCK ?? ATOMİC CAS READ EDRKN GET VERSİON, TİME, HASH YAZARKEN KARŞILAŞTIR →LESS COLLUSIONS(less write more read) → CACHE, HAZELCAST, SPLİT BRAİN
  34. -ÇEŞİTLİ NOSQL DB’LERİN CAP ÜÇGENİNDE NEREYE TEKABÜL ETTİĞİ DATA MGMT AKRONİM ÖNCESİ -SİSTEMİN HER PARÇASI AYNI METODU ZORUNDA DEĞİL -ÖRN. FİNANSAL İŞLEMLERDE, TUTARLILIK ÖNEMLİ FAVOR CP -ÖRN. ALIŞVERİŞ UYGULAMAMDA ÜRÜN SAYFASI, FAVOR AP -İKİSİ DE ÖNEMLİ AMA SCALİNG ÖNEMLİ DEĞİL, FAVOR CA
  35. MULTI RESOURCE DATA YÖNETEN SİST ÖZELLİKLERİNİ BELİRETN KISALTMALAR →Eskiden sadece ACID vardı →CAP Theorem ve Dists System Yayg →DİSTRİBUTED ACID imkansız olunca →BASE ortaya atıldı →BASE gerekli oldu özellikle NOSQL
  36. A→TRANSACTION/İŞLEM SİLSİLESİ, ya hep ya hiç C→** CAP→HER KOPYADA AYNI DEĞER, TEKMİŞ GİBİ DAVRAN ** TUTARSIZLIK OLMAMASI. ÖRN. USER.AGE NEGATIVE I→Transactionlar’ın birbiri ile çakışmaması Aynı entityde 1den fazla trans yok D→txn bittiğinde, hatırlanma, persistence ELEKTRİK FİŞİ
  37. ACID Alternatifi BA→OLABİLDİĞİNCE MEVCUT/AVAILABLE olacak ** Bazen unavailable olabilir S→Eventual C. Dolayı Sistemin State’i Dışarıdan yeni input olmadan da değş EC→Yeni bir update gelmezse bir dataya Nihai olarak o data consistent bir state
  38. →BEFORE EVENTUAL EXAMPLE STRONG→CURRENT ONE ** TWITTER every F5 → previously added WEAK→ NOT ALWAYS but EVENTUAL CONSIS→Special form ** TWIT BOMBARDIMANI OLMADIĞI SÜRECE ** GUARANTEED ** STOP UPDATE → Consistent
  39. ŞİMDİYE KADAR SCALING BASICS DISTRIBUTED SYS PITFALLS CAP THEOREM ACID BASE MICROSERVIS YONETMEK BIRBIRI ILETISIM
  40. ŞİMDİYE KADAR SCALING BASICS DISTRIBUTED SYS PITFALLS CAP THEOREM ACID BASE MICROSERVIS YONETMEK BIRBIRI ILETISIM