Closed markusjura closed 8 years ago
The current implementation is combining multiple service interfaces of the same sbt project into one single bundle with different service names:
payment-impl
with
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?
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.
In the Lagom status call we decided to go for the current implementation that each sbt project equals one bundle.
LGTM
Great stuff! And really close to be ready to merge.
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
@markusjura Glad that it works!
Update
Added cassandra bundle configuration. For the entire project one cassandra configuration is created. This configuration can be used to load and run a casssandra DB on ConductR. Note that each project uses it own keyspace (as in dev mode):
sbt cassandra-configuration:dist
conduct load cassandra cassandra-configuration-{hash}.zip
conduct run cassandra
conductr-bundle-lib
and sbt-lagom-bundle
so that the user only need to enable sbt-lagom-bundle
as a plugin. No additional settings or configuration are needed to get started with ConductRLagomBundleKeys.endpointsPort
settings key to specify the port of a service endpoint. Default is 9000.Notes
TODO
conductr-bundle-lib
and lagom
dependency once they are publishedLGTM
Review comments have been incorporated.
Ready for review!
Notes
TO BE REMOVED: Local Usage with Lagom helloworld project
. This section should be used to test this version with a Lagom sample project. The README sectionUsage
isn't working yet because the version1.0.0
is not yet releasedsbt-bundle
version which is not yet released and therefore need to be published locally (instructions are documented in the README). The pendingsbt-bundle
PR is https://github.com/sbt/sbt-bundle/pull/59TODOs
. Mainly the Lagom version need to be changed (a local SNAPSHOT version is currently used) and the Play snapshot resolver need to be removed once Lagom is using an official Play release