Patrick
There is not any drought, to say I used javaScript (React, Node - Express) to build the project but this time JavaScript is not only in the picture. Alternatively, I used Redis as a database. Ultimately, my tech stack for the project is RERN (Redis, Express, React, Node).
As the application is all about broadcasting the code to all the clients at the same time, syncing all clients so I used for the real time communication between the browsers. React, Node & express are the usual things for me, I have pretty much worked on it multiple times, but and were totally new to me for this project. So, I will be talking more about redis and in this blog.
Why did I choose the RERN stack ?As redis is the one of the fastest database databases and It would be the perfect choice for the real time application where users want to save and retrieve the code within a second. Also, redis allows us to cache the api response so, maybe in future I'll be implementing the redis cache .
Learnings 📰As I already mentioned, redis and socket io were completely new for me, so It was very fun exploring them. The one word answer for the question is redis and web-socket - Oh ! those two words .. BTW, in this section I'm not just limiting myself to only those two words. I'll be throwing more than 2 big paragraphs .
Web Socket is bidirectional, a full-duplex protocol that is used in the scenario of client-server communication, unlike HTTP it starts from ws:// or wss://. It is a stateful protocol, which means the connection between client and server will keep alive until it is terminated by either party (client or server). After closing the connection by either of the client and server, the connection is terminated from both ends.
Patrick is a newbie