Nicolas Mérouze
Ca1e596b035117dc7c41b1d99469fe91?d=retro
Ranked 26 in Phase 2 with a weighted final score of 140

About the author

I'm Nicolas Merouze, I have 10 years of experience in making products, training & advising teams. Sometimes for my customers, sometimes for my own startups. I had success, I had failures. And I want to transmit all the knowledge I've acquired over the time.

Asynchronous network progamming with JRuby and Netty

Through this presentation, I will show the audience that JRuby combines the power of the JVM and the elegancy of Ruby through popular Ruby topics such as asynchrony and web applications.

More and more people are migrating from Ruby to Node.js because it's easier to do asynchronous applications and web applications can be faster and more scalable. But easy asynchrony, performance and scalability can be achieve with JRuby using Java libraries.

To show that, I will show an example based on a popular Java library named Netty – an asynchronous event-driven network application framework (it is similar to Node.js and EventMachine). Netty is widely used and is developed by Red Hat. For example the Play Framework (best Java/Scala framework) is using Netty. Netty – like a lot of Java libraries – is complex but JRuby can easily hide this complexity and let Ruby developers use a very fast library without the quirks of the Java syntax.

I'll show some code examples of a web framework I've made based on Netty and how it can easily be used in association with Ruby libraries like ActiveRecord. I'll show a real-world usage, a REST API for an iOS app and a performance comparison with other solutions.

In summary, I think it's a great practical guide to JRuby and how it could help to achieve great performances for your applications while still writing normal Ruby.

A note about myself: I've been using JRuby for a long time for various apps and scripts. I know Scala (and Akka), Clojure and asynchronous IO Java 7 features in addition to Node.js, Go and Ruby libraries like EventMachine and Celluloid.


Previous Next

Suggestions

  • D87dddeb300217e6c6574f5ffae220be?d=retro Nikos Dimitrakopoulos suggested 8 months ago

    I'm totally covered from your response :) Would to care to update the description appropriately?

  • The proposal author responded 8 months ago

    @Nikos

    Netty is widely used and is developed by Red Hat. For example the Play Framework (best Java/Scala framework IMO) is using Netty. The web framework I'm making to simplify it in JRuby is usable in production but has not enough features yet to be used for any apps. I've been using JRuby for a long time for various apps and scripts. I know Scala (and Akka), Clojure and asynchronous IO Java 7 features. I can answer hard questions about JRuby, asynchrony and concurrency in general (Go, Node.js, EventMachine...) but I can have a hard time on answering too-deep-technical questions about the JVM itself.

    @Vassilis

    There'll be a comparative performance for the real-world usage (a RESTful JSON API).

  • 415fe6ee69c09802ce8329e2b1a1c5e6?d=retro Vassilis Rizopoulos suggested 8 months ago

    I really like this topic since it should be apparent that what node.js does is not limited to javascript, it is just easier to grasp due to the asynchronous way one works with javascript and I'd very much like to see how a complicated and chatty Java library can be wrapped and simplified in Ruby. Any chance we'll get comparative performance numbers for a sample app?

  • D87dddeb300217e6c6574f5ffae220be?d=retro Nikos Dimitrakopoulos suggested 8 months ago

    Totally love the idea of this topic!!! There are a lot of times I feel constrained by the Ruby VM (not the language).

    My questions are:

    • Are these techniques production ready or are they for side/toy projects and experimentation?
    • How experienced are you with JRuby and the JVM in general? I mean, will you be able to answer some hard/too-deep-technical questions from the audience if they come up?