Someday I was thinking about reviewing some old projects with my current knowledge to see how much I’ve improved over time. I found an old project using WebSockets for a realtime chat, and after analyzing my code, I caught myself wondering: “How would I do this kind of project now?” With that in mind, I decided to start a new project using WebSockets to test my evolution, but I added a challenge: making the software work in a distributed way. Before starting the planning and development, I asked myself: “What kind of solution should I build?” Then I remembered something we developers do a lot in our day-to-day work: scrum poker meetings. So, I created an application with Node.js and Angular using Socket.io to handle this task. I set up everything to run inside a container with Docker Compose and used an Nginx server as a load balancer to test the distributed setup. Since socket connections could be established across different server instances, I needed a way for sockets in different instances to communicate. To solve this, I used the Redis adapter provided by Socket.io, which allows messages to be broadcast across all application instances. Without this feature, I would probably have used a message queue with topics (RabbitMQ, Kafka, etc.) to handle socket messages and deliver them to the correct clients in my cluster. This project was a great opportunity to revisit old concepts, explore distributed architectures, and challenge myself with real-world problems. It also served as my starting point with Angular, helping me get hands-on experience with a modern front-end framework. Overall, it strengthened my understanding of WebSockets, scaling applications, and showed how much we can grow as developers by reflecting on past work and applying new approaches. if you are curious about this project, you can check it in this repository on Github: https://lnkd.in/dDbj8c9c #nodejs #angular #socketio #docker

To view or add a comment, sign in

Explore content categories