Software Architecture: What were the reasons for companies like LivingSocial and Square to use a language other than Ruby?
-
LivingSocial and Square have some of the smartest Rubyist in the world so I am curious to understand why do these companies prefer using Scala, Clojure and Java to build parts of their systems. What were the considerations and choices that favoured building those parts of the system on the JVM than Ruby. This question is not intended to start a discussion on which language is better but to understand the questions that came up when deciding on a platform and going with a language other than Ruby. In this talk http://shelby.tv/video/vimeo/45719570/xavier-shay-jruby-at-square Xavier Shay mentions that they wanted to build their payment system in a secure and proven language like Java. He goes on to talk about a reliable service oriented architecture that was needed for square to be always available. Why wouldn't this have been possible with just Ruby?
-
Answer:
The only reason: scal...
Hanna Maksimava at Quora Visit the source
Other answers
Xavier was accurate that we (Square) were standardizing on the JVM at the time but it wasn't much to do with scalability. For a payments company where each piece of information is very important accuracy is far, far more important than scalability. We need to scale smoothly, sure, but when a single record in a database could represent possibly tens of thousands of dollars we don't mind throwing a couple extra machines at a problem to ensure it's solved in a simple and legible way. The primary reason for our standardization was that it's easier to operate a single VM than many of them. If you've ever managed C processes, an Erlang OTP application, and a JVM app then you know the failure modes are all totally different and the debugging tools you need to get great at are unrelated. We wanted to get good at operating, tuning, and debugging the JVM so we went with that. Fast forward a couple years and we've realized that the JVM is better than ever but our problems aren't so much with operability (we've figured out how to operate at scale both the JVM and MRI, for example) as they are with development speed. We need to ship the best products fastest at all levels of the technology stack We write Objective-C on iOS and Java on Android because those are no-brainers. But each server team picks the language that lets them move fastest whether that's Ruby, Java, or Go. Typically teams with a tighter iteration loop that are higher in the tech stack pick Ruby. Infrastructure teams with a much broader impact on our platform tend to pick Java for the same reasons - they spend less time overall building something highly concurrent and reliable in Java than they would in Ruby. The trick to all this was to get our interfaces right so these services can speak to each other in a well-defined language-agnostic way. Once we extract it from our internal frameworks we'd like to open source it.
Jack Danger Canty
JVM is not just a VM anymore, its a platform in its own right to some extent just as Mac or Windows are. Following are the reasons for being on JVM: Better performance, JVM has been optimized and squeezed to yield maximum performance in over a decade. Software - Whole web servers, database servers, monitoring tools and even pure Java IDEs are out there. Libraries - Java has got tons of libraries from Artificial Intelligence to search engines, natural language processing, PDF, Excel and other file processing capabilities, set of libraries is simply mind blowing C#, Python, Ruby, PHP might have similar libraries as well or in some cases even better but overall, Java world has the largest and most diverse code base. Polyglot Programming: With JVM as platform, you can use Ruby, Python, Groovy, Scala and many other languages seamlessly and that's another big. I do not see but more growth in Java world unless Oracle deliberately tries to mess up things with some wicked licensing model in future.
Mohsin Shafeeque Hijazee
The JVM is strong in areas where Ruby has traditionally had problems: mature, highly tuned garbage collection high performance JIT Using JVM to deploy takes advantage of a lot of solved problems. Language questions do come into play as well, as does the availability of frameworks like Akka. Other sites favouring JVM are Twitter (which also turned away from Ruby for its high throughput systems), and more recently rumoured, Facebook.
Toby Thain
About three years ago at the golden gate ruby conference -- the JVM was acknowledged as a superior VM relative to ruby's VM, for the basic reason that it had been around for ten years and problems which were being resolved in the ruby VM had already long been resolved in the JVM. So it seemed to be a simple matter of -- do they continue to play catch-up or simply move to the VM that's already more stable and reliable?
Sarah Schwanbeck
Ruby is optimized for developer performance, where Java is optimized for machine performance.When you're starting a new project, you have few developers and little traffic. Your feature wishlist is long, and one server is more than enough to handle everything you need. At that moment, developer time is precious and scarce, while processor time is cheap and plentiful. Ruby is a lot faster to write than Java, so Ruby is a good choice here.When you're the size of LivingSocial, you have many developers, and a huge amount of traffic. Your feature wishlist is short, but your array of servers goes on forever. Now, developer time is easy to come by, but your processor time is getting more and more expensive every day. Java runs a lot faster than Ruby, so it makes sense to make the switch.To be clear: you absolutely *can* make a reliable, service-oriented infrastructure with Ruby alone. And yes, you can definitely make it performant. But when you get up to the millions of requests per minute, Ruby vs Java is the difference between needing 10 hosts for your service or needing 40.
Mark Tabler
Related Q & A:
- How do I use a custom avatar like a picture of me?Best solution by Yahoo! Answers
- What is the gprs? i WOULD LIKE TO use a GPRS network?Best solution by Yahoo! Answers
- Can you use a wire dog crate (like a Midwest) on a Via Rail train?Best solution by Yahoo! Answers
- What are medical reasons to get a nose job?Best solution by ChaCha
- What are main reasons to attend a college?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.