What Every                          Programmer Should                             Know About                          Dist...
What Every                    Programmer Could                  Possibly Want To Know                         About MeFrid...
Friday, November 11, 11
Friday, November 11, 11
Friday, November 11, 11
Friday, November 11, 11
What Every                          Programmer Should                             Know About                          Dist...
I                          DefinitionFriday, November 11, 11
A distributed system               consists of multiple               autonomous applications               that interact ...
II                          Code Granularity                                             Photo by Matt GibsonFriday, Novem...
print "Converting Celsius or Fahrenheit? "                          option = gets[0,1].downcase                          c...
def main                            convert(pick_unit)                          end                          def pick_unit...
Ideal Granularity                             Somewhere in betweenFriday, November 11, 11
Units & OO                    • Methods                    • Classes                    • PackagesFriday, November 11, 11
Units & Languages                    •     Ruby        # sinatra.rb                                      module Sinatra   ...
Units & Languages                    • Ruby                    • Java                    • PHP $ javac Sinatra.java       ...
Units & Languages                    • Ruby                    • Java                    • PHPFriday, November 11, 11
Units & Architecture                    • ApplicationsFriday, November 11, 11
III                          The Evolution of Óbidos                                                    From Google MapsFr...
Friday, November 11, 11
Heroku                    • Instance management                    • Billing & invoices                    • Process orche...
Heroku                    • Instance management                    • Billing & invoices                    • Process orche...
Heroku                    • Instance management                    • Billing & invoices                    • Process orche...
Heroku                    • Instance management                    • Billing & invoices                    • Process orche...
IV                          Developing the MediumFriday, November 11, 11
Problem:                             ?Friday, November 11, 11
Share the DatabaseFriday, November 11, 11
OT O NShare the DatabaseDFriday, November 11, 11
REST     RestClient.get "host/users/1"    get "/users/:id" do |id|                                        user = User.find...
MQ  AMQP.start(:host => "1.2.3.4") do           AMQP.start(:host => "1.2.3.4") do    q = MQ.new.queue("user.created")     ...
V                          ChallengesFriday, November 11, 11
Challenges                    • Versioning                    • Testing                    • Authentication               ...
Summary                    1. Definition                    2. Code Granularity                    3. The Evolution of Óbid...
Thank you!                           pedro@heroku.com                          http://pedro.heroku.com                    ...
Upcoming SlideShare
Loading in …5
×

What Every Programmer Should Know About Distributed Systems

2,351 views

Published on

It's time to talk about distributed systems: what are they, why you should be writing one, and what to look for while doing so.

We'll cover the basics, understand some of the technology behind it - like REST, MQ with AMQP, ZeroMQ, etc - and discuss things we're doing at Heroku to avoid the pitfalls of a distributed architecture.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,351
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

What Every Programmer Should Know About Distributed Systems

  1. 1. What Every Programmer Should Know About Distributed SystemsFriday, November 11, 11
  2. 2. What Every Programmer Could Possibly Want To Know About MeFriday, November 11, 11
  3. 3. Friday, November 11, 11
  4. 4. Friday, November 11, 11
  5. 5. Friday, November 11, 11
  6. 6. Friday, November 11, 11
  7. 7. What Every Programmer Should Know About Distributed SystemsFriday, November 11, 11
  8. 8. I DefinitionFriday, November 11, 11
  9. 9. A distributed system consists of multiple autonomous applications that interact with each other to achieve a common goal.Friday, November 11, 11
  10. 10. II Code Granularity Photo by Matt GibsonFriday, November 11, 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" endFriday, November 11, 11
  12. 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. 13. Ideal Granularity Somewhere in betweenFriday, November 11, 11
  14. 14. Units & OO • Methods • Classes • PackagesFriday, November 11, 11
  15. 15. Units & Languages • Ruby # sinatra.rb module Sinatra • Java class Application ... • PHP class Event ... module Streaming class FileStreamer ...Friday, November 11, 11
  16. 16. Units & Languages • Ruby • Java • PHP $ javac Sinatra.java sinatra.java:5: class Application is public, should be declared in a file named Application.javaFriday, November 11, 11
  17. 17. Units & Languages • Ruby • Java • PHPFriday, November 11, 11
  18. 18. Units & Architecture • ApplicationsFriday, November 11, 11
  19. 19. III The Evolution of Óbidos From Google MapsFriday, November 11, 11
  20. 20. Friday, November 11, 11
  21. 21. Heroku • Instance management • Billing & invoices • Process orchestration • Public APIFriday, November 11, 11
  22. 22. Heroku • Instance management • Billing & invoices • Process orchestration • Public APIFriday, November 11, 11
  23. 23. Heroku • Instance management • Billing & invoices • Process orchestration • Public APIFriday, November 11, 11
  24. 24. Heroku • Instance management • Billing & invoices • Process orchestration • Public APIFriday, November 11, 11
  25. 25. IV Developing the MediumFriday, November 11, 11
  26. 26. Problem: ?Friday, November 11, 11
  27. 27. Share the DatabaseFriday, November 11, 11
  28. 28. OT O NShare the DatabaseDFriday, November 11, 11
  29. 29. REST RestClient.get "host/users/1" get "/users/:id" do |id| user = User.find(id) user.to_json endFriday, November 11, 11
  30. 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 endFriday, November 11, 11
  31. 31. V ChallengesFriday, November 11, 11
  32. 32. Challenges • Versioning • Testing • Authentication • Development environment • Visual consistency • DeployingFriday, November 11, 11
  33. 33. Summary 1. Definition 2. Code Granularity 3. The Evolution of Óbidos 4. Developing the Medium 5. ChallengesFriday, November 11, 11
  34. 34. Thank you! pedro@heroku.com http://pedro.heroku.com @pedFriday, November 11, 11

×