SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
What Every
                          Programmer Should
                             Know About
                          Distributed Systems

Friday, November 11, 11
What Every
                    Programmer Could
                  Possibly Want To Know
                         About Me

Friday, November 11, 11
Friday, November 11, 11
Friday, November 11, 11
Friday, November 11, 11
Friday, November 11, 11
What Every
                          Programmer Should
                             Know About
                          Distributed Systems

Friday, November 11, 11
I
                          Definition




Friday, November 11, 11
A distributed system
               consists of multiple
               autonomous applications
               that interact with each other to
               achieve a common goal.


Friday, November 11, 11
II
                          Code Granularity




                                             Photo by Matt Gibson

Friday, November 11, 11
print "Converting Celsius or Fahrenheit? "
                          option = gets[0,1].downcase
                          case option
                          when "c"
                            print "Convert C: "
                            celsius = gets.to_i
                            fahrenheit = celsius * 9/5 + 32
                            puts "#{celsius}C = #{fahrenheit}F"
                          when "f"
                            print "Convert F: "
                            fahrenheit = gets.to_i
                            celsius = (fahrenheit - 32) * 5/9
                            puts "#{fahrenheit}F = #{celsius}C"
                          end




Friday, November 11, 11
def main
                            convert(pick_unit)
                          end

                          def pick_unit
                            print "Convert Celsius ou Fahrenheit? "
                            gets[0,1].downcase
                          end

                          def convert(unit)
                            case unit
                                when "c": convert_celsius
                                when "f": convert_fahrenheit
                            end
                          end


                          ...


Friday, November 11, 11
Ideal Granularity


                             Somewhere in between




Friday, November 11, 11
Units & OO

                    • Methods
                    • Classes
                    • Packages


Friday, November 11, 11
Units & Languages

                    •     Ruby        # sinatra.rb
                                      module Sinatra
                    • Java              class Application
                                          ...

                    • PHP               class Event
                                          ...
                                        module Streaming
                                          class FileStreamer
                                            ...




Friday, November 11, 11
Units & Languages

                    • Ruby
                    • Java
                    • PHP $ javac Sinatra.java
                          sinatra.java:5: class Application is public, should be
                          declared in a file named Application.java




Friday, November 11, 11
Units & Languages

                    • Ruby
                    • Java
                    • PHP


Friday, November 11, 11
Units & Architecture


                    • Applications



Friday, November 11, 11
III
                          The Evolution of Óbidos




                                                    From Google Maps

Friday, November 11, 11
Friday, November 11, 11
Heroku

                    • Instance management
                    • Billing & invoices
                    • Process orchestration
                    • Public API

Friday, November 11, 11
Heroku

                    • Instance management

                    • Billing & invoices
                    • Process orchestration
                    • Public API

Friday, November 11, 11
Heroku
                    • Instance management

                    • Billing & invoices

                    • Process orchestration
                    • Public API
Friday, November 11, 11
Heroku
                    • Instance management

                    • Billing & invoices

                    • Process orchestration

                    • Public API
Friday, November 11, 11
IV
                          Developing the Medium




Friday, November 11, 11
Problem:

                             ?




Friday, November 11, 11
Share the Database




Friday, November 11, 11
OT
 O NShare the Database
D




Friday, November 11, 11
REST



     RestClient.get "host/users/1"    get "/users/:id" do |id|
                                        user = User.find(id)
                                        user.to_json
                                      end




Friday, November 11, 11
MQ




  AMQP.start(:host => "1.2.3.4") do           AMQP.start(:host => "1.2.3.4") do
    q = MQ.new.queue("user.created")            q = MQ.new.queue("user.created")
    q.publish(:email => "pedro@heroku.com")     q.subscribe do |msg|
  end                                             ...
                                                end
                                              end


Friday, November 11, 11
V
                          Challenges




Friday, November 11, 11
Challenges
                    • Versioning
                    • Testing
                    • Authentication
                    • Development environment
                    • Visual consistency
                    • Deploying
Friday, November 11, 11
Summary
                    1. Definition
                    2. Code Granularity
                    3. The Evolution of Óbidos
                    4. Developing the Medium
                    5. Challenges



Friday, November 11, 11
Thank you!
                           pedro@heroku.com


                          http://pedro.heroku.com


                                  @ped



Friday, November 11, 11

Mais conteúdo relacionado

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
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)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Destaque

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

What Every Programmer Should Know About Distributed Systems

  • 1. What Every Programmer Should Know About Distributed Systems Friday, November 11, 11
  • 2. What Every Programmer Could Possibly Want To Know About Me Friday, November 11, 11
  • 7. What Every Programmer Should Know About Distributed Systems Friday, November 11, 11
  • 8. I Definition Friday, November 11, 11
  • 9. A distributed system consists of multiple autonomous applications that interact with each other to achieve a common goal. Friday, November 11, 11
  • 10. II Code Granularity Photo by Matt Gibson Friday, November 11, 11
  • 11. print "Converting Celsius or Fahrenheit? " option = gets[0,1].downcase case option when "c" print "Convert C: " celsius = gets.to_i fahrenheit = celsius * 9/5 + 32 puts "#{celsius}C = #{fahrenheit}F" when "f" print "Convert F: " fahrenheit = gets.to_i celsius = (fahrenheit - 32) * 5/9 puts "#{fahrenheit}F = #{celsius}C" end Friday, November 11, 11
  • 12. def main convert(pick_unit) end def pick_unit print "Convert Celsius ou Fahrenheit? " gets[0,1].downcase end def convert(unit) case unit when "c": convert_celsius when "f": convert_fahrenheit end end ... Friday, November 11, 11
  • 13. Ideal Granularity Somewhere in between Friday, November 11, 11
  • 14. Units & OO • Methods • Classes • Packages Friday, November 11, 11
  • 15. Units & Languages • Ruby # sinatra.rb module Sinatra • Java class Application ... • PHP class Event ... module Streaming class FileStreamer ... Friday, November 11, 11
  • 16. Units & Languages • Ruby • Java • PHP $ javac Sinatra.java sinatra.java:5: class Application is public, should be declared in a file named Application.java Friday, November 11, 11
  • 17. Units & Languages • Ruby • Java • PHP Friday, November 11, 11
  • 18. Units & Architecture • Applications Friday, November 11, 11
  • 19. III The Evolution of Óbidos From Google Maps Friday, November 11, 11
  • 21. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  • 22. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  • 23. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  • 24. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  • 25. IV Developing the Medium Friday, November 11, 11
  • 26. Problem: ? Friday, November 11, 11
  • 27. Share the Database Friday, November 11, 11
  • 28. OT O NShare the Database D Friday, November 11, 11
  • 29. REST RestClient.get "host/users/1" get "/users/:id" do |id| user = User.find(id) user.to_json end Friday, November 11, 11
  • 30. MQ AMQP.start(:host => "1.2.3.4") do AMQP.start(:host => "1.2.3.4") do q = MQ.new.queue("user.created") q = MQ.new.queue("user.created") q.publish(:email => "pedro@heroku.com") q.subscribe do |msg| end ... end end Friday, November 11, 11
  • 31. V Challenges Friday, November 11, 11
  • 32. Challenges • Versioning • Testing • Authentication • Development environment • Visual consistency • Deploying Friday, November 11, 11
  • 33. Summary 1. Definition 2. Code Granularity 3. The Evolution of Óbidos 4. Developing the Medium 5. Challenges Friday, November 11, 11
  • 34. Thank you! pedro@heroku.com http://pedro.heroku.com @ped Friday, November 11, 11