Related Pattern Languages

Other pattern languages that you might to want to take a look at.

Language Overview Our Book

We also discuss related pattern languages in our API design patterns book.

Distribution and Remoting

The design of message-based remote APIs can benefit from many existing pattern works on various kinds of distributed systems, especially those related to services, as well as pattern works related to API design (e.g., API design in object-oriented programming) and enterprise integration.

In POSA vol. 4, Buschmann et al. Buschmann, Henney, and Schmidt (2007) introduce a pattern language that glues together patterns from many different pattern languages on distributed systems, ranging from architectural concerns to low-level design details of distributed systems. The Remoting Patterns language Voelter, Kircher, and Zdun (2004) specifically deals with the Broker-based design and the internal details of a middleware but also covers API-related aspects like remote objects, servants, lifecycle management at runtime, and asynchronous invocations. Asynchronous invocation plays a central role in message-oriented middleware and is covered in depth in Enterprise Integration Patterns (EIP) Hohpe and Woolf (2003). While the EIP book focuses on asynchronous messaging systems, it also covers some aspects of message-based API design. In his general treatment of enterprise application architecture, Fowler Fowler (2002) touches on many aspects of remote API design such as Remote Facades or Data Transfer Objects (DTOs). Similarly, Evans Evans (2003) covers functional API design with some of his Domain-Driven Design (DDD) patterns such as Bounded Context, Aggregate, and Service. Even basic design patterns Gamma et al. (1995) are relevant for remote API design, as they can be useful for some design aspects such as introducing a Facade or a Proxy in the API. We adopt and refine such patterns for message-based remote APIs.

Data Modeling

General data modeling patterns Hay (1996) cover data representations and meaning, but do so in the context of data storage and presentation (rather than data transport); therefore, the discussed forces and solutions to them differ from ours. Domain-specific modeling archetypes for enterprise information systems also can be found in the literature Arlow and Neustadt (2004). Neither the general nor the domain-specific data model catalogs introduced in these two books cover the specific aspects of data representation in message-based remote API communication.

Service-Orientation

Services provided by message-based remote APIs can be seen as components with remote interfaces. Such components and distributed objects are covered by the pattern languages listed above. More specifically, the work by Daigenau Daigneau (2011) provides patterns for service-based designs at the level of existing service platforms and technologies such as both REST and WSDL/SOAP-based Web services. Contract versioning for backward compatibility is one of the problem sets that is addressed in this book. In contrast, process-driven SOA patterns Hentrich and Zdun (2011) reside on a higher abstraction layer. They describe orchestrations of services based on business process or workflow engines. SOA Patterns by Arnon Rotem-Gal-Oz is largely SOA infrastructure- and platform-centric as well Rotem-Gal-Oz (2012); his patterns do not investigate message content and structure in depth.

Many other forms of interactions or message exchanges can be summarized by service interaction patterns Barros, Dumas, and Hofstede (2005). Basic and advanced conversations such as Polling are covered in the ongoing work on a Conversation Patterns language Hohpe (2007) that discusses stateful interactions composed of multiple message exchanges between loosely coupled services. In addition, Pautasso et al. Pautasso, Ivanchikj, and Schreier (2016) describe conversations specific to RESTful services. The application of the interface representation patterns from this paper is closely related to the application of conversation patterns and vice versa: Each message exchange in a conversation requires request and response messages which need interface representations. Coarse-grained APIs often are used in simple conversations, whereas fine-grained ones lead to more chatty conversations.

Emerging distributed system architectures like cloud computing and the microservices approach to service-based systems Lewis and Fowler (2014) require many distributed system patterns to build remote APIs, but also bring their own patterns or flavors of related patterns with them Richardson (2018). The Data Abstractor pattern in Fehling et al. (2014) is an example.

Also complementary to our patterns, Kyle Brown and his co-authors share work-in-progress “Cloud Adoption Patterns”. The evolution of this pattern language and the tooling are explained in a blog post on Medium.

Other Sources

Complementary to pattern languages, platform-specific best practices and design guides have also been published, e.g., recipes in a RESTful HTTP Cookbook Allamaraju (2010) and decisions required in Web services design and related best practices Zimmermann, Tomlinson, and Peuser (2003).

 

References

Allamaraju, Subbu. 2010. RESTful Web Services Cookbook. O’Reilly.
Arlow, Jim, and Ila Neustadt. 2004. Enterprise Patterns and MDA: Building Better Software with Archetype Patterns and UML. Addison-Wesley.
Barros, Alistair P., Marlon Dumas, and Arthur H. M. ter Hofstede. 2005. “Service Interaction Patterns.” In Business Process Management, 3rd International Conference, BPM 2005, Nancy, France, September 5-8, 2005, Proceedings, 302–18. https://doi.org/10.1007/11538394_20.
Buschmann, Frank, Kevlin Henney, and Douglas Schmidt. 2007. Pattern-Oriented Software Architecture: A Pattern Language for Distributed Computing. Wiley.
Daigneau, Robert. 2011. Service Design Patterns: Fundamental Design Solutions for SOAP/WSDL and RESTful Web Services. Addison-Wesley.
Evans, Eric. 2003. Domain-Driven Design: Tacking Complexity in the Heart of Software. Addison-Wesley.
Fehling, Christoph, Frank Leymann, Ralph Retter, Walter Schupeck, and Peter Arbitter. 2014. Cloud Computing Patterns: Fundamentals to Design, Build, and Manage Cloud Applications. Springer.
Fowler, Martin. 2002. Patterns of Enterprise Application Architecture. Addison-Wesley.
Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. 1995. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley.
Hay, David C. 1996. Data Model Patterns: Conventions of Thought. Dorset House.
Hentrich, Carsten, and Uwe Zdun. 2011. Process-Driven SOA: Patterns for Aligning Business and IT. Auerbach Publications.
Hohpe, Gregor. 2007. Conversation Patterns: Interactions between Loosely Coupled Services.” In Proc. 12th European Conference on Pattern Languages of Programs (EuroPLoP), 1–45. Irsee, Germany.
Hohpe, Gregor, and Bobby Woolf. 2003. Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. Addison-Wesley.
Lewis, James, and Martin Fowler. 2014. “Microservices: A Definition of This New Architectural Term.” https://martinfowler.com/articles/microservices.html.
Pautasso, Cesare, Ana Ivanchikj, and Silvia Schreier. 2016. “A Pattern Language for RESTful Conversations.” In Proceedings of the 21st European Conference on Pattern Languages of Programs (EuroPLoP). Irsee, Germany.
Richardson, Chris. 2018. Microservices Patterns. Manning.
Rotem-Gal-Oz, Arnon. 2012. SOA Patterns. Manning.
Voelter, Markus, Michael Kircher, and Uwe Zdun. 2004. Remoting Patterns - Foundations of Enterprise, Internet, and Realtime Distributed Object Middleware. Wiley.
Zimmermann, Olaf, Mark Tomlinson, and Stefan Peuser. 2003. Perspectives on Web Services: Applying SOAP, WSDL and UDDI to Real-World Projects. Springer.