Trampoline icon indicating copy to clipboard operation
Trampoline copied to clipboard

Switch to fully using Java Process API for running instances

Open jtwalraven opened this issue 6 years ago • 2 comments

It would be nice if the project did not have to rely on generating scripts to run other instances. The ProcessBuilder API has a way that the launching could be simplified and streamlined. This would also allow for additional future features:

  • waiting for the process to stop before restarting
  • force killing the process
  • observing the build logs
  • checking progress on launches.
  • etc.

@ErnestOrt I already have working code for this. Hopefully I will get to polishing it soon and making a PR.

jtwalraven avatar Mar 02 '18 04:03 jtwalraven

Completely agree @JTWalraven! If you feel you can improve it, do not hesitate to code.

I remember this part was giving too much troubles while developing it since remember It must be compatible with Windows and Unix.

Thanks&Cheers!

ErnestOrt avatar Mar 02 '18 20:03 ErnestOrt

Is it better to use the Java Process Builder API ?

Don't get me wrong, it probably is - I have not played around with it a lot.

I had been using spring-skipper at some point to do deployments on a windows machine (using the development-local-deployer).

See: https://github.com/spring-cloud/spring-cloud-deployer-local/blob/master/spring-cloud-deployer-local/src/main/java/org/springframework/cloud/deployer/spi/local/LocalAppDeployer.java#L464

I can't say I was happy with it. I know spring skipper is targeted for using the deployers to cloud infrastructures (e.g. docker, kubernities). The local deployer is targetted for development/testing.

But in any case, I commonly ran against problems like heap space or having to assign more memory to the deployer. At some point after deploying over 15 microservices (flatjars), new services wouldn't start. Additionally, when the deployer died, so did all the child instances.

I definitely guess these things can be fixed, and we didn't have the time. We went for a better solution. But definitely things to look out for.

menelaosbgr avatar Nov 07 '19 09:11 menelaosbgr