by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Elijah Rippeth
@erip
eventually consistent greetings. :laughing:
Elijah Rippeth
@erip
Does it make sense to prescribe/recommend a repo structure?

My team has been really fond of something like this:

api
├── MyService.scala
├── domain
│   └── package.scala
├── events
│   └── package.scala
└── commands
    └── package.scala

which is really organizationally nice... not sure if that's how opinionated Lagom wants to be, though.

Similar thing for impl, but we have readsides, entities, etc.
Elijah Rippeth
@erip
Also, after taking the reactive systems courses that Lightbend offered, I've been wondering if it even makes sense to bundle domain in the api. I could seem the domain being a separate logical project.
that way the domain, api, and impl (infrastructure) are separated according to the hexagonal architecture
Elijah Rippeth
@erip
Oops, I also forgot exceptions in the api -- we have those, too. :smile:
Jules Ivanic
@guizmaii

eventually consistent greetings. :laughing:

:smile:

Does it make sense to prescribe/recommend a repo structure?

I have to write a blog post about that

To enforce some rules, we’ve “improved” (for us, at least) the Lagom layout
there’s more than api and impl for each services
then you can enforce that some code are isolated from each other
Elijah Rippeth
@erip
@guizmaii Yeah, I think domain, api, impl makes sense.
Jules Ivanic
@guizmaii
we also have dto (for Data Transfer Object, maybe a better name can be found. It sounds maybe too much JavaEE bullshit), which are our APIs data structures and we have messages which are our data structures transitings via Kafka
and maybe more. I forgot. I don’t work that much on that project these days
api depends on dto and messages but dto and messages don’t know each others
Jules Ivanic
@guizmaii
APIs data structures and data transiting throught Kafka don’t have the same lifrcycle constraints that why they should be strictly separated
Elijah Rippeth
@erip
Maybe I'll just create a g8 template
Ignasi Marimon-Clos
@ignasi35
just caching up with past conversations here. I like where the conversation is going TBH. Any recommendation from real-world use of lagom to help keep the code well organised and clean is worth evaluating. @guizmaii I’m looking forward to your blog post :-)
Jules Ivanic
@guizmaii
:+1:
Elijah Rippeth
@erip
I've definitely got a lot of TODOs recently from lagom, but I'll try to come up with a g8 template that reflects how I organize things. @guizmaii, I'd be happy if you wanted to work on it, too. Once it's in a good place, I can ping you, @ignasi35
Jules Ivanic
@guizmaii

@guizmaii, I'd be happy if you wanted to work on it, too

Ok let me know what you need

Sergey Morgunov
@ihostage
Hello, contributors! :hand:
I found excellent PR lagom/lagom#1187
Of course this feature undocumented. :smile: Have you not plans to remove it?
I very need this HandlerDef for HTTP filter. :pray:
Tim Moore
@TimMoore
@ihostage it won't be removed… it was introduced for cinnamon support. I didn't realize it would be useful for anything else :smile:
Sergey Morgunov
@ihostage
Thank you @TimMoore :+1:
Sergey Morgunov
@ihostage
Renato Cavalcanti
@renatocaval
@ihostage Lagom only allows to bind one service at userland level. The metrics is bound by default internally and because there is only one implementation, and it's not intended to be swapped, we bind it directly. Does it answer your question?
Renato Cavalcanti
@renatocaval
for information, I added the following integrations on this channel:
  • lagom/lagom
  • lagom/lagom.github.io
  • lagom/lagom-recipes
  • lagom/lagom-java-maven-chirper-example
  • lagom/lagom-java-sbt-chirper-example
  • lagom/online-auction-scala
  • lagom/online-auction-java
  • lagom/lagom-scala.g8
  • lagom/lagom-java.g8
  • lagom/akka-grpc-lagom-quickstart-scala
  • lagom/akka-grpc-lagom-quickstart-java
Jules Ivanic
@guizmaii
+1
Renato Cavalcanti
@renatocaval
GitHub activities on those channels will show up here (on right pane)
and not on lagom/lagom (users) as before
we will also get here all Travis activity for those same channels
Sergey Morgunov
@ihostage
:+1:
:point_up: September 24, 2018 4:39 PM @renatocaval Thank you! Now I think that the injecting MetricsService by implementation is normal case.
Ignasi Marimon-Clos
@ignasi35
:point_up: September 24, 2018 3:51 PM I think MetricsService may be removed some time in the future. It’s a service providing per-instance information so it’s weird to read that info via RPC (where you usually want to treat all instances/nodes equally). Instead, metrics should be pushed to an external aggregator to create some form of dashboard.
Sergey Morgunov
@ihostage
@ignasi35 Thank you! We will try to follow the updates MetricsService. Now we do the following. We subscribe to the stream of data from MetricsService and push data to an external MetricRegistry (+ graphite reporter).
Marcos Pereira
@marcospereira
Hum... okay so we had some failures in https://travis-ci.org/lagom/lagom/jobs/432892553. Will submit a pr to fix them now.
Ignasi Marimon-Clos
@ignasi35
@marcospereira I think the cron idea will not work as good in Lagom because of the validateDependecyWhitelist. As soon as Akka bumps a version the cron will be broken until Akka makes the release and Lagom bumps the release and fixes the whitelist.
Dale Wijnand
@dwijnand
Sounds like Marcos found a way to get an early warning. :)
Marcos Pereira
@marcospereira
:point_up: September 25, 2018 9:04 AM @ignasi35 validateDependencyWhitelist worked locally, but yeah, I was considering that too.
Marcos Pereira
@marcospereira
:point_up: September 25, 2018 7:49 AM here are the fixes: lagom/lagom#1604
Tim Moore
@TimMoore
@ignasi35 @marcospereira could you exclude the whitelist validation from the cron job?
Elijah Rippeth
@erip
Anyone know about this?
I know you all prefer discuss for Lagom questions, so I've been trying to tackle the StackOverflow questions. I'm not sure about this one, though.
Ignasi Marimon-Clos
@ignasi35
isn’t it ?
and also https://gitter.im/lagom/lagom?at=5bab622d8ddf5867dc772fef. (which I just posted). @erip feel free to copy/paste/adapt into SO.
:-)
Elijah Rippeth
@erip
So it is!
Sergey Morgunov
@ihostage
:point_up: September 26, 2018 1:36 PM The author is the same :smile: