4 ms·
I was surprised by this: "Worst of all, imagine this: you've just started an internship at a tech company with a microservices-based architecture. When service
by tyingq 5y ago
I was surprised by this:
"Worst of all, imagine this: you've just started an internship at a tech company with a microservices-based architecture. When service A initiates a message to service B, one of them is called the "upstream", and the other is the "downstream". Which one is which? There's no inherent direction, so even within the industry, people don't agree!"
For me, upstream always means "toward the original caller", or "toward the customer/person with the web browser". I had never heard his linked example of something thinking they were "calling an upstream function". If you're the caller, you are upstream from what you're calling.
Is that just me?
- gnabgib 5y agoSo it sounds like you're using the service communication to mean the stream? Although "toward the original caller" suggests that two inter communicating services would be flip-flopping for ownership of "upstream". Aardvark calls Bear, Aardvark is upstream, Bear calls Aardvark.. Bear is upstream. Stream could also refer to data (upstream=original/raw, downstream=processed/final), the overall process stage (upstream=prior stage, downstream=next stage - this requires knowledge of the system architecture, the stage boundaries are likely business-defined), some business term (eg in energy upstream=energy producer, downstream=consumer). A stream and the messaging direction may not match.
- tyingq 5y agoI agree with that, but in this case, the author had already scoped it down to services calling other services in a "microservices" context. And even if the call graph is a->b->c->a->b, I can still say up/down if I give the context of which invocation. I'm hoping people don't do that much in real life though, too easy to recurse.
- nkurz 5y agoIf I'm understanding you right, I think I had equal confidence in the opposite direction. In my mind, responses always flow downstream. It's obviously not just you, but at this point I think the right conclusion is the concept is too conflicted to be used unless one is speaking to a small group who has already agreed on a local definition. What I'm not sure yet is whether the terminology is equally conflicted when talking about open-source projects. If one project depends on another, do we agree that the dependency is downstream of the original? That is, does everyone still agree that the official Linux Kernel is upstream of all Linux distributions? Or do some people view the patches to the kernel as being sent downstream?
- notacoward 5y agoThe main use I've seen for "upstream" vs. "downstream" is in reference to dependencies between projects - often one or more open source "upstream" projects feeding into a combined/enhanced for-pay "downstream" product. For that reason alone, I think using the same terms in a messaging context is a bad idea.