Saturday, November 22, 2008

Glassfish is looking speedy

Let me start by saying that most benchmarks should be taken with a grain of salt, so please do the same here.

I work on Project Laika, and for our deployments we are looking to switch to JRuby. We already have java code hanging around, and it looks like we will need some more soon (I'm thinking it will be easier to deal with SOAP web services in java and calling the classes from JRuby). I wanted to run some numbers to make sure that our performance wouldn't fall through the floor.

The Setup

I decided to pit Mongrel 1.1.5 running on MRI 1.8.6 against Glassfish v3 Prelude 1 and JRuby 1.1.5 on Java 5. I'm running Rails 2.0.2 in both setups (I know we are behind the times). I ran them both on OS X 10.5.5 and had the Rails apps hit the same MySQL database.

I used ab to grab the numbers. I had it hit the site 1000 times with 10 concurrent requests. I hacked the Laika app slightly so that you didn't have to log in.

The Test

I wanted to get a feel for how the app would perform, so I did two simple tests: dynamic content from a typical page and static content. The dynamic content was the patient template library in Laika which contains code that you'd expect in a Rails app: AR pulling info from the DB and putting it into ERB templates. I also pulled down the Rails 404 page to get a feel for serving static content. This is probably less meaningful, as you'll probably have Apache or Nginx serve up your static stuff.

The Results

Glassfish, hands down. The results are the average number of milliseconds it took to serve each request.

It beat Mongrel in both static and dynamic content easily. Glassfish v3 also makes it ridiculously easy to deploy Rails apps. You can use the Glassfish gem, and serve up your app with a single command. I installed the Glassfish server, so I could run JEE apps alongside my Rails stuff, there is a single command where you point the app server to the root directory of your app and you're done.

With Rails 2.2 now out and offering thread safety, and JRuby being the only interperter that can take advantage of it... Glassfish and JRuby are really worth checking out.


jhon philips said...

I merely have a glimpse here and appear nice to appear out this world wide world wide journal. flush content writing hand and extremely cooperative web location bad credit payday loans. i might like most of we've got got got a bent to tend to tend to tend to tend to organization neck of the woods unit to undertake to travel seeking out these diversity of things, here we've got got got a bent to tend to tend to tend to unit able to observe everything. I’m with the content standing associate degreed do deference him as associate honest provider. Thanks for your work and you too.

marko said...

Nonetheless, online payday advance is the most well known as the credit has the idea of snappiness and rapid. Loan payday advances are of incredible use if there should be an occurrence of direness.check cashing corona

marko said...

You can even track alterations in rates thusly. There are loads of tips on the most proficient method to realize what different dealers are the same number of as. Yippee and google are perfect for this procedure. Chek out their encourages and you will have the capacity to check whether they redesign. payday loans

marko said...

The magnificence of 1500 Loans is that any terrible credit individuals are permitted to appreciate taking such sort of advance. This advance is not including the credit confirmation process. One additionally thing is that you have alternative to get brisk stores through these credits without vowing any security. cash advance loans

marko said...

On normal, a client will pay $30 per $100 advance. On the off chance that you are taking a gander at a bank overdraft charge of $35 or a late Visa installment expense of comparative worth, then you could secure your ledger with $200 loan for less cash. On the off chance that you are one who piles on various bank or leaser expenses, the reserve funds is monstrous. cash advance

Onik Hasan said...

In the event that you have to acquire cash yet have poor credit, don't lose hope. A great many people can fit the bill for some kind of individual credit paying little heed shockingly history. Realize where to search for an individual credit, and what financing alternatives are accessible on the off chance that you have sub prime credit. chicago auto title loans online

marko said...

A major piece of the battle to pay down obligation is to keep new obligation from collecting somewhere else. The individuals who utilization Mastercards may concentrate on paying irregular yet utilize a second card to keep up somewhere else. payday loans

MUSA77 said...

In the event that an individual was gone on to court because of the defaulted improvement, the middle expense of harms owed was well more than 3 times the beginning credit total. Between tenet fairness, charges, intrigue and court costs, a transient credit twisted up being truly stinging. Cash Advance San-diego

sojib hossain said...

Along these lines, there will be no amazements with regards to paying back your credit without bothers. Keep in mind that numerous individuals utilizing vehicle title credits are doing this if all else fails or as a transient answer for getting fast money, and you absolutely would prefer not to get included with any budgetary loan specialist who could exploit your monetary circumstance. You ought to dependably look for the administrations of different experts for lawful, record and assessment guidance before you sign anything. Auto Title Loans Chicago

JON said...

Like other transient advances, the title characteristics too are liberal inferable from the higher interest rate. Title credits fulfill passing needs. Right away at this very moment gets hold of points of interest, he pays the title progress and recovers the title to his auto. Cash Advance San-diego