Abstract
Nowadays, corporate systems are heterogeneous, with distributed pieces that collaborate to fulfill the requirements. Communication between autonomous components becomes a key aspect to maintain the quality of the architecture. As a consequence, remote APIs are in focus: the quality in their design might significantly impact the quality of the interacting components. We aim to assist practitioners with designing reusable APIs. We present 8 patterns: (i) “Flexibilize the Ingestion” that structures an API to provide seamless integration by accepting heterogeneous structures as input; (ii) “Enrich with Metadata” that adds a new layer containing metadata to the messages exchanged; (iii) “Agree on Meta Structure” that defines a common metadata structure among the communicating parts; (iv) “Plug the Processors In” that proposes decoupled but composable handlers for the data and metadata; then (v) “Embed Metadata”, (vi) “Configure Meta in Runtime” and (vii) “Configure Meta during Deploy” propose different settings for the placement and setting of metadata; and (viii) “Adapt the Ingestion” that includes an adapter dedicated to set the metadata for ingestion when it is impossible to change the original sender.