We built multiple microservices based on Lagom which are independently deployable, on our cloud setup we deploy like that, but on some onpremise setup it become and issue to run multiple Lagom Services in diff. process.
We were able to run multiple Lagom Based Applications in a Single Process by hacking into the Play class which stops one application if another is started by hacking into the Play scala:
val globalApp = app.globalApplicationEnabled
if (globalApp && _currentApp != null && _currentApp.globalApplicationEnabled) {
logger.info("Stopping current application")
stop(_currentApp)
}
I updated this to:
val globalApp = app.globalApplicationEnabled
if (globalApp && _currentApp != null && _currentApp.globalApplicationEnabled) {
logger.info("Stopping current application")
}
My question: is this right to do, what possible impact in lagom applications or any other way to up multiple services in a Single Process