typesafehub / sbt-lagom-bundle

Other
0 stars 5 forks source link

Version 1.0 #1

Closed markusjura closed 8 years ago

markusjura commented 8 years ago

Ready for review!

Notes

markusjura commented 8 years ago

The current implementation is combining multiple service interfaces of the same sbt project into one single bundle with different service names:

results into one single bundle with the following bundle.conf (old format):

endpoints = {
  "credit" = {
    bind-protocol = "http"
    bind-port     = 0
    services      = ["http://:9000/credit"]
  },
  "debit" = {
    bind-protocol = "http"
    bind-port     = 0
    services      = ["http://:9000/debit"]
  }
}

Based on the corresponding design doc we should instead create a separate bundle for each service interface. With that the user would also need to specify additional configuration in the build.sbt (see the doc).

With ConductR both approaches are possible. I feel that Lagom should configure ConductR only in one way and don't give the user the choice (at least not in the MVP) to either put all service interfaces of a sbt project into one bundle or to create separate bundles for each service interface in one sbt project. So the questions is if we either:

I personally found the first approach more natural.

@huntc @jroper @dotta @patriknw: WDYT?

huntc commented 8 years ago

I'm with you.

On 11 Feb 2016, at 9:01 PM, Markus Jura notifications@github.com wrote:

The current implementation is combining multiple service interfaces of the same sbt project into one single bundle with different service names:

sbt project: payment-impl with CreditService --> Descriptor.named("/credit") DebitService --> Descriptor.named("/debit") results into one single bundle with the following bundle.conf (old format):

endpoints = { "credit" = { bind-protocol = "http" bind-port = 0 services = ["http://:9000/credit"] }, "debit" = { bind-protocol = "http" bind-port = 0 services = ["http://:9000/debit"] } } Based on the corresponding design doc we should instead create a separate bundle for each service interface. With that the user would also need to specify additional configuration in the build.sbt (see the doc).

With ConductR both approaches are possible. I feel that Lagom should configure ConductR only in one way and don't give the user the choice (at least not in the MVP) to either put all service interfaces of a sbt project into one bundle or to create separate bundles for each service interface in one sbt project. So the questions is if we either:

Create one bundle per Lagom sbt project OR Create one bundle per service interface (which means that the user need to specify additional config in the build.sbt) I personally found the first approach more natural.

@huntc @jroper @dotta @patriknw: WDYT?

— Reply to this email directly or view it on GitHub.

markusjura commented 8 years ago

In the Lagom status call we decided to go for the current implementation that each sbt project equals one bundle.

patriknw commented 8 years ago

LGTM

dotta commented 8 years ago

Great stuff! And really close to be ready to merge.

markusjura commented 8 years ago

Now the api tools library dependency is pulled in by using the scala binary version of the Lagom project:

libraryDependencies += "com.newco.lagom" % s"api-tools_${scalaBinaryVersion.value}" % "0.1.0-SNAPSHOT" % apiToolsConfig
dotta commented 8 years ago

@markusjura Glad that it works!

markusjura commented 8 years ago

Update

Notes

TODO

huntc commented 8 years ago

LGTM

markusjura commented 8 years ago

Review comments have been incorporated.