appengine-modules-sample-java icon indicating copy to clipboard operation
appengine-modules-sample-java copied to clipboard

How do you suggest making development bearable with this setup?

Open mufumbo opened this issue 11 years ago • 7 comments

I have a 6 module setup and it takes more than 2 minutes to compile everything and run all the servers.

How would you suggest to make development bearable with this kind of setup? I'm at the point of migrating the HTML building frontend part to PHP and accessing this bulky module setup by API.

thanks

mufumbo avatar Feb 16 '14 01:02 mufumbo

Hi, Can you share more details on the performance? Is it compilation time? Maven access to dependencies? Server boot time?

The output of a build/run might help... On Feb 15, 2014 5:19 PM, "Rafael Sanches" [email protected] wrote:

I have a 6 module setup and it takes more than 2 minutes to compile everything and run all the servers.

How would you suggest to make development bearable with this kind of setup? I'm at the point of migrating the HTML building frontend part to PHP and accessing this bulky module setup by API.

thanks

Reply to this email directly or view it on GitHubhttps://github.com/GoogleCloudPlatform/appengine-modules-sample-java/issues/5 .

ludoch avatar Feb 16 '14 09:02 ludoch

All combined. Compilation take a long time due to JDO enhancement and creation of jars. Averages 7 seconds per module. (I use the latest macbook pro)

Then, running the ear takes an extremely long time to create the wars (duplicate the entire work done in the past task).

Then, finally, running each jetty for each module takes a long time.

mufumbo avatar Feb 16 '14 09:02 mufumbo

OK... Willing to invest there.... Do you have JDOs in all the 6 modules? Maybe we can optimize things there? Do you have a feeling the 6 modules start in sequence or in parallel? Which step would benefit from optimization according to you? Do you need all 6 modules up when developing or could you develop only a subset of them? We need to find a way to optimize this type of dev workflow...

On Sun Feb 16 2014 at 1:56:22 AM, Rafael Sanches [email protected] wrote:

All combined. Compilation take a long time due to JDO enhancement and creation of jars. Averages 7 seconds per module. (I use the latest macbook pro)

Then, running the ear takes an extremely long time to create the wars (duplicate the entire work done in the past task).

Then, finally, running each jetty for each module takes a long time.

Reply to this email directly or view it on GitHubhttps://github.com/GoogleCloudPlatform/appengine-modules-sample-java/issues/5#issuecomment-35181233 .

ludoch avatar Feb 16 '14 16:02 ludoch

Any update on this? I too have this problem when trying to split an application into two modules - copying the WARs into the EAR adds a lot of time to each startup. Any way to bypass this by somehow using the WARs where they are initially built, without an EAR?

GabiAxel avatar Feb 06 '15 13:02 GabiAxel

GabiAxel, I don't need to copy anything manually because I use Maven. I just do mvn clean install from the project root and then cd to the EAR directory to run locally mvn appengine:devserver or upload mvn appengine:update. Not sure if that helps, but I thought I'd share it in case.

mosofsky-netbase avatar Feb 06 '15 17:02 mosofsky-netbase

hey guys,

This was an old post.

In the meanwhile, the development got great again.

What we did:

  1. created an "admin" module that includes all the other modules.
  2. we use spring component scan, so all the other controllers and things are useable from the app.
  3. we use IntelliJ with this configuration: https://www.dropbox.com/s/3o6gxsz8cffnnym/Screenshot%202015-02-06%2009.38.10.png?dl=0
  4. notice "before launch"... "external tool copy resources to admin". This is required because we need to copy our velocity templates to the global module.

This setup allows us to run only one server directly from intellij (skipping maven slowness) and include the whole project. It takes 10 seconds to start and we can press command + f9 to hot deploy changes in templates and classes.

thanks rafa

On Fri, Feb 6, 2015 at 9:32 AM, mosofsky-netbase [email protected] wrote:

GabiAxel, I don't need to copy anything manually because I use Maven. I just do mvn clean install from the project root and then cd to the EAR directory to run locally mvn appengine:devserver or upload mvn appengine:update. Not sure if that helps, but I thought I'd share it in case.

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/appengine-modules-sample-java/issues/5#issuecomment-73278541 .

mufumbo avatar Feb 06 '15 17:02 mufumbo

Thanks for the answers.

@mosofsky-netbase that's what I tried, and the problem is that devserver is dependent on package, which builds each WAR and then copies it into the exploded EAR directory. That last copying operation is what adds some time to the process.

@mufumbo if I understand correctly, you don't really use modules in the sense of GAE and your result is a single GAE module-application, right? In my case I really need to use GAE modules because I want to have different scaling types for them.

GabiAxel avatar Feb 06 '15 20:02 GabiAxel