Mix, JRuby on Rails, Small Teams, Agile, and it’s Effects on the World

November 21st, 2007 53 Comments

A week after going live with Oracle Mix, we’ve gotten a considerable amount of buzz and interest from every aspect of Mix. Most everyone we’ve talked with are really happy to see Oracle becoming more transparent. Mix is a huge part of that. There are a lot of tool heads out there who are really interested in how we made it happen. So, here it is… the story of how Mix was conceived and built.

Those who have kept up with this blog, know about the internal social network we created inside the walls of Oracle; we call that Connect. For those who don’t know anything about Connect, it’s basically a skunk works project that became really popular — you can read more about it here. Connect’s success has opened the minds of many people within Oracle. Many people know the potential of the community and network effects that we’re seeing with the large social networks, but it really hasn’t been applied to enterprise communities yet. Several people at Oracle recognized this and so about 6 weeks leading up to Open World, the Mix project was approved by a few senior Oracle execs and hence was born. Paul, kicked it off and told us we had 6 weeks to have a working application by Open World. I almost had a conniption at that point. Connect took about 6 weeks for me to build (by myself), but to build a web application that had more features, be publicly facing, and had to run on a tech stack (our own) that we had no idea would work well, was just crazy. We didn’t have hardware, data center space, and had a ton of Oracle security, legal and other hurdles to work through — not including development resources. I knew at that point that we needed help to pull it together. Luckily, I knew about people like Ola Bini and ThoughtWorks. I knew that they were doing lots of work around JRuby, and I knew that they practice preach agile development practices. So, we met immediately. It was a perfect match.

The team was comprised of four developers from TW (Ola Bini, Alexey Verkhovsky, Toby Tripp, and Matt Wastrodowski) and me from the Oracle side. We also had a project manager (Mike Royle) who whipped us into shape at the end of every iteration. We started coding about 3.5 to 4 weeks before Open World. At that point, we still didn’t have hardware and there were a ton of unknowns surrounding JRuby running on the Oracle AppServer (and if it did, what performance would be like). We bit the bullet and went for it. Rails was an essential ingredient to this project. I don’t know of other frameworks that would have enabled us to build this particular application so rapidly. The beauty of Rails is the plugin system. We leveraged a whole slew of plugins that made tagging, comments, ratings, paginations, search, authentication, and other common features a simple feature to implement and manage.

We built most of Mix using the standard Ruby interpreter (aka, MRI — Matz’ Ruby Interpreter) on Oracle DB XE using Ruby-OCI. Developing Rails apps is still much easier using MRI because JRuby takes a while to startup. While developing on the Oracle DB, we encountered several issues with the Ruby-OCI adapter (the Ruby-OCI adapter is in need of some official Oracle support… more on that later). While most of the team was using MRI/OCI, I was working on getting hardware and configuring what we had. Once we finally got hardware (4 x 2 cpu-single-core, 12 gb mem, small HDs — yeah… crappy hardware that was on its way to being decommissioned), I spent several days working with the sys admins to get one box set up with Oracle DB 10g (I would have gone with 11g, but the DBAs who were going to support us weren’t up to speed on the configuration of 11g yet) and the other 3 boxes with Oracle Application Server 10g. The 3 app servers were configured to be load balanced by a BigIP layer 7 based load balancer. I set up jRuby and the necessary pieces to allow us to deploy easily on Oracle App Server… namely installing admin_client.jar, which is a CLI for managing the Oracle App Server.

One critical part of the project was to support Oracle’s SSO policy. Meaning every web app that we deploy has to support SSO using the Oracle SSO service. It took me a few days to figure out how all this worked but once we did, it wasn’t difficult to plug it into the acts_as_authenticated Rails plugin that we were using. If anyone is looking to do something like this, leave a comment and I’ll send you the code — maybe I’ll release it as an acts_as_authenticated_through_oracle_sso plugin if there are enough people doing this sort of thing.

After I had the boxes primed, we started doing early deploys on JRuby. The performance was terrible. About 20-40 reqs/sec on a single app server. Turns out that I didn’t have some of the production settings configured properly (i.e., not caching ruby classes, etc.) Once I modified a few environment settings (standard rails prod settings), I got about 80 reqs/sec on a single app server… better but not enough. At the same time, Ola and the JRuby team found some interesting bottlenecks in the JRuby code. Within in a day or two, Ola and team had them patched up and we were beginning to see around 150-200 reqs/sec. After the app server warmed up, things got real interesting… the numbers went way up (400-600 reqs/sec). *Disclaimer: I’m not a performance guru. I did most of my tests using Apache Bench running against the logged in home page of Mix, which btw, doesn’t use any fragment caching at all (actually, Mix is not making use of any caching right now — we’ll get to it eventually, but it doesn’t seem like we need it yet).

The 3.5 to 4 weeks leading up to Open World was nuts. I spent a ton of time taking care of deployment/hardware issues rather than coding. The rest of the team worked remotely (Toby and Matt in Chicago, Alexey in Calgary, Ola in London) which is sort of against the agile mantra, but it was done to cut cost. We communicated through Skype’s bookmarked chat feature which is an excellent tool if you need to work as an agile team remotely. The week before Open World, Toby, Matt and I rendezvoused in San Francisco and knocked out a ton of functionality. Even though we had a productive week leading up to Open World, we knew that the app would still need a lot of polish past go-live, but it’s amazing how much a small team working mostly remotely could accomplish in that short period of time.

This was an amazing project to be a part of. And one thing I’ll say is that for anyone working in a Java EE environment where you have to use the stack that’s there, the future is bright and it’s all because of JRuby, Rails, and the speed and agility at which you can build applications on that framework. I’m convinced that JRuby is the best way to deploy a Rails app if you need performance and flexibility. My prediction: next year will be the year for JRuby’s rise into the mainstream.


Possibly Related Posts

53 Responses to “Mix, JRuby on Rails, Small Teams, Agile, and it’s Effects on the World”

  1. DBA notes Says:

    Getting Things Done with Above & Beyond IBM个人电脑事业部员工回忆录 谁制造了”iPhone”手机?Mix, JRuby on Rails, Small Teams, Agile, and it’s Effects on the World七款安全套对比评测 [VP} – Msgboard: cmd.exe font? innodb-tools – Google Code 收入多少,才算是中产阶级? YSlow for Firebug Future of Web Apps: Google Gears » SlideShare GFW 三定律

  2. Bex Huff | ... technology, lifehacks, and all that good stuff Says:

    Right before Open World 2007, the Oracle Apps Lab team put together a clever skunk works project, thanks to the advocacy of some senior Oracle execs: http://mix.oracle.com Its gotten quite a bit of press recently, because its the only publicRuby On Rails application that runs inside Java. It uses JRuby, running in Oracle’s application server, and was launched in less than 6 weeks… the app labs folks were quite pleased with Nutter’s little baby. So what’s it do? Well, its kind of like LinkedIn, but the purpose is to have an immediate

  3. Diamond Inheritance Says:

    JRuby on Rails

  4. Roop says Says:

    , and although I am not exactly sure what it does, it does seem that the same experience that happens with most Ruby converts happened with the devleopment team for Mix. Rich Manalang was a lead on the project and he recently published histhoughts, sort of a post-mortem, on the project. Some interesting points I found, was that he actually developed in C-Ruby. Now this wouldn’t work very well if you needed to interact with Java libraries, but for most Ruby development it will probably work

  5. Custom Rails Says:

    Check This Out!While looking through the blogosphere we stumbled on an interesting post today. Here’s a quick excerpt: Check This Out! While looking through the blogosphere we stumbled on an interesting post today. Here’sa quick excerpt: Check This Out! While

  6. qzsource Says:

    We communicated through Skype’s bookmarked chat feature which is an excellent tool if you need to work as an agile team remotely. The week before Open World, Toby, Matt and I rendezvoused in San Francisco and knocked out a ton of … full storyhere

  7. Central Standard Tech Says:

    I have a tendency to post intentionally inflammatory posts that usually end up evenly divided between “yea” and “nay”. But this time, I’ve gotRich Manalang’s post from the JRuby on Rails front linesto back me up. Rich is one of the primaries (Rich: THE primary?) behind Oracle’s new Mix site, the first highly-visible public site based on JRuby on Rails. And after the experience he’s convinced that JRuby is “the best way” to deploy Rails.

  8. Rich Manalang - FriendFeed Says:

    postedMix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the Worldon Oracle AppsLab

  9. Mícheál Ó Foghlú's Weblog Says:

    Notes from the Trenches on Agile Development with JRuby (in Oracle) In this interesting post Rich Manalang describes the process of doing a short (6 week) JRuby project in Oracle blow by blowOracle AppsLab’s Mix, JRuby on Rails, Small Teams, Agile, and it’s Effects on the World. This really captures the decision points and problems when working in an organisation used to larger more formal projects, amazing that they pulled it off and did some performance tuning in time!

  10. Bex Huff | blog about technology, lifehacks, and ecm Says:

    Right before Open World 2007, the Oracle Apps Lab team put together a clever skunk works project, thanks to the advocacy of some senior Oracle execs: http://mix.oracle.com Its gotten quite a bit of press recently, because its the only publicRuby On Rails application that runs inside Java. It uses JRuby, running in Oracle’s application server, and was launched in less than 6 weeks… the app labs folks were quite pleased with Nutter’s little baby. So what’s it do? Well, its kind of like LinkedIn, but the purpose is to have an immediate

  11. reddit.com: what's new online Says:

    […] points posted 17 hours ago by glaster1 comment431.Oracle Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World [programming] (oracleappslab.com)posted 1 hour ago by gst3 […]

  12. Ola Bini on Java, Lisp, Ruby and AI: The development of Oracle Mix Says:

    […] Rich Manalang just posted a very nice entry on the Oracle AppsLab about the technology behind Oracle Mix, how we developed it and so on. Read it here. […]

  13. InfoQ: Lessons from building Oracle Mix on JRuby on Rails Says:

    […] Oracle Labs recently released Oracle Mix, a JRuby on Rails based social networking application. Rich Manalang now posted his experiences working on the project.  While the project is now running on JRuby, the initial work was done […]

  14. Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World Says:

    […] gst via oracleappslab.com Submitted: Nov 22 / 04:19 Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World A week after going live with Oracle Mix, we’ve gotten a considerable amount of buzz and interest […]

  15. Charles O Nutter Says:

    JRuby, not jRuby. Thanks for the kind words and congratulations on a great project. I agree the future is bright for JRuby. I hope we’ll have opportunities to work together…in the open…in the future.

  16. Charles O Nutter Says:

    JRuby, not jRuby. Thanks for the kind words and congratulations on a great project. I agree the future is bright for JRuby. I hope we’ll have opportunities to work together…in the open…in the future.

  17. How Oracle Mix was built at Joakim Andersson Says:

    […] Oracle AppsLab » Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World […]

  18. 2008: The year of JRuby? Says:

    […] Headius by Charles Oliver Nutter has a quote from Rich Manalang from Oracle AppsLab with this to say about launching a JRuby based application: […]

  19. programming: Oracle Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World Says:

    […] byhotnewtopoldother communitiesreddit.comsciencepoliticsbusinessgadgetssportsgamingentertainmentOracle Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World (oracleappslab.com)0 points posted 1 day ago by gst5 […]

  20. Wes Maldonado Says:

    How did you manage the development cycle when you went from using MRI to JRuby? Do you still use MRI for development and then package for deployment with JRuby?

  21. Wes Maldonado Says:

    How did you manage the development cycle when you went from using MRI to JRuby? Do you still use MRI for development and then package for deployment with JRuby?

  22. Rich Manalang Says:

    Charles… thx for the correction… I’m so used to working with jQuery that I treat any project with a “j” in front as “j

  23. Rich Manalang Says:

    Charles… thx for the correction… I’m so used to working with jQuery that I treat any project with a “j” in front as “j

  24. Rich Manalang Says:

    Wes, yes, we still dev on MRI, then test and deploy on JRuby. So, far it’s working pretty well.

  25. Rich Manalang Says:

    Wes, yes, we still dev on MRI, then test and deploy on JRuby. So, far it’s working pretty well.

  26. Headius: Oracle Mix Proving JRuby is "The Best Way"? Says:

    […] posts that usually end up evenly divided between “yea” and “nay”. But this time, I’ve got Rich Manalang’s post from the JRuby on Rails front lines to back me up.Rich is one of the primaries (Rich: THE primary?) behind Oracle’s new Mix site, the […]

  27. ed Says:

    Were you going against JRuby 1.0 or 1.1? If 1.1, using the JIT mode?

  28. ed Says:

    Were you going against JRuby 1.0 or 1.1? If 1.1, using the JIT mode?

  29. Inchoate Curmudgeon » Blog Archive » Two Weeks or Four: A Cautionary Tale Says:

    […] stumbled across more detail from Rich Manalang regarding the Oracle Mix deployment on JRuby and the Oracle Application Server. I orginally wrote a […]

  30. Rich Manalang Says:

    Ed, we took a snapshot of 1.1 after the performance patches went in. We’re running in interpreted mode.

  31. Rich Manalang Says:

    Ed, we took a snapshot of 1.1 after the performance patches went in. We’re running in interpreted mode.

  32. Jackson Miller » linkblog: Nov 23 Says:

    […] Oracle AppsLab » Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World […]

  33. jruby.de : Oracle Mix und JRuby Says:

    […] – Mix, JRuby on Rails, Small Teams, Agile, and it’s Effects on the World […]

  34. %w(Akita On Rails) * 2.0 - Oracle + Mix = JRuby on Public! Says:

    […] vai o relato do Rich […]

  35. Riopro Blog - » O seu cliente trabalha de graça pra você e ainda fica mais feliz por isso? Says:

    […] http://theappslab.com/2007/11/21/mix-jruby-on-rails-small-teams-agile-and-its-effects-on-the-worl… […]

  36. WildKid Says:

    Really good and really interesting post. I expect (and other readers maybe :)) new useful posts from you!
    Good luck and successes in blogging!

  37. WildKid Says:

    Really good and really interesting post. I expect (and other readers maybe :)) new useful posts from you!
    Good luck and successes in blogging!

  38. Anonymous Says:

    Can you post ‘rake stat’ results please? Just interesting..

  39. Artem Vasiliev Says:

    Can you post ‘rake stat’ results please? Just interesting..

  40. Pax Tecnologia: Uma breve historia de como foi feito o Oracle Mix Says:

    […] Vale a pena ler, demais esse projeto!http://theappslab.com/2007/11/21/mix-jruby-on-rails-small-teams-agile-and-its-effects-on-the-worl… […]

  41. Floyd Says:

    Rich,

    This is a great “war story” about a small team focusing on a single effort over a short period of time to achieve a huge positive impact. Thanks for sharing. We need more success stories like this.

  42. Floyd Says:

    Rich,

    This is a great “war story” about a small team focusing on a single effort over a short period of time to achieve a huge positive impact. Thanks for sharing. We need more success stories like this.

  43. Oracle Life - Observe Oracle Database 11g From Google Says:

    […] Mix, jRuby on Rails, Small Teams, Agile, and it’s Effects on the World… admins to get one box set up with Oracle DB 10g (I would have gone with 11g, but the DBAs who were going to support us weren’t up to speed on the configuration of 11g yet) and the other 3 boxes with Oracle Application Server 10g. … […]

  44. Ben Curren Says:

    Would you share some of the configuration details for the server? For example, how many Rails instances did you setup in the RailsServlet? What flags did you pass to the JVM to improve performance? Any other tricks or insight would be greatly helpful. We are launching a product in mid January and are starting to go through the same performance tuning you are speaking of here.

  45. Ben Curren Says:

    Would you share some of the configuration details for the server? For example, how many Rails instances did you setup in the RailsServlet? What flags did you pass to the JVM to improve performance? Any other tricks or insight would be greatly helpful. We are launching a product in mid January and are starting to go through the same performance tuning you are speaking of here.

  46. Rich Manalang Says:

    Ben, we’re running goldspike with the defaults. We’re not even running under JNDI yet :-)

    The only real performance tweak we did was to use JRuby trunk :-). The other part is to off-load our static content to a web server that’s more efficient at handling static content — in our case, Apache — we could have gone with Nginx, but Apache comes is already enabled with Oracle AppServer, so we used that.

    I’m sure there are tons of other performance options we can enable, but for now, we’re running pretty smoothly.

    However, I was chatting with one of the JRuby devs today and it looks like they just found a big mem leak related to HTTP POST requests… so, you may want to wait for the official 1.1 release of JRuby.

    Rich

  47. Rich Manalang Says:

    Ben, we’re running goldspike with the defaults. We’re not even running under JNDI yet :-)

    The only real performance tweak we did was to use JRuby trunk :-). The other part is to off-load our static content to a web server that’s more efficient at handling static content — in our case, Apache — we could have gone with Nginx, but Apache comes is already enabled with Oracle AppServer, so we used that.

    I’m sure there are tons of other performance options we can enable, but for now, we’re running pretty smoothly.

    However, I was chatting with one of the JRuby devs today and it looks like they just found a big mem leak related to HTTP POST requests… so, you may want to wait for the official 1.1 release of JRuby.

    Rich

  48. Carbon Five Community: Thoughts on JRuby Says:

    […] you can run with JRuby. The success of this effort can be observed with Ruby on Rails applications now running on JRuby. Of course, there are some […]

  49. JRuby on Rails deployed at Sun « Piku’s Blog Says:

    […] using JRuby on Rails. It’s another successful deployment of JRuby after Oracle Mix (see implementation details). Our development environment is based on a self-contained JRuby (1.0.3) on Rails (1.2.6) […]

  50. Large sites using Ruby on Rails « Microserf Says:

    […] an article about Oracle Mix. Surprisingly for a enterprise company, it was build on Ruby and runs on […]

  51. Ruby Says:

    […] chun wrote:Quanto a linguagem de scripting… me refiro por ser 100% interpretada… e isso conta sim… imagina q vou simplesmente opitar por ruby pela sintaxe e pela maravilhosa forma de criacao de DSL’s…. ai chego na ponta e me ferro por causa de performance e integracao… Conta? Cade os seu benchmark realista baseado em uma aplicacao de verdade rodando em JRuby ou MRI me dizendo que a performance do Ruby eh insuficiente? Sem dados de verdade, eh a minha palavra contra a sua. Mas eu tenho exemplos de aplicacoes em que a performance foi mais do que aceitavel – tanto que a gente nem precisou de fragment caching, e mesmo assim bateu nos 400 requests/segundo: http://theappslab.com/2007/11/21/mix-jruby-on-rails-small-teams-agile-and-its-effects-on-the-worl… […]

  52. Ruby Says:

    […] chun wrote:Quanto a linguagem de scripting… me refiro por ser 100% interpretada… e isso conta sim… imagina q vou simplesmente opitar por ruby pela sintaxe e pela maravilhosa forma de criacao de DSL’s…. ai chego na ponta e me ferro por causa de performance e integracao… Conta? Cade os seu benchmark realista baseado em uma aplicacao de verdade rodando em JRuby ou MRI me dizendo que a performance do Ruby eh insuficiente? Sem dados de verdade, eh a minha palavra contra a sua. Mas eu tenho exemplos de aplicacoes em que a performance foi mais do que aceitavel – tanto que a gente nem precisou de fragment caching, e mesmo assim bateu nos 400 requests/segundo: http://theappslab.com/2007/11/21/mix-jruby-on-rails-small-teams-agile-and-its-effects-on-the-worl… […]

  53. Nabble - m-etc-dev - Launching OMS from Eclipse Says:

    […] we wanted to run Rails applications on the Java platform in the future (which is possible now, see http://theappslab.com/2007/11/21/mix-jruby-on-rails-small-teams-agile-and-its-effects-on-the-worl…). We are planning to work with the QuickFIX guys to get the Ruby bindings to compile on Windows in […]

Leave a Reply