• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ruby Application Performance

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Duddiyanda Siraj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forgot to mention I have been following "Agile Web Development with Rails" - which is really a good book for beginners
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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....
 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Completely agree on that part
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic