4 ms·
Currently trying to debug some microservice based system: I read your text with red meat being the microservices. Things are always perfect when reading a simp
by arkh 8y ago
Currently trying to debug some microservice based system: I read your text with red meat being the microservices.
Things are always perfect when reading a simple blog post presenting the happy path. How to check what services are down, how to react to the fact, how to come back? Nah. The fact your µs RAM access just became ms network access? Don't care. Someone just decided to change the interface of their microservice so 2 others are not compatible anymore? That's just "microservice done bad". Being able to see the flow of things and add breakpoint where you need it? Nope.
It is funny to see this kind of problem when you've already experienced them in the embedded world with software components in cars or just in distributed computing.
Most application will never see the kind of scale where adding the kind of code and tools overhead have any RoI. So you end with products released too late or products so brittle you may has well not have launched.
- mlthoughts2018 8y ago> “Currently trying to debug some microservice based system: I read your text with red meat being the microservices.” This doesn’t make much sense, unless you’re debugging normal-to-high quality code microservices, and still find the code to be worse than average case monolith services.
- dagss 8y agoHe is explaining it further down! For instance, he cannot set a breakpoint and follow execution flow (because suddenly the flow resumes in another microservice) It seems from your comment that you assume one can always work with only one service, and not need to consider the whole system of services acting together. That is naive.
- mlthoughts2018 8y agoI do not assume you can work only with one service. But what you brought up from the parent comment about breakpoints makes no sense. It’s like complaining that someone mocked out a complex submodule in a unit test, so your breakpoint descends into a mock instead of the real thing. You’re mistakenly wanting the wrong thing. Testing that spans service boundaries is a known entity. Most of the time you want to be testing one service in isolation and mocking out any dependency calls it makes to other services. But in cases when you want to do integration or acceptance testing involving multiple live services, that’s fine too. You could for instance run the suite via something like docker-compose. But if you want the debugger to step through the internals of some effectively third party dependency, that’s just a poor approach to debugging. You need to mock that away and isolate whether the third party entity (whether it’s an installed package, separate service, whatever) is really to blame before descending to debugging in that entity. Imagine if someone is debugging a data processing pipeline task. It makes a service call to a remote database. You really think your debugger should follow the service call and step through the database’s code? That’s a terrible way to debug. That example extends perfectly well no matter what the service call is into, whether it’s local or remote, whether it’s in the same language or runtime or not...