Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
ssrlxl
@ssrlxl
Mirco Dotta
@dotta
@yannickdeturck If youy have a reproducer please open a ticket on https://github.com/typesafehub/activator
@ssrlxl Follow lagom/lagom#1 for updates
Mirco Dotta
@dotta
@domdorn Have you seen http://www.lagomframework.com/documentation/1.0.x/Overview.html ? It provides some detail on how to run Lagom on a different orchestrator (but it’d require you/someone to provide a bit of code. It’s actually really not that much. See https://github.com/typesafehub/conductr-lib/tree/master/lagom10-conductr-bundle-lib for what we have done to integrate Lagom on ConductR)
Markus Jura
@markusjura

@gandhinath In ConductR logging is a feature which need to be enabled explictly. You can do that by starting the sandbox as:

sandbox run 1.1.2 --feature logging

This will run elastic-search and kibana as additional bundles. Make sure that you VM has sufficient memory. elastic-search uses 1 GB by default.

Afterwards you can retrieve logs of any bundle:

conduct logs my-bundle

The version 1.1.2 is the ConductR version itself. So it was correct to use 1.1.2 with the sandbox run command.

1.4.2 is the version of the sbt-conductr-sandbox sbt plugin. With this plugin it is possible to use the sandbox command directly from the sbt / activator session.

If you only use the conductr-cli from the terminal then it is not necessary to add sbt-conductr-sandbox to the project/plugins.sbt of your project.
Markus Jura
@markusjura
@gandhinath To summarize. Please start the sandbox with logging sandbox run --feature logging from the terminal, then load and run your bundle and afterwards do conduct logs my-bundle to see the log output.
Dominik Dorn
@domdorn
@dotta so you say, what conductr basically provides is a ServiceLocator (and other useful stuff), but to get running with lagom without ConductR, I would need to implement my own ServiceLocator (and deploy all the stuff my self of course)?
Mirco Dotta
@dotta
@domdorn Yes, if you would like to run Lagom services on some other runtime environment than ConductR, you’d need to provide an implementation of the Lagom ServiceLocator interface. Also, it should be possible to run a Lagom service “standalone”, outside of an orchestrator (I’ll add documentation for this as soon as I have a moment). Of course, this isn’t recommended (see the itemised list in http://www.lagomframework.com/documentation/1.0.x/Overview.html for the whys), but it’s possible.
Dominik Dorn
@domdorn
thx @dotta! I’ll try to reach a lightbend rep to get some prices for conductr. for client projects, it might be feasable to pay for conductr, for my personal pet projects, I might have to roll my own ServiceLocator
Mirco Dotta
@dotta
@domdorn Sounds good. Thanks a lot for the feedback!
Yannick De Turck
@yannickdeturck
@dotta Perhaps a silly question but what do you guys consider to be the major competitor for Lagom? Currently within our organisation the combination of Spring Cloud and Netflix OSS stack is gaining a lot of traction. Do you guys consider them to be a main rival for Lagom?
Mirco Dotta
@dotta
@yannickdeturck Yes, I’d consider that stack to be Lagom's main competitor. But I believe with Lagom we have a number of unique features that makes us shine (well, otherwise we wouldn’t have built it :-)):
1) Lagom’s development environment (IMO, a major productivity boost),
2) fostering good practices for building reactive services (Lagom is opinionated, e.g., async communication by default, ES/CQRS, …),
3) batteries-included, from dev to production.
4) I’m sure I’ve forgot something ;-)
Yannick De Turck
@yannickdeturck
Thanks for the info. Suppose you can also add the reactive nature to the list which is something that Spring wants to focus on more in upcoming versions
Mirco Dotta
@dotta
@yannickdeturck Yeah, that’s what I meant by "building reactive services” in 2) :-)
Also streaming is first-class (which again goes in the reactive side of things)
I’d also think that we have a more cohesive API. But can’t say for sure.
In fact, it’ll be great to get your feedback, if you have a chance to work with both :-)
Yannick De Turck
@yannickdeturck
Sure thing. We are interested in doing a comparison between the two. I have a colleague with extensive experience with Spring Cloud en Netflix OSS and I'm currently toying around with Lagom and the idea is that we want to do a side by side review
Markus Jura
@markusjura
:+1:
Mirco Dotta
@dotta
Awesome. Please, share the outcome!
Dominik Dorn
@domdorn
what i’ve seen is that spring cloud has a way where the service locator can poll for the app to be up & ready, while in lagom, the app tells the service locater “hey i’m ready” . I couldn’t find out how to make this “hey i’m ready” call without the lagom apis (I’m trying to integrate legacy apps (php and stuff), so a description on how to tell the servicelocator that the app is up would be necessary)
Yannick De Turck
@yannickdeturck
@domdorn I'm also interesting in that :)
@jroper Is also working on additional API to make it easier for a Lagom service to communicate with non-Lagom services
Markus Jura
@markusjura
@domdorn With ConductR you signal the application state with various supported libraries: http://conductr.lightbend.com/docs/1.1.x/SignalingApplicationState
Mirco Dotta
@dotta
right, I was getting there, thx Markus :-)
Markus Jura
@markusjura
@domdorn I'll provide you more information later on..
Need to leave for a couple of hours
Dominik Dorn
@domdorn
no worries, i’m busy with something else at the moment anyway ;)
Markus Jura
@markusjura

@domdorn The signaling that the application has started can be achieved in different ways:

  1. With one of the conductr-bundle-lib flavors. This is a library you add to your project that gives you an API to signal the application start. Supported languages frameworks so far are Java 8, Scala, Akka, Play, Lagom. Note that sbt-lagom-bundle automatically adds this library to your project.
  2. With the check command in the bundle configuration you can tell ConductR to check a certain task before starting the application. In this way you can achieve a similar polling mechanism as done in spring cloud with any kind of app. The bundle configuration provides samples how to create configurations for docker images and non docker images

Let me know if this is helping.

Dominik Dorn
@domdorn
sounds promising. thx
Markus Jura
@markusjura
A note to application polling vs. signaling application state. We believe that the latter one is more reliable. An application can be up and running and therefore reachable by the polling mechanism, but it might be the case that this application is not ready to handle incoming requests, e.g. if a initialization takes a bit longer. Therefore it should be the responsibility of the application to signal a certain state.
Dominik Dorn
@domdorn
well, that depends on the applications architecture. if you e.g. have a php application, creating such a call is not so easy, as the application itself has no “state”.. its just a bunch of files that are stored somewhere on the hdd.
so the polling approach is more suitable for this kind of microservice. but thats just a corner case.
Markus Jura
@markusjura
I agree, in this case you can use the check command of the bundle.conf.
Mirco Dotta
@dotta
@markusjura nice. @domdorn Here is a handy link https://github.com/sbt/sbt-bundle#settings
Markus Jura
@markusjura

To bring this in context. sbt-bundle is an sbt plugin that creates the bundle based on your defined settings in the build.sbt. A bundle consist of your application classes (e.g. jars) and a bundle.conf which is a configuration for the bundle. sbt-bundle is creating the bundle.conf for you.

If you are not in the context of sbt you can create the bundle.conf manually and then use shazar to create a bundle. shazar is part of the conductr-cli.

Dominik Dorn
@domdorn
thx guys!
another thing: in a classic CQRS setting, I have different DBs for writes (in lagoms case its cassandra) and read specific DBs for the use cases I need them.
Right now, the read database is also only cassandra. Especially for people that already have legacy applications, I think a few examples on how to plugin a SQL Database (creating event handlers, etc.) or other datastore (elasticsearch) would be helpful. else they might think “ok, i can only use this with cassandra, I don’t want to throw everything I already implemented away”
Patrik Nordwall
@patriknw
sounds good, please create issue, and contributions are welcome
Yannick De Turck
@yannickdeturck
@dotta I've been debugging my issue a bit more regarding my tests not being executed when running test under activator. I tried creating a new Lagom project and test under activator properly executed the tests. Tried stripping my own test lagom project to the bare minimum as provided when creating a new lagom project without success. After deleting every single target directory and rerunning test they did get executed though... Maybe something got messed up in there.
Yannick De Turck
@yannickdeturck
@dotta @schmitch Regarding the Immutables library and having target/scala-2.11/src_managed/main being correctly picked up by IntelliJ as being a "Source Folder". By default when importing a new Lagom project in IntelliJ that directory is not registered as a source folder. After including the Immutables library, creating an Abstract class, setting up the Annotations Processor and performing a rebuild in IntelliJ the target/scala-2.11/src_managed/main directory does get created now with the class based on your Abstract class. However the target/scala-2.11/src_managed/main directory is still not recognised as a source folder. In order to have IntelliJ recognise it as a source folder I had to reimport my project as an SBT project. So that's an alternative from having to manually un-exclude the target directory and marking target/scala-2.11/src_managed/main as being a Sources folder
Dominik Dorn
@domdorn
@yannickdeturck imho you should always import the projects using the build.sbt file... when something changes, just change a space in build.sbt and select "reload project"... that way, everything gets configured like it should be.. at least on my machine :)
Yannick De Turck
@yannickdeturck
@domdorn I think IntelliJ automatically reloads the project if your have "auto import" enabled right? At least it's not giving me the suggestion to reload the project. It doesn't seem to add the src_managed directory as a Source directory though
Screen Shot 2016-03-21 at 22.20.12.png
Dominik Dorn
@domdorn
yes, I always disable auto reload (i want to control when idea does that stuff)
Yannick De Turck
@yannickdeturck
That is how it looks to me atm, as you can see its not listed under "Sources"
And adding a space to build.sbt doesn't add it unlike reimporting the project as an SBT project :)