Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

From a monolithic Ruby on Rails app to the JVM

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 75 Anzeige
Anzeige

Weitere Verwandte Inhalte

Andere mochten auch (20)

Ähnlich wie From a monolithic Ruby on Rails app to the JVM (20)

Anzeige

Weitere von Phil Calçado (20)

Aktuellste (20)

Anzeige

From a monolithic Ruby on Rails app to the JVM

  1. Sunday, March 10, 13
  2. From a monolithic Ruby on Rails app to the JVM phil calçado @pcalcado http://philcalcado.com JDC2013 - Cairo Sunday, March 10, 13
  3. 2011: Phil decides to move to Berlin Sunday, March 10, 13
  4. Sunday, March 10, 13
  5. Sunday, March 10, 13
  6. Sunday, March 10, 13
  7. Sunday, March 10, 13
  8. Growing a product is awesome Sunday, March 10, 13
  9. http://bit.ly/building-the-next-soundcloud Sunday, March 10, 13
  10. Sunday, March 10, 13
  11. Sunday, March 10, 13
  12. > 10 hours of audio uploaded every minute ~ 180 million users / month Sunday, March 10, 13
  13. But scaling is hard. Sunday, March 10, 13
  14. SoundCloud was born on Rails It allowed us to iterate real fast and keep code quality up(-ish). Sunday, March 10, 13
  15. Rails is simple. Controller ActiveRecord Model Database Sunday, March 10, 13
  16. Rails is simple. Controller ActiveRecord Model Database If you want to write a toy blog engine. Sunday, March 10, 13
  17. In the real world, it gets messy. Controller ActiveRecord Model Database Sunday, March 10, 13
  18. In the real world, it gets messy. thin yajl Controller amqp EventMachine haml sc-caching ActiveRecord DelayedJobs Model mysql master/ sc-logging slave adapter Database Memcached lhm nokogiri statsy new relic Real messy. Sunday, March 10, 13
  19. Scaling Rails is hard(er). Sunday, March 10, 13
  20. No concurrency? 1) Spawn A LOT of processes. Sunday, March 10, 13
  21. No concurrency? 1) Spawn A LOT of processes. 2) Make everything a background job Sunday, March 10, 13
  22. No Virtual Machine? Adapt your deployment to > 1 minute application bootstrap time Sunday, March 10, 13
  23. No proper Garbage Collection? Get used to restarting processes. Frequently. Sunday, March 10, 13
  24. Scaling Rails development is hard. Sunday, March 10, 13
  25. Idiomatic in Rails: Sunday, March 10, 13
  26. Idiomatic in Rails: Just like Java circa 2004 Sunday, March 10, 13
  27. Understanding the Rails mindset: http://bit.ly/not-a-virtue Sunday, March 10, 13
  28. Understanding the Rails mindset: i do not think it means what you think it means http://bit.ly/not-a-virtue Sunday, March 10, 13
  29. If you are injecting aggregation or composition you are Doing it Wrong(tm) Sunday, March 10, 13
  30. Idiomatic in Rails: Sunday, March 10, 13
  31. Understanding the Rails mindset: http://bit.ly/trashable Sunday, March 10, 13
  32. Understanding the Rails mindset: Just like aop, but even worse http://bit.ly/trashable Sunday, March 10, 13
  33. Idiomatic in Rails: Sunday, March 10, 13
  34. Idiomatic in Rails: no real complexity or loC reduction Sunday, March 10, 13
  35. Rails is simple. Controller ActiveRecord Model Database If you want to write a toy blog engine. Sunday, March 10, 13
  36. Effectively, controllers have a lot of logic Controller ActiveRecord Model Database Sunday, March 10, 13
  37. Effectively, controllers have a lot of logic Controller ActiveRecord Model Database But so do models! Sunday, March 10, 13
  38. Where do we go from here? Sunday, March 10, 13
  39. We will not do Java. Sunday, March 10, 13
  40. We, the Java community, screwed up Focused on the “Enterprise” while nimbler companies took over Sunday, March 10, 13
  41. We, the Java community, screwed up Tried to solve core problems with more complicated tooling Sunday, March 10, 13
  42. We, the Java community, screwed up JSF, Portlets, JavaFx, Oracle vs. Android: the joke is on us Sunday, March 10, 13
  43. But we will do the JVM. Sunday, March 10, 13
  44. Who cares about Oracle/JCP? So many modern languages. None are “official”. Sunday, March 10, 13
  45. Who cares about Oracle/JCP? It is crazy to use “Enterprise” middleware at scale. Sunday, March 10, 13
  46. Who cares about Oracle/JCP? twitter, Tumblr, Foursquare, Netflix, Facebook, typesafe, etc. are the new powerhouses. Sunday, March 10, 13
  47. Options: 1) Non-Rails Ruby 2) Scala 4) Clojure Sunday, March 10, 13
  48. Non-Rails Ruby + Simple + Easy to hire engineers + Lingua-franca inside SC - Most code not thread-safe - Lots of native code - Rails mindset everywhere Sunday, March 10, 13
  49. Scala + “twitter stack” (Finagle, docs) + Good Java interop + Static typing + Good engineering practices starting to emerge - Binary compatibility - Can get complicated Sunday, March 10, 13
  50. Clojure + Easier to get started with + Favours smaller apps + Good Java interop - Very early days for engineering good practices - 3rd party libs a bit off in quality Sunday, March 10, 13
  51. Integrating Clojure with Jetty Sunday, March 10, 13
  52. Async I/O with Scala/Finagle Sunday, March 10, 13
  53. Let’s try them all. Sunday, March 10, 13
  54. Enabling Sunday, March 10, 13
  55. 1) Micro-services - A couple of thousand LOC - Once you grasp the domain, can be rewritten in ~1 week - Reduces risk in trying new things Sunday, March 10, 13
  56. internet Legacy Application (Rails) Database Sunday, March 10, 13
  57. Sounds Users Stats Stream Notifications Settings Recommender Messaging Sunday, March 10, 13
  58. Sounds Users Stats Stream DB DB DB DB Notifications Settings Recommender Messaging DB DB DB DB Sunday, March 10, 13
  59. internet API Sounds Users Stats Stream Notifications Settings Recommender Messaging Sunday, March 10, 13
  60. 2) Easy to deploy - Old Rails system has fully automated deployment - From change to production should take minutes - Integrated to CI - Reverting is easy Sunday, March 10, 13
  61. Sunday, March 10, 13
  62. Sunday, March 10, 13
  63. Sunday, March 10, 13
  64. Sunday, March 10, 13
  65. Current status - ~6 new or extracted systems - 3 Clojure - 1 Scala - 2 JRuby Sunday, March 10, 13
  66. Current status Rule of thumb: 1 JVM = 10 thins Sunday, March 10, 13
  67. main takeaways Sunday, March 10, 13
  68. Rails, PHP, etc. are a very good choice to start something Sunday, March 10, 13
  69. You need to know when to migrate away Sunday, March 10, 13
  70. Build infrastructure to reduce the risk of trying new things Sunday, March 10, 13
  71. The JVM is still the best multi-language VM out there Sunday, March 10, 13
  72. There is a lot of JVM-related stuff happening outside the official channels Sunday, March 10, 13
  73. Even if you are doing Java, drop the extra weight Sunday, March 10, 13
  74. Java is the new C Sunday, March 10, 13
  75. phil calçado http://philcalcado.com @pcalcado www.soundcloud.com Sunday, March 10, 13

×