Interoperability.
WHAT OPTIONS EXIST
Network APIs, over HTTP or another protocol Message queues Shared databases Foreign function interfaces, calling compiled code directly Command-line invocation Files
WHAT TO PREFER BETWEEN SERVICES
A defined network API, with a documented contract.
WHY
It decouples them, and either side can change independently.
WHAT TO AVOID
Sharing a database between services.
WHY
The schema becomes a shared dependency nobody can change.
WHAT A FOREIGN FUNCTION INTERFACE PROVIDES
Calling a library written in another language directly, in the same process.
WHAT IT SUITS
Performance-critical work, and using existing mature libraries.
WHAT IT COSTS
Complexity, and faults in the called code affecting your process.
WHAT TO DEFINE FOR ANY INTERFACE
The data format Error handling Versioning
WHY VERSIONING
Because one side will change before the other.
WHAT TO TEST
Both sides, against the contract.