Search⌘ K

Explicit Context

Explore the concept of explicit context in system architecture to understand how it eliminates implicit dependencies between services. Learn how using clear identifiers instead of vague tokens enhances flexibility and testing, improves service communication, and supports modular, resilient distributed systems.

Implicit dependency

Suppose our service receives this fragment of JSON inside a request:

C++
{"item": "029292934"}

How much do we know about the item? Is that string the item itself? Or is it an item identifier? Maybe the field would be better named itemID. Supposing that it is an identifier, our service can’t do very much with it. In fact, only four things are possible:

  1. Pass it through as a token to other services. This includes returning it to the same caller in the future.

  2. Look it up by calling another service.

  3. Look it up in our own database. ...