Delivery Hero Tech Hub

Teknoloji

Member-only story

What is Server-Sent Events (SSE) and how to implement it?

--

Server sent events(SSE) is a pushing technology that enables pushing notification/message/events from the server to the client(s) via HTTP connection.

While you are developing real-time projects, there is always a one-question mark on “how to send messages/updates from server to client”. We can talk about three different ways to perform server-to-client updates: Client polling, Web Socket, Server-Sent Events (SSE).

Client Polling

The client sends requests to the server at regular intervals for new updates. Although this technique is not used much nowadays, it can be preferred for some small-medium size projects. It is easy to implement. This technique does not provide a fully-real time system that depends on the request intervals.

In the polling technique, requests are sent and managed by the client side. Requests are sent by the client even if there is no update on the server.

Web Socket

Websocket is a very popular technology that provides bi-directional data transfer for client and server communication on real-time applications. Websocket is not based on HTTP protocol, so it requires additional installation and integrations to use it. It is difficult to implement compared to other technologies that…

--

--

Gökhan Ayrancıoğlu
Gökhan Ayrancıoğlu

Written by Gökhan Ayrancıoğlu

Software Engineer & Team Lead @Colendi • #Java • #Spring Boot • #Kotlin • #Microservices • https://gokhana.dev

Responses (4)