From a monolithic  Ruby on Rails app  to the JVM
Upcoming SlideShare
Loading in...5
×
 

From a monolithic Ruby on Rails app to the JVM

on

  • 32,618 vues

 

Statistiques

Vues

Total des vues
32,618
Vues sur SlideShare
30,877
Vues externes
1,741

Actions

J'aime
102
Téléchargements
137
Commentaires
3

24 Ajouts 1,741

https://twitter.com 1626
http://69.167.191.91 56
http://test.absolvent.pl 11
http://tweetedtimes.com 5
https://sendtoinc.com 5
http://stypendiumzwyboru.absolvent.pl 4
https://podio.com 4
http://ntce26.blogspot.com.ar 3
http://www.twylah.com 3
http://instacurate.com 3
https://www.xing.com 3
http://localhost.twitter.com 2
http://www.crowdlens.com 2
http://www.facebook.com 2
http://page140.com 2
http://www.onlydoo.com 2
https://constantine-beta.rebelmouse.com 1
http://b.hatena.ne.jp 1
http://www.instacurate.com 1
http://moderation.local 1
http://wf312.apps12.cms-webforge.ch 1
http://fr.slideshare.net 1
http://comtel.in 1
http://www.pinterest.com 1
Plus...

Accessibilité

Catégories

Détails de l'import

Uploaded via as Adobe PDF

Droits d'utilisation

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Signalé comme inapproprié Signaler comme inapproprié
Signaler comme inapproprié

Indiquez la raison pour laquelle vous avez signalé cette présentation comme n'étant pas appropriée.

Annuler
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Votre message apparaîtra ici
    Processing...
  • Olivier: Our micro service platform is built on Scala/Finagle. All new client services are written in Scala. There's a plethora of other languages being used in the backend though (Haskell, Clojure, Go, ...).
    Are you sure you want to
    Votre message apparaîtra ici
    Processing...
  • To me, you had the correct analysis, but made a new error while implementing the solution. You should have call this rather : from monolithic app to a modular api driven app - monolithic apps are good for toy blogs.

    Your problem was that your codebase grew out of control. You choose the proper solution to this : slicing the app into several specialized apps communicating through api.

    But instead of just doing that, you decide that all those apps will be written in different languages. That can't be good, on the long run, and it would have been good enough if you splitted your rails app (or even rewritten it in an with an other framework, or even an other language, provided it's the same everywhere).

    Now, each app will grow their own way, and you will hire new developers for this or that language. At some point, a developer from an app won't be able to participate in an other, and you will have endless exchanges of formalized spec documents, without anyone understanding what they others do.
    Are you sure you want to
    Votre message apparaîtra ici
    Processing...
  • whitney houston
    Are you sure you want to
    Votre message apparaîtra ici
    Processing...
Poster un commentaire
Modifier votre commentaire

