File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ruby and the fly likes Ruby Application Performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Ruby Application Performance" Watch "Ruby Application Performance" New topic
Author

Ruby Application Performance

Duddiyanda Siraj
Greenhorn

Joined: Nov 11, 2004
Posts: 23
I have been coding in Ruby on Rails from past 4 months, to convert our J2EE based Web app to Ruby on Rails. I have around 8 years experience in Java. I found development in Ruby is pretty fast. Our initial research also found that the app developed in Ruby will be performing well. But as the things are moving I have a feeling that, even though its taking less time, we are not seeing much difference in the performance. How can we make use of Ruby to the fullest of its strength ?

Also as most of us are from java background we are seeing some sort of JAVA influence on coding in Ruby now .

Thanks,
Siraj


Before every minute of action, there should be an hour of thought.<br />- Henry Ford
Duddiyanda Siraj
Greenhorn

Joined: Nov 11, 2004
Posts: 23
Forgot to mention I have been following "Agile Web Development with Rails" - which is really a good book for beginners
Matt Williams
Greenhorn

Joined: Feb 06, 2008
Posts: 14
First off, what app servers are you using? What JVM? How's your heap allocated? ....

Also, I've found programming ruby as if it is java does not leverage the strengths of the language. I work with someone who was trying to program Ruby as if it were perl, and it's not. The conventions in the language make it easier to develop, imho, and while you can write ruby as though it were just about any language, you'll really lose out if you don't write it like ruby.

Also, for me the main "performance" things are:
1. development speed
2. maintainability
3. satisfaction

Yes, there are environment things which can be done to "speed" it up. But the main question to ask is "how fast does it need to be"? The reduced cost in development and maintenance tend to make up for anything else. And, too, you want to avoid the trap of premature optimization....
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Good summary Matt. I'd also like to suggest Rails for Java Developers. It's a good book that shows comparisons of Ruby to Java, and Rails Components to common Java frameworks like Struts and Hibernate. There's no advantage in writing Java with Ruby syntax... and this book helps you avoid that pitfall.
---
One interesting performance statistic to look at while developing a Rails app is what your "not" doing. (not configuring, not creating lots of plumbing, not spending a lot of time designing complex object hierarchies, etc). You can then focus that reclaimed time and energy on productive tasks like: creating solid integration tests, fine-tuning your features so that they make sense to your users, refactoring code out of the view into partials/models/helpers/app-helpers/plugins, etc.

Thanks!
Duddiyanda Siraj
Greenhorn

Joined: Nov 11, 2004
Posts: 23
Thank you very much Matt Williams and Michael Sullivan for your valuable inputs.

Yes, there is no question in, amount of time we are saving in the development and application maintenance.
We have pretty descent environment setup and using Apache as webserver. We are in to healthcare domain and there is huge data sitting in the DB. Some time we have to pull selected data from millions of records.

Looks like before refactoring our code, it's worth spending time on knowing more about Ruby magic. Would really appreciate if any one provides me the right books to refer or URLS for advanced topics.

Thanks,
Siraj
Matt Williams
Greenhorn

Joined: Feb 06, 2008
Posts: 14
Regarding the configuration -- that truly is the *hard* part about J2EE. Both when I was teaching Java, as well as now, I tell people that the coding's the easy part; configuring it is the hard part.

Why else does J2EE have 5 roles? ;-)

There are some quirks to Ruby configurations, but it is a lot simpler and requires far less time and effort to configure/deploy, not to mention develop!
Duddiyanda Siraj
Greenhorn

Joined: Nov 11, 2004
Posts: 23
Completely agree on that part
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ruby Application Performance