Referenced by the official spring-framework docs


It’s important to understand that HTTP is used only for the initial handshake, which relies on a mechanism built into HTTP to request a protocol upgrade (or in this case a protocol switch) to which the server can respond with HTTP status 101 (switching…

1. Publish / Subscribe Messaging

Publish / Subscribe Messaging is a pattern that is characterized by the sender(publisher) of a piece of data(message) not specifically directing it to a receiver. Instead, the publisher classifies the message somehow, and that receiver(subscriber) subscribes to receive certain classes of messages. …

✓ Single Responsibility Principle

There should never be more than one reason for a class to change

  • focuses on a single functionality
  • addresses a specific concern


  • Protocol Change: http -> https
  • Message Format Change: json -> xml
  • Communication Security Change: authentication

There is three separate responsibilities then we should have three separate classes…

Alex Won

Backend & Blockchain Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store