Successfully reported this slideshow.

What Every Programmer Should Know About Distributed Systems

1

Share

Upcoming SlideShare
Why Django
Why Django
Loading in …3
×
1 of 34
1 of 34

What Every Programmer Should Know About Distributed Systems

1

Share

Download to read offline

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.

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.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

What Every Programmer Should Know About Distributed Systems

  1. 1. What Every Programmer Should Know About Distributed Systems Friday, November 11, 11
  2. 2. What Every Programmer Could Possibly Want To Know About Me Friday, 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 Systems Friday, November 11, 11
  8. 8. I Definition Friday, 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 Gibson Friday, 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" end Friday, 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 between Friday, November 11, 11
  14. 14. Units & OO • Methods • Classes • Packages Friday, 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.java Friday, November 11, 11
  17. 17. Units & Languages • Ruby • Java • PHP Friday, November 11, 11
  18. 18. Units & Architecture • Applications Friday, November 11, 11
  19. 19. III The Evolution of Óbidos From Google Maps Friday, November 11, 11
  20. 20. Friday, November 11, 11
  21. 21. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  22. 22. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  23. 23. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  24. 24. Heroku • Instance management • Billing & invoices • Process orchestration • Public API Friday, November 11, 11
  25. 25. IV Developing the Medium Friday, November 11, 11
  26. 26. Problem: ? Friday, November 11, 11
  27. 27. Share the Database Friday, November 11, 11
  28. 28. OT O NShare the Database D Friday, November 11, 11
  29. 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. 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. 31. V Challenges Friday, November 11, 11
  32. 32. Challenges • Versioning • Testing • Authentication • Development environment • Visual consistency • Deploying Friday, November 11, 11
  33. 33. Summary 1. Definition 2. Code Granularity 3. The Evolution of Óbidos 4. Developing the Medium 5. Challenges Friday, November 11, 11
  34. 34. Thank you! pedro@heroku.com http://pedro.heroku.com @ped Friday, November 11, 11

×