Real-Time Communication: Implementing Websockets With Spring Boot

Thomas Kendall Articles, Development Technologies & Tools, Java, JavaScript, Spring Boot 3 Comments

When developing web applications, we sometimes need to push server events down to connected clients. However, HTTP was not designed to allow this. To get around this limitation, a polling pattern was established where web pages would intermittently poll the server for any new events. This pattern was not ideal as it added HTTP overhead, was only as fast as the polling rate, and caused unnecessary load on the server.

Luckily, with the emergence of HTML5 came the WebSocket. The WebSocket protocol enables interaction between a browser and a web server with lower overheads. In this blog we’ll introduce the Websockets API and show how to implement Websockets with Spring Boot.

API Development Services

We specialize in developing robust, well-documented APIs that serve as the backbone of enterprise applications. Whether you’re building new digital products, modernizing legacy integrations, or enabling secure access to your data, our expert developers help you design and implement APIs that are reliable, scalable, and built to last.

Python Consulting & Custom Software Development

Home→Search ResultsPython Consulting & Custom Software   100% U.S.-Based Vetted Employee Consultants At Keyhole Software, we provide end-to-end Python development services to help organizations build, modernize, and scale software solutions with confidence.  Learn About PythonLet’s TalkPython Consulting Services Whether you’re developing a new web application, automating business workflows, or modernizing legacy systems, our experienced consultants bring the technical expertise and …

Angular Software Development & Consulting Services

Keyhole Software provides expert Angular development services to help businesses build, modernize, and scale their applications. Whether you’re starting a new project, enhancing an existing Angular app, or migrating from another framework, our experienced consultants deliver tailored solutions to meet your business goals…

Updating Microservices with Netty 5, Kafka 3, and React: Whirlpool Revisited

John Boardman Articles, Development Technologies & Tools, Java, JavaScript, Microservices, React Leave a Comment

Back in 2015 and 2016, I wrote two blogs that went step by step to develop a microservice/Netty architecture with fully working code called Whirlpool.

A lot has changed in the years since, so recently I decided to come back to the project, update it with the latest versions of Kafka and Netty, and add a React UI to it (rather than the vanilla JavaScript version it used before). In addition, I also added Windows Subsystem for Linux (WSL) scripts in addition to the Mac and Linux scripts that were there before and made all of the scripts more robust.

This blog will be about the work that went into all of those updates, plus a look at the new React UI. This provides an excellent view into what it takes to update an outdated microservices application implemented with Kafka (version .9 –>3.0) and Netty (4.1.3->5.0.0-alpha2), bringing all versions up to date and adding a React UI. By the end youโ€™ll be familiar with the latest versions of these frameworks, know some โ€œgotchasโ€ to avoid, as well as understand how to integrate WebSockets into React.