Designing for Communication
- Communication means transferring information from somewhere to somewhere else.
- It can be broadly categories into two:
- Synchronous Communication
- When two parties communicating at the same time. Where one party send the information, second party process that information and first party waits for the response from the second party.
- Client thread is blocked during request.
- Easy to use.
- Asynchronous Communication
- When sender sends the information and doesn’t wait for instant reply, the transmission of data is not continuous and steady.
- Client thread is not blocked during request.
- Complex to use.
- Synchronous Communication
- Consider using asynchronous communication to increase the responsiveness, availability and scalability of your application.
- Consider using message-based communication when crossing physical or process boundaries; and object-based communication when in process (when crossing only logical boundaries).
- Identify patterns required in communication, common are:
- One Way, Two Way, or Duplex
- Unicast, Anycast, or Multicast
- Push or Pull
- Publisher/Subscriber
- Identify an appropriate transport protocol, such as HTTP for Internet communication and TCP for intranet communication.
- Ensure that you protect messages and sensitive data during communication by using encryption, digital certificates, and channel security features.