Why LinkedIn's Mobile Developers Dumped Ruby For Node.js
Kiran Prasad, director of engineering for mobile at LinkedIn, said Node.js has become his group's standard for front-end programming and is likely to start infiltrating other projects, including those targeted at PC browsers. "I don't think we'll go through and rewrite everything from scratch because that's just not time-effective, but we're definitely moving toward Node," he said.
More Social Business Insights
- The Case for Outbound Content Management
- The Oracle Insurance Survey: Overcoming IT Hurdles to Success
- Strengthening Enterprise Defenses With Threat Intelligence
- What Every Database Administrator Should Know About Security
[Tracking the LinkedIn APIs? See LinkedIn Groups Widgets Headed For Apps, Sites]
At LinkedIn, a switch from Ruby on Rails to Node.js was part of the story of how the developers boosted the performance of the new iPhone app that came out over the summer, Prasad said. The performance of a mobile app is often determined less by the performance of the code executing on the device than by the latency of connections back to a server--particularly when the app must make multiple requests of the server, he said.
With Node.js, it's possible to achieve better performance by keeping the same connection open across multiple requests, Prasad said. Other server programming environments tend to discourage keeping a large number of connections open because each one requires its own process and consumes computing resources, he said. Node.js uses an event-driven programming model that allows it to handle many open connections without running out of resources. As a result, LinkedIn is able to deliver much faster performance on many fewer servers, saving money and making users happier at the same time, said Prasad.
While Node.js is not the right answer for processor-intensive data analytics, it is a great solution for most front-end engineering tasks--programs that essentially do heavy string manipulation to generate HTML to be sent to the browser, often personalized with input from multiple back-end systems, Prasad said.