Chapter 5. Integration Design Patterns in OpenWhisk
We have already explored some of the common and built-in patterns in OpenWhisk, which are useful for implementing single actions. In this chapter, we’ll explore patterns that are useful for integrating different actions and interacting with users. We continue the implementation of some classical “Gang of Four” design patterns and also cover the ubiquitous Model-View-Controller pattern implemented for OpenWhisk.
In Figure 5-1 we can see the patterns covered in this chapter and the previous chapter:
-
Singleton
-
Facade
-
Prototype
-
Strategy
-
Chain of Responsibility
-
Command
-
Bridge
-
Proxy
-
Adapter
-
Observer
-
Composite and Visitor
-
MVC
Figure 5-1. A contact form example covering many design patterns
Tip
The source code for the examples of the design patterns (this chapter and the previous chapter) are available in the GitHub repository.
Integration Patterns
In this section we discuss the patterns commonly used to connect different systems. These include:
- Proxy
-
Used when you want to keep the same interface to a system but change the details at the implementation level
- Adapter
-
Used for adapting requests from one interface to a system to another.
- Bridge
-
Used when you want to define a common generic interface to a class of systems and then specify different implementations for each case
- Observer
-
Used when you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access