Grails vs Spring performance for REST

I've created some REST endpoints using pure Groovy/Grails. For now most of the operations are all CRUD-like.

I'm beginning to compare the performance of the Grails app to an equivalent Java/Spring app for the CRUD scenarios that I've made, using JMeter. So now I'm taking a subset of the scenarios I've implemented in Grails and porting to a basic Spring MVC app.

I'm very interested in seeing performance comparisons published by others on the web. Can anyone refer me to some?

Any other information in regards to the testing and analysis I'm going to do is welcome. Thanks!


UPDATE REGARDING THE ANSWER :

  • @Lari's answer below references a website with extremely comprehensive tests, comparing Grails 2.X vs Spring 4.X (see README.md), in addition to a multitude of other frameworks.
  • However, those tests have Grails running on Resin while Spring is on Tomcat . A little strange to me since Grails uses Tomcat by default.
  • Resin and Tomcat arguably have similar performance.
  • The website has several sections (tabs on top) and even subsections (tabs in the "Results" area). My original question was regarding web service behavior for REST. To that end here are the top-level sections that answered my question:
  • Querying multiple rows in a DB table (HTTP GET) and returning JSON array as result.
  • Modifying multiple rows in a DB table and returning JSON array as result. This test does not use HTTP PUT with a body, but instead HTTP GET. Scroll to bottom of page for details, and also Requirements page.
  • If you're interested in HTML rendering see the Fortune Cookie example.
  • Not surprisingly Spring is better, but like @Joshua points out, this is a contrived example and you will have to be the judge of what to extrapolate from the results. Not to mention that Grails used Resin while Spring used Tomcat. Hopefully each server (Tomcat / Resin) was configured similarly in terms of max threads, Java memory, etc? The config files may be buried in the source code (if you find out, let me know).

    I also setup dummy applications for Spring 4.X vs Grails 2.X, with Tomcat being configured exactly the same (both used the same standalone Tomcat installation rather than one bundled inside Grails). In my tests I performed an HTTP GET and returned a JSON array which was formed using static (pre-instantiated) in-memory objects (no DB query). My results also showed better performance for Spring (sorry I can't find my data any longer!). I used Spring Boot to slap a Spring app together quickly, and Grails already has scaffolding by default.


    There is http://www.techempower.com/benchmarks/ . The source code is at github.


    Take a look at this PLAY VS. GRAILS SMACKDOWN presentation. You can find some results of perfomance inside.

    链接地址: http://www.djcxy.com/p/78584.html

    上一篇: 请评论减慢R?

    下一篇: Grails vs REST的Spring性能