These are chat archives for spring-cloud/spring-cloud

20th
May 2016
Pedro Vilaça
@pmvilaca
May 20 2016 10:00
@jenssaade @kakawait regarding the discussion that you had here.. there is one thing that is hard when we’re talking about a microservices architecture
that is the use of differents databases
and keeping the consistency of the data
if you have related data in different databases
Jens Saade
@jenssaade
May 20 2016 10:00
I read Kenny’s approach in his latest blog entry
he used event sourcing
how did you approach it?
Pedro Vilaça
@pmvilaca
May 20 2016 10:03
we’re just starting.. but the current apporach isn’t good
we’re suffering a bit because we need to migrate a monolitich app
and all the data is in a single database
so, we ended up refactoring the schema
and with a single database
that has connections from multiple services
we don’t have distributed transactions
but the database is shared at the moment
Jens Saade
@jenssaade
May 20 2016 10:05
yes, untangling a monolith is not that easy, I am trying as well on an older project of mine
Pedro Vilaça
@pmvilaca
May 20 2016 10:07
but sharing a database between services is a mess :|
Thibaud Lepretre
@kakawait
May 20 2016 12:06
@pmvilaca distributed data consistency is a big deal on distributed architecture (not only microservices). Actually there is not many way to achieve a perfect data consistency: distributed transaction (never used but everybody say that is a pain!!), CQRS (event sourcing). Because even if you share database you can't share transaction on two different microservices, so it's partially consistent... The question you should ask before starting really complicated thing is: do I really need an fully consistency? Can I not use eventually consistence instead? On monolith application transaction is easy and close free to use, so it's easy to add consistency everywhere even where is not really mandatory. I met Werner Vogels (CTO amazon) and he said me that it less costly to have some inconsistence on some part, client service will treat the rare case of inconsistence with client rather than providing a fully consistence on every part. To conclude do you think about eventual consistence?! But try to find other advice, I'm currently on same case of you, we are trying to migrate monolith app to microservices so do not use microservices in production yet!
Włodzimierz Rożkow
@rozhok
May 20 2016 14:49
sup guys, quick question – is there a simple way to customize Zuul exception when downstream service is not available? At least pass missing service name for verbosity.
didn't dig a much into it yet, maybe someone done this research already
at the moment is says something like this:
{
    "timestamp": 1463755512435,
    "status": 500,
    "error": "Internal Server Error",
    "exception": "com.netflix.zuul.exception.ZuulException",
    "message": "GENERAL"
}
I think @ControllerAdvice with @ExceptionHandler(ZuulException.class) will work....
Robert Van Voorhees
@voor
May 20 2016 15:47
Is there a dedicated room for Spring Cloud Stream?
David Welch
@dwelch2344
May 20 2016 16:04
Is there a way to disable the entries in /health for refreshScope and hystrix?
Dave Syer
@dsyer
May 20 2016 16:12
@dwelch2344 usually there is a health.*.enabled. You might have to check the source code to be sure.
David Welch
@dwelch2344
May 20 2016 20:30
tried that based off the name, as well as looking at RefreshEndpointAutoConfiguration and HystrixAutoConfiguration
So @dsyer, the rest of spring boot seems to be configured under management.health.*.enabled – except for these two. Hystrix seems to be wired to health.hystrix.enabled (missing management. prefix) and refreshScope doesn't seem to be configured at all
Yeah, just confirmed redis and mail use that approach. If it sounds legit, I'll open an issue (and hopefully submit a PR)
Spencer Gibb
@spencergibb
May 20 2016 20:35
thanks @dwelch2344
David Welch
@dwelch2344
May 20 2016 20:44
Happy to be back in the channel :)
Hey, so, we're finding our dev cycles a little painful when testing across all our microservices (in regards to Hystrix and tripping circuit breakers when restarting the services)
obviously doing the majority dev via unit tests + mocks is a better setup, but there's times we want to throw some stuff together. Any advice @spencergibb on how best to be effective working across services?
Spencer Gibb
@spencergibb
May 20 2016 20:46
there’s a setting to force circuit breakers closed regardless. might be good for a dev profile.
David Welch
@dwelch2344
May 20 2016 20:47
the whole room just said "Oooo" – minion style
That'll help
How about parsing stack traces / keeping context / debugging HystrixCommand stack traces. Just a matter of learning how to read them best?
Spencer Gibb
@spencergibb
May 20 2016 20:48
https://gist.github.com/spencergibb/82fc4faf6a54614a8b91 this if for forceOpen, but there is something similar for forceClose.
David Welch
@dwelch2344
May 20 2016 20:48
Or is there a good way to translate / decode errors in a centralized place to make them more relevant?
Spencer Gibb
@spencergibb
May 20 2016 20:48
hystrix makes it hard for exceptions
David Welch
@dwelch2344
May 20 2016 20:49
we've noticed :( haha
we'll toy around in there
is there a way to make all hystrix commands open? (asked on gist for posterity)
Spencer Gibb
@spencergibb
May 20 2016 20:51
usually default instead of circuit name works
David Welch
@dwelch2344
May 20 2016 20:51
default covers all?
ah, so every circuit will inherit props from default?
neat
David Welch
@dwelch2344
May 20 2016 20:57
awesome. thx
btw, got a generic response about the SpringOne presentation. They said they'll announce by next Friday. Hope it works out now, as we've come a really long way since we submitted it and it should make for a good show
Spencer Gibb
@spencergibb
May 20 2016 20:59
yeah, that’s what I know too
David Welch
@dwelch2344
May 20 2016 22:58
arg yeah, our biggest gripe is not getting the stack trace out of those commands
doesn't seem to be a good spot to catch the exception and inspect it