Chapter 21

Enhancing Interprocess Communication

In This Chapter

  • Acknowledging problems with distribution
  • Separating the components for communication
  • Using a dispatcher
  • Publishing change notifications and updates

You need to solve many problems when you build distributed systems — portability, modularity, location transparency, and consistency of communication among components. This chapter presents three design patterns that help you overcome these challenges.

In the first two sections, I tell you about two patterns that address the problem of location transparency. Forwarder-Receiver tackles the issues of transparency and portability by encapsulating the details of communication into specific components. Client-Dispatcher-Server adds an intermediate layer to connect the client and server components transparently.

In the last section, I discuss the Publisher-Subscriber pattern, which helps you address the component-consistency problem. It's closely related to (some people think indistinguishable from) the Observer pattern in Design Patterns: Elements of Reusable Object-Oriented Software, by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (Addison-Wesley Professional).

images

I don't focus on the details of the communications, such as what protocols are actually in use, because these patterns apply to any kind of interprocess communication (IPC) method that you choose. ...

Get Pattern-Oriented Software Architecture For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.