From a monolithic  Ruby on Rails app  to the JVM From a monolithic Ruby on Rails app to the JVM Presentation Transcript

  • Sunday, March 10, 13
  • From a monolithic Ruby on Rails app to the JVM phil calçado @pcalcado http://philcalcado.com JDC2013 - CairoSunday, March 10, 13
  • 2011: Phil decides to move to BerlinSunday, March 10, 13
  • Sunday, March 10, 13
  • Sunday, March 10, 13
  • Sunday, March 10, 13
  • Sunday, March 10, 13
  • Growing a product is awesomeSunday, March 10, 13
  • http://bit.ly/building-the-next-soundcloudSunday, March 10, 13
  • Sunday, March 10, 13
  • Sunday, March 10, 13
  • > 10 hours of audio uploaded every minute ~ 180 million users / monthSunday, March 10, 13
  • But scaling is hard.Sunday, March 10, 13
  • SoundCloud was born on Rails It allowed us to iterate real fast and keep code quality up(-ish).Sunday, March 10, 13
  • Rails is simple. Controller ActiveRecord Model DatabaseSunday, March 10, 13
  • Rails is simple. Controller ActiveRecord Model Database If you want to write a toy blog engine.Sunday, March 10, 13
  • In the real world, it gets messy. Controller ActiveRecord Model DatabaseSunday, March 10, 13
  • 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
  • Scaling Rails is hard(er).Sunday, March 10, 13
  • No concurrency? 1) Spawn A LOT of processes.Sunday, March 10, 13
  • No concurrency? 1) Spawn A LOT of processes. 2) Make everything a background jobSunday, March 10, 13
  • No Virtual Machine? Adapt your deployment to > 1 minute application bootstrap timeSunday, March 10, 13
  • No proper Garbage Collection? Get used to restarting processes. Frequently.Sunday, March 10, 13
  • Scaling Rails development is hard.Sunday, March 10, 13
  • Idiomatic in Rails:Sunday, March 10, 13
  • Idiomatic in Rails: Just like Java circa 2004Sunday, March 10, 13
  • Understanding the Rails mindset: http://bit.ly/not-a-virtueSunday, March 10, 13
  • Understanding the Rails mindset: i do not think it means what you think it means http://bit.ly/not-a-virtueSunday, March 10, 13
  • If you are injecting aggregation or composition you are Doing it Wrong(tm)Sunday, March 10, 13
  • Idiomatic in Rails:Sunday, March 10, 13
  • Understanding the Rails mindset: http://bit.ly/trashableSunday, March 10, 13
  • Understanding the Rails mindset: Just like aop, but even worse http://bit.ly/trashableSunday, March 10, 13
  • Idiomatic in Rails:Sunday, March 10, 13
  • Idiomatic in Rails: no real complexity or loC reductionSunday, March 10, 13
  • Rails is simple. Controller ActiveRecord Model Database If you want to write a toy blog engine.Sunday, March 10, 13
  • Effectively, controllers have a lot of logic Controller ActiveRecord Model DatabaseSunday, March 10, 13
  • Effectively, controllers have a lot of logic Controller ActiveRecord Model Database But so do models!Sunday, March 10, 13
  • Where do we go from here?Sunday, March 10, 13
  • We will not do Java.Sunday, March 10, 13
  • We, the Java community, screwed up Focused on the “Enterprise” while nimbler companies took overSunday, March 10, 13
  • We, the Java community, screwed up Tried to solve core problems with more complicated toolingSunday, March 10, 13
  • We, the Java community, screwed up JSF, Portlets, JavaFx, Oracle vs. Android: the joke is on usSunday, March 10, 13
  • But we will do the JVM.Sunday, March 10, 13
  • Who cares about Oracle/JCP? So many modern languages. None are “official”.Sunday, March 10, 13
  • Who cares about Oracle/JCP? It is crazy to use “Enterprise” middleware at scale.Sunday, March 10, 13
  • Who cares about Oracle/JCP? twitter, Tumblr, Foursquare, Netflix, Facebook, typesafe, etc. are the new powerhouses.Sunday, March 10, 13
  • Options: 1) Non-Rails Ruby 2) Scala 4) ClojureSunday, March 10, 13
  • Non-Rails Ruby + Simple + Easy to hire engineers + Lingua-franca inside SC - Most code not thread-safe - Lots of native code - Rails mindset everywhereSunday, March 10, 13
  • Scala + “twitter stack” (Finagle, docs) + Good Java interop + Static typing + Good engineering practices starting to emerge - Binary compatibility - Can get complicatedSunday, March 10, 13
  • 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 qualitySunday, March 10, 13
  • Integrating Clojure with JettySunday, March 10, 13
  • Async I/O with Scala/FinagleSunday, March 10, 13
  • Let’s try them all.Sunday, March 10, 13
  • EnablingSunday, March 10, 13
  • 1) Micro-services - A couple of thousand LOC - Once you grasp the domain, can be rewritten in ~1 week - Reduces risk in trying new thingsSunday, March 10, 13
  • internet Legacy Application (Rails) DatabaseSunday, March 10, 13
  • Sounds Users Stats Stream Notifications Settings Recommender MessagingSunday, March 10, 13
  • Sounds Users Stats Stream DB DB DB DB Notifications Settings Recommender Messaging DB DB DB DBSunday, March 10, 13
  • internet API Sounds Users Stats Stream Notifications Settings Recommender MessagingSunday, March 10, 13
  • 2) Easy to deploy - Old Rails system has fully automated deployment - From change to production should take minutes - Integrated to CI - Reverting is easySunday, March 10, 13
  • Sunday, March 10, 13
  • Sunday, March 10, 13
  • Sunday, March 10, 13
  • Sunday, March 10, 13
  • Current status - ~6 new or extracted systems - 3 Clojure - 1 Scala - 2 JRubySunday, March 10, 13
  • Current status Rule of thumb: 1 JVM = 10 thinsSunday, March 10, 13
  • main takeawaysSunday, March 10, 13
  • Rails, PHP, etc. are a very good choice to start somethingSunday, March 10, 13
  • You need to know when to migrate awaySunday, March 10, 13
  • Build infrastructure to reduce the risk of trying new thingsSunday, March 10, 13
  • The JVM is still the best multi-language VM out thereSunday, March 10, 13
  • There is a lot of JVM-related stuff happening outside the official channelsSunday, March 10, 13
  • Even if you are doing Java, drop the extra weightSunday, March 10, 13
  • Java is the new CSunday, March 10, 13
  • phil calçado http://philcalcado.com @pcalcado www.soundcloud.comSunday, March 10, 13