fastest way to execute server development cycle?

Need help? Post your questions here.

Moderator: moderators

fastest way to execute server development cycle?

Postby Funktopus » Sun Jan 15, 2012 2:58 am

Hi all,

I'd like to make some code contributions to Subsonic, particularly the server component. Prior to getting started, I was wondering what the fastest way is to execute the classical code/compile/test cycle. Packaging everything up to an installable after every change isn't an option as it pretty much contradicts the notion of fast turnaround times.

So I've already checked out the code and set things up within Eclipse. To my understanding, a Maven install run leads to a WAR file. Am I correct in assuming that in order to see how code changes behave, one would need an application server like Jetty and deploy that WAR file within? As of now, I've been dealing with standalone Java applications only that didn't need any third-party bootstrapping component like Jetty, so the development approach is not perfectly clear to me yet. I am particularly curious whether there's a way to take advantage of Eclipse's debugging capabilities (e.g., breaking at certain locations) in a most productive way when testing a new piece of Subsonic backend code.

Thanks in advance!
Funktopus
 
Posts: 11
Joined: Wed Jul 06, 2011 10:58 pm
Location: Munich, Germany

Re: fastest way to execute server development cycle?

Postby Funktopus » Sun Jan 15, 2012 11:26 am

Doing further investigations, I was able to answer the question myself. The solution is simpler than I initially thought.

Basically, you can fire up the Subsonic server directly from any IDE by starting the main method in the class net.sourceforge.subsonic.booter.Main (part of the subsonic-booter project). In Eclipse, you would create a new Debug Configuration and set things accordingly. Moreover, you may need to provide additional parameters to ensure flawless bootup such as:

  • Change the working directory to subsonic-main/target to allow the WAR file (created during the Maven build process) to be found.
  • Specify a different Subsonic home directory with -Dsubsonic.home=<new home directory> as the initial one requires root privileges on my Mac machine
  • Change the listening host with -Dsubsonic.host for security reasons
  • Change the listening port with -Dsubsonic.port as the initial port 80 requires root privileges too

Additional parameters may be required but this basic setup brings you to the initial login page when accessing http://<host>:<port>/subsonic/. I was able you set all parameters within Eclipse's Debug Configuration; it should be similarly feasible with other IDEs such as IntelliJ.

I'll try to add these instructions to the wiki as well.
Funktopus
 
Posts: 11
Joined: Wed Jul 06, 2011 10:58 pm
Location: Munich, Germany

Re: fastest way to execute server development cycle?

Postby BKKKPewsey » Sun Jan 15, 2012 3:00 pm

:D I am glad you could answer your own question as being a non-programmer (with modern stuff at least)
I was still trying to get me head around your original post :)
Hopefully that info should help somebody but if you put it into the wiki could you try to simplify it a bit if possible for us non-techies :?
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: fastest way to execute server development cycle?

Postby Funktopus » Sun Jan 15, 2012 3:45 pm

Hey there,

BKKKPewsey wrote::D I am glad you could answer your own question as being a non-programmer (with modern stuff at least)
I was still trying to get me head around your original post :)
Hopefully that info should help somebody but if you put it into the wiki could you try to simplify it a bit if possible for us non-techies :?


Still waiting for Sindre for approve my wiki edit privileges request. As soon as I get it, I will put together something on the wiki -- will try to be as comprehensible as possible.

If you don't mind I'll report back here once the wiki is updated and ask for you to proof-read regarding "non-techie compliance". :-)

Cheers,

funktopus
Funktopus
 
Posts: 11
Joined: Wed Jul 06, 2011 10:58 pm
Location: Munich, Germany

Re: fastest way to execute server development cycle?

Postby BKKKPewsey » Sun Jan 15, 2012 5:14 pm

Be happy to - remember no words with more then 3 syllables :lol:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom


Return to Help

Who is online

Users browsing this forum: No registered users and 17 guests