Rails and the Enterprise
Posted by Matt Aimonetti March 24, 2010 @ 06:00 PM
If you have been in the Rails community for a little while, you have more than likely noticed the love/hate relationship that is entertained by the community vis-à-vis the Enterprise. Some people hate the enterprise and publicly tell it to go f*ck itself (49:39), on the other hand, these same people are also proud to mention that some major players in the industry use Ruby and Rails.
The truth is that even though Ruby and Rails could still be more Enterprise ready, it is already a great combo that big corporations can start using today, and lots of then already do! Let's look at the state of Rails and the Enterprise.
So where are we at?
- First things first, Rails was not designed for the enterprise or for the enterprise's needs. It was extracted from a successful startup project and has grown with the contribution of people using Rails daily. But Rails is also based on Ruby which became very popular and started to be used in different places, including NASA, for instance.
- 37signals still does NOT need "Enterprise features" and therefore don't expect any 37signals engineers to write an Oracle Adapter or a SOAP layer for ActiveResource and push for their adoption.
- Rails is far more than a framework used by 37signals. It is an Open Source project with code being contributed daily by people on other projects. Most of the code does not directly benefit 37signals.
- The Enterprise is evolving: economic crisis, a new generation of developers, new management, insane deadlines. Ruby and Rails have quickly become very attractive for the Enterprise and having big companies acting as startups is often something a lot of managers dream of. As a matter of fact, here is a quote from Sony Computer Entertainment America's President & CEO, Jack Tretton: "Be like a multi-billion dollar company on the outside, and act like a startup on the inside". This change has taken a while because the Enterprise is a big mammoth (or insert another of your favorite gigantic, slow-starting animal here), but it's happening.
- Communication with/in big companies is not as straight forward as when dealing with startups who need/thrive for the outside attention and who don't have all the red tape of a PR department, etc. Here is a simple example: I work for Sony Playstation. My job description mentioned Redis, MongoDB, EventMachine and many other technologies I did not know Sony was using in production. I did not realize that my default production stack would be built on Ruby 1.9. Communicating when you're a part of a big company is more challenging than when you are a team of 5 engineers working on a cool project, and therefore a lot of people don't know what technologies are being used by Company X or Company Y.
- Rails is used by lots of big companies. It might not be obvious and you might have to look at the job offers but people like AT&T, Sony and many others are always looking for talented Ruby developers. And, even though Java and .NET are still ruling the Enterprise kingdom, dynamic languages are slowly but surely catching up. Rubyists are climbing the social ladder and are now in positions to push the language they love.
Understanding the Enterprise's needs
It's kind of hard to define "the Enterprise's needs", however I can testify that the needs and requirements of a so called "Enterprise app" are slightly different than those encountered when you work on a startup app. What the Enterprise needs/wants:- reliability
- support
- performance
- advantage over the competition
- integration and transition path
Reliability
I think that it was proven many many times that Rails scales and can be very reliable as long as you know what you are doing. We are not talking anymore about a buzz framework that just got realized and that cool kids play with but rather, a stable platform used by some of the most popular web applications out there.
Support
This point is something the Rails community can be proud of. We have lots of forums, blogs, books, local meetings, conferences... Yes, Rails is OpenSource and you can't buy yearly support from the core team but you will find all the help you need out there. (If you can't, feel free to contact me and I'll direct you to people who can help, and if you are new to Rails, take a look at http://railsbridge.org/)
Performance
Based on my own experience, the level of performance we have using Ruby and Rails is more than enough for the Enterprise world. This is especially true with Ruby 1.9 greatly improving performance and Rails3 optimizations. If you really need part of your code to run as fast as C code, writing a C extension for Ruby is actually quite easy and will solve your speed issues.
Advantage over the competition
Rails comes with certain ways to do things, conventions that will get you up and running in much less time. Ruby as a language is natural, intuitive and easy to maintain. By choosing the right tools for your project, you will definitely be able to get more done in less time and increase your business value faster. Let's not forget the strong value of testing in the community that will push your team to write tested code and more than likely improve the overall code quality of your products.
Integration and transition path
This is probably the part that is the most challenging when you live in the Enterprise and look into using Ruby & Rails. I was recently talking to someone from Google who used to do a lot of Ruby before joining the Mountain View-based company. We were talking about how he loves Ruby but had such a hard time integrating with existing Enterprise solutions. He mentioned how he got frustrated by the lack of great XML tools, bad/complicated SOAP libraries and a few others I can't remember. The truth is that when my friend was using Ruby this all was true. REXML and soap4r are useful but might not perform that well. Luckily as the community has grown, new tools have come up and today Nokogiri (developed and maintained by AT&T engineer's Aaron Patterson) can easily be used instead of REXML and many libraries are known to be better than soap4r such as savon, handsoap and others. The other good news is that major IT companies such as Apple, Microsoft and Sun(RIP) have adopted Ruby and you can now write your code in Ruby and use native libraries from other languages such as Java, .NET or Objective-C. The transition path can be done smoothly without having to commit to a total rewrite.
Database-wise, Oracle is still a viable option for Rails developers thanks to the Oracle ActiveRecord adapter (by R.Simanovskis). Note that your DBA might curse you for not doing optimized queries using bind variables and all the Oracle Magic spells, in which case you can use Sequel, a great ORM supporting Oracle, and some of its unique features.
Deployment-wise, you can deploy on IIS, Tomcat, Glassfish, Apache, Nginx, or almost anything mainstream you are already using. Using Passenger, deployment is as easy as deploying a PHP app and you also get a series of great tools such as Capistrano, Vlad etc...
So basically, thanks to passionate Rubyists working 'for the man' such as Aaron Patterson, Raimonds Simanovskis and others, using Ruby in the Enterprise is much much easier. Ruby and Rails were not initially designed with the Enterprise in mind but with time, the integration has become smoother and both parties can now enjoy reciprocal benefits.

Beautiful.
I know the “enterprise” may mean different things. But I built a fairly big “enterprise” application with Rails/ExtJS.
The application is deployed into Full windows environment with NTLM authentication/authorization, Oracle Database. Yes there were issues, but I think rails performs fairly well, and is ready for enterprise.
I agree that it is time for the world to hear the RoR rawr..!
Sounds like this was written with a bit of a chip on your shoulder, anything in particular happen? Let me know, I’ll go slash their tires…
cheers!
Great post, Matt
thanks for this post. i also happen to work for a giant company, and we too deal with the need for enterprise features in rails. i think (or hope) the next two years will see ActiveResource (or a similar, even better library for consuming services) really take off, and we’ll see rails itself more oriented towards a service-oriented architecture. in fact, i’m hoping to give a rails conf talk on that very subject!
People still use Oracle? Why?
Having worked with Rails including some unusual deployments with JRuby, I’m not convinced Rails is a great solution for large enterprises.
As pointed out here, the SOAP and XML libraries need some serious attention. This was a major cause of consternation.
Another problem I have is that Rails is awesome at MVC, but so awesome at multiple tier architectures. I think this has less to do with limitations in rails and more to do with the culture. There’s a tendency to assume MVC and the active record patterns are all you need, but in a large enterprise where you might need a separate layer from data access to handle business logic, or you might want to partition your system into services, rails isn’t the best choice.
I don’t mean to be negative. I think rails is great and criticizing it for what it is not isn’t my intention. I think maybe rails should continue to be great at what it is- an awesome MVC framework for web applications of a certain size and complexity.
Don’t know – post sounds like a bit zealous propaganda to me. :)
Thanks for mentioning me :)
@Joe Hovler Why people still use Oracle? There are lot of enterprises that run their ERP or CRM or other core-business systems on Oracle database and they cannot (and probably should not) migrate them in one day to MySQL / PostgreSQL / NoSQL or whatever.
But quite often these applications have quite old and not very usable user interfaces and that is opportunity for us Rubyists to put new sexy UI on top of existing data in existing legacy applications. That’s what my team has been doing – putting Rails on top of existing Oracle based systems – and users love it and now everyone knows that you can use Rails to build cool web applications and we get more and more new projects in this area.
I think this approach is much more productive to get incrementally more Ruby into enterprises compared with attitude that “Oracle/Java/.Net/... sucks and you should throw it away”.
Rails enterprise? No. You need Merb for that.
The Achilles heel for ruby in the enterprise is a SOAP server. The client is the easy part. You can do that with plain on Net::HTTP and hpricot but the server bit is difficult and there is no satisfactory answer.
The only thing resembling a solution is torquebox.
Quick correction: The Sequel ORM does NOT have bind support for Oracle. This is something that I verified with Jeremy (Sequel’s maintainer) a while back. Bind variables in Sequel are only fully-implemented for PostgreSQL.
@Joe Hovler, I can only assume you’ve never used Oracle. It’s a better fit for some applications than MySQL. Right tool, right job and all that.
The biggest road block I’ve encountered to using Ruby and Rails in the enterprise has nothing to do with the software development side. The problem is on the IT side.
Most large corporations like hiring cheap labor, and you end up with sysadmins who have a narrow comfort zone, which is usually IIS/.NET or big-honking-app-server. The don’t want to hear about Ruby/Rails, and a dev team that tries to use it will end up having to support the app themselves.
I personally don’t like carrying a pager to be Tier 1 support because IT washes their hands of the application environment.
This will be the biggest impediment to enterprise adoption. Until you have the same passion for Ruby and Rails on the IT side, it is a losing battle.
Great !
@Tim.S
From my experience I can tell that at first you need to sell the idea to business people – if you can prove to them that you can do it faster, cheaper and better with Ruby then they don’t care that it’s not Java/.Net/Oracle.
And regarding to IT departments you have to be ready talk and argue with them. It’s the easiest way just to blame IT that they don’t understand new technologies. But you need to understand their concerns and need to address their worries. The best way is to convince them with working prototypes that shows that Ruby on Rails is scalable, secure and stable platform.
And the last thing is that you still should be ready to provide at least initial first level support for your application. And that’s the good thing – it motivates you to do enough testing, to automate as much as possible routine work and to set up good monitoring. If you cannot take responsibility that application will work fine then don’t expect that others will do it.
I have managed to get in this way Ruby on Rails into several enterprises which had no Ruby experience before and all these cases are success stories now.
@Vijay
i would love it if you wrote a post on how you got rails and iis with ntlm to play together
I recently joined the Rails team at JPMorgan Chase that was the topic of the Rails podcast a few years ago: http://podcast.rubyonrails.org/programs/1/episodes/josh_shairbaum_and_dan_manges
Josh and Dan have moved on from the team long since I joined, but that same project is still alive and kicking today. Not only is it still around, it’s growing… We’re looking to add another Rails developer to the team. I’d say that’s a win for Rails and the enterprise.
Rails really needs rock solid libraries for common features: - email - pdf - raporting - soap (yes, we all hate it, but you cannot ignore it) Current solutions are not good enough.
Biggest problem is just getting Ruby in the door of a Java/.NET house.
If they have an established team working on .NET/Java why would they want to replace or launch a new app with Ruby which would then mean hiring other Ruby developers down the line to maintain.
Not every developer is as interested in learning new skills.
I am the Chief Information Officer of a large fund and walked into a situation where everything was written in .NET. This was fine but I noticed we had squadrons of programmers and not a lot of productivity happening. Lots of meetings and not a lot of software being created. Being a programmer myself I decided to introduce some of the “better” or “open” developers to rails.
Most of the old-timers didn’t want to hear about this but I told I created a challenge for them to show them the power of Rails and working in an agile environment. I needed three of the current developers to learn Ruby and Rails over the course of two weeks. Then the four of us would take on the inventory management project that was currently in the works for about a year or so. I said, I bet the four of us can develop a usable inventory application in a month using pair programming techniques, unit testing, etc, etc.
Most of the .NET die-hards scoffed at the idea. The month came and went and we released the alpha site for testing. Management loved it, accounting loved it, everyone was thrilled because we had involved them along the way and they could start testing and playing around with stuff. The other guys were still drawing ERD diagrams.
Needless to say most of them are gone and most of our apps are now written in Rails. I have yet to find a situation that it doesn’t address. As long as you have good programmers that are willing to learn new stuff you can make it work for you. Everyone around here is a lot happier since I moved the place to Rails, the developers, management, and the other departments that use the applications.
Good article. There are a couple of things that don’t connect though. You talk about the need for stability and support and then talk about Oracle driver/adapter provided by Raimonds Simanovskis. I am sure it is a great piece of code but it does not come from Oracle Corp i.e. it is only great while the author is interested in it. So, what will be on the mind of every manager (yes, I am one of those) is “what happens when the author gets married, gets another hobby or decides to take a year off and pitch a tent in the Himalayas.” I think Rails community is very familiar with the concept of some very prominent members just dropping out of site. That is why we in IBM write and support our own drivers/adapters for scripting languages. Enterprise customers need that assurance. They need to be able to call someone, to have a single neck to choke when their neck is being squeezed. And if nothing else, they need to have somebody to blame. “You never get fired for buying IBM” is how the old saying goes. And believe me, you will get fired if you start blaming an open source author of an Oracle driver.
Good article. There are a couple of things that don’t connect though. You talk about the need for stability and support and then talk about Oracle driver/adapter provided by Raimonds Simanovskis. I am sure it is a great piece of code but it does not come from Oracle Corp i.e. it is only great while the author is interested in it. So, what will be on the mind of every manager (yes, I am one of those) is “what happens when the author gets married, gets another hobby or decides to take a year off and pitch a tent in the Himalayas.” I think Rails community is very familiar with the concept of some very prominent members just dropping out of site. That is why we in IBM write and support our own drivers/adapters for DB2. Enterprise customers need that assurance. They need to be able to call someone, to have a single neck to choke when their neck is being squeezed. And if nothing else, they need to have somebody to blame. “You never get fired for buying IBM” is how the old saying goes. And believe me, you will get fired if you start blaming an open source author of an Oracle driver.
Rails as a technology has failed miserably to find any enterprise backing and most ruby devs are now frustrated (including me) around the world for their choice of this poor beggars skill.
I would just say this to anyone thinking of picking ruby from Java or .net please do not make this mistake.
The ruby/rails community is full of wannabe wydiots and self proclaimed gurus like these activism folks who never got anywhere and you will find yourself completely lost in them.
If you dont believe me go to google trends and search ruby vs java search ruby on rails and look at the trend graph its sunk completely.
Please don’t sink your future with people like these, sadly I have sunk mine and I think its a moral duty after 5 years of complete patience to warn others now.
Please will never change from Java its like telling them you are doing something wrong and it just does not work.
No the enterprise call never came and never will.
I remember Zed Shaws Rant and the last words and laughing at it 2 years back but they are true for as a developer at least everyone wants to show off in the ruby world no respect for anyone else, they are all super wizards.
I just wish I get out of this ruby hell hole soon.
On a totally different note…
I know first hand Rails is being used in at least three very large enterprises in here Minneapolis… a large bank, a large health care company and an electronics retailer (I’m sure you can probably guess all three…)
Smart enterprises truly are behaving like startups internally… Take that for what it is worth…