Grails vs Spring Efficiency for REST

I created some REST endpoints using pure Groovy / Grails. At the moment, most operations are similar to CRUD.

I am starting to compare the performance of a Grails application with the equivalent Java / Spring application for the CRUD scripts that I created using JMeter. So, now I take a subset of the scripts that I implemented in Grails and ported to the main Spring MVC application.

I am very interested to see performance comparisons published by other users on the Internet. Can anyone refer to me?

Any other information regarding testing and analysis that I am going to do is welcome. Thanks!


UPDATE REGARDING THE ANSWER :

  • @Lari answers below, citing a site with extremely complex tests, comparing Grails 2.X vs Spring 4.X (see README.md), in addition to many other frameworks.
    • However, these tests have Grails running on Resin , and Spring running on Tomcat . A bit strange for me, since Grails uses Tomcat by default.
    • Resin and Tomcat may have similar performance .
  • The website has several sections (tabs at the top) and even subsections (tabs in the "Results" area). My initial question was about the behavior of web services for REST. To do this, here are the top-level sections that answered my question:
  • If you're interested in rendering HTML, check out the Fortune Cookie example.

Not surprisingly, Spring is better, but as @Joshua points out, this is a contrived example, and you will need to judge what to extrapolate from the results. Not to mention that Grails used Resin, and Spring used Tomcat. We hope that each server (Tomcat / Resin) has been configured similarly in terms of maximum threads, Java memory, etc.? Configuration files can be buried in the source code (if you find out, let me know).

I also install dummy applications for Spring 4.X vs Grails 2.X, with Tomcat configured the same way (both used the same standalone Tomcat installation, not the one bundled with Grails). In my tests, I performed an HTTP GET and returned a JSON array that was generated using static (previously created) objects in memory (without a database request). My results also showed better performance for Spring (sorry, I can no longer find my data!). I used Spring Boot to quickly add a Spring application, and Grails already has a default stage.

+7
java performance spring grails groovy
source share
2 answers
+3
source share

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

+1
source share

All Articles