Service Architecture Design Patterns

These pattern are useful when you are creating an API that will be called by 3rd party services or another software system.

These services are called from public networks.

Service-Oriented Pattern (SOP)

  • Discrete business services.
  • Use network to communicate.
  • HTTP, XML, SOAP, binary.
Business domain alignmentClients must handle slow, offline network
High abstractionCoarse interfaces
Discoverable, resilientMany harm performance
Allow 3rd partiesSecurity issues

Microservice Pattern

Like SOA but with fine grained services,

  • Services calling services
  • Can use fast private network
  • Deployed on multiple servers
ModularMust cope with slow, offline network
Reduced abstractionMore unanticipated cummunications
Discoverable, resilientHard to do transactions
Can use fast networkHard to test, debug, & deploy
Less coarse interfaces

Message-Bus Pattern

  • Services connected to shared data bus
  • Uses messages for communication
  • Supports discovery, failover
Easy to extendBus = single point of failure
Simple communicationCoarse communications
Very flexibleCan be slow
Easy to scaleHard to test, debug
Easy discovery, failover