Building Persistable One-to-One Chat Application using Spring Boot and WebSockets

Amr Saleh
Javarevisited
Published in
6 min readAug 3, 2020

--

Photo by Miguel Á. Padriñán from Pexels

In the previous story, we studied a use case of server-sent events, for a uni-direction communication from server to client.

We also mentioned that WebSockets is bi-directional communication between server and client.

In this story, we will study a popular use case of WebSockets. We will be building a one-to-one messaging application, which allows users to send private messages to each other.

The below video demonstrates what we are going to build.

Introduction to WebSockets and STOMP

A WebSocket is a protocol that allows a two-way communication between server and client.

--

--

Amr Saleh
Javarevisited

I’m a software engineer who is passionate about software architecture and design. Enjoy coding in Java, Scala, and JavaScript.