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
 
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
 

Último (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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...
 
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...
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

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