7

I've been using java + spring on tomcat for the past 2 years and my app is getting notably huge. Start up time is now almost 3 minutes and it consumes a lot of resources during the development.

So I am interested in ideas how to make developing a software fun again. I've looked at Spring DM/Gemini blueprint to make it a modular but the experience was not convenient.

Now more modules are about to be added, thinking about developing it another web application and use Spring integration for messaging. Apparently, this will be a very painful experience to develop it on one desktop computer.

Has anybody any experience with cloud development? How do I improve all these time and resource consuming tasks? Will developing in the cloud help me?

beku8
  • 613
  • 1
  • 8
  • 22
  • Is the actual question related to cutting deployment time for tomcat running on your development machine? Have you looked into jRebel? – Affe Sep 18 '12 at 03:30

2 Answers2

8

First, take care of the bottlenecks. They have a tendency to creep into projects as they grow. The original design has been compromised again and again to meet insane deadlines and now bloat has killed a once lively application.

Do not guess at the problem but use real data to determine what is making you app slow. Use a profiler such as jProfiler: http://www.ej-technologies.com/products/jprofiler/overview.html

Next, use what you've learned to make the new modules more efficient. The bottom line is changing technology is not a fix all, as all technologies can present bottlenecks. You must find the reason behind the problem and fix that.

Once you fix the bottlenecks, you could create some test projects on a new technology to see if it is faster, easier, does what you need. But, chances are just fixing the problems on your current stack is all that is needed.

Todd Moses
  • 10,969
  • 10
  • 47
  • 65
  • Thanks for the comment, but I assume profilers have more to do with production performance rather than the development start up(which was the original question I intended to ask)? – beku8 Sep 18 '12 at 03:53
8

It is very common problem with typical java+spring web apps. With age they start getting bloated and Context Loading starts becoming painful. I can suggest a few pointers to mitigate the issue, but only you will be able to judge best for you depending on the what exactly goes in your app.

  1. Don't depend heavily on server while doing development. Write Unit tests and run them outside the servlet container. Spring has excellent support for this.

  2. Split you business logic in Rest/Soap web-services (judiciously and carefully). This gives you freedom of developing and testing the UI independent of core business logic.

  3. If using maven/gradle, try jetty plugin. It can keep scanning for changes and reloads the webapp automatically (I think tomcat plugin can do the same). It has ability to store session between restarts, so you are not affected by restarts. Please see this for more details How can I speed up Maven and Netbeans

  4. [Paid Option] may try JRebel.

  5. Use CI server, that keeps on integrating/testing/deploying your app, taking some load off your developers machines.

Community
  • 1
  • 1
kdabir
  • 9,623
  • 3
  • 43
  • 45
  • Thank you! Your answer is something I was looking for. I'm especially interested in CI server. So we are going to develop about two more separate spring applications. CI server will save me from the pain of running two parallel apps on my local computer(which still has a chance of NOT running successfully due to the resource limitation)? – beku8 Sep 18 '12 at 04:00
  • 1
    I'm glad it helped. CI Server will truly shine when you have good test coverage. CI server can keep on deploying the applications to a dev server and while developing on your local machine, you can point to common dev server when accessing functionality provided by other apps, so that you have to run only one application locally. – kdabir Sep 18 '12 at 04:12