Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DISCUSSION]: Server Side Events or Websockets? #45

Open
zakhaev26 opened this issue Mar 4, 2024 · 7 comments
Open

[DISCUSSION]: Server Side Events or Websockets? #45

zakhaev26 opened this issue Mar 4, 2024 · 7 comments

Comments

@zakhaev26
Copy link
Contributor

In light of recent discussions and insights, I'm reconsidering our decision to utilize SSE over Websockets for emitting scores to clients.

During a conversation with a senior colleague, they shared their experience building a product (Hubilo Studio) using Websockets, WebRTC,and a LOT more things, - capable of scaling and handling up to 1L~ concurrent users. This has prompted me to reassess our choice.

He emphasized that Websockets currently offer the most robust solution, particularly considering the ecosystem and industry trends. He highlighted that many companies are shifting towards Websockets for real-time communication due to the comprehensive support and scalability options available and OSS tools around it

Our initial concern (as we , @majorbruteforce and @me discussed ) was scalability for the GC server if we choosed ws. If viable solutions exist for Websockets, it seems prudent to explore them further. The broader support and resources available for it compared to SSE may offer advantages in terms of implementation and future maintenance.

I propose revisiting our technology stack decision and considering the potential benefits of adopting Websockets for our real-time communication needs,as most of the work in the core sections (majorly the crud apis,are completed).
Stuffs like auto-healing, handling backpressure, message sharing between distributed servers using redis, connection retry mechanisms, and ack/nack support might align better with our requirements and facilitate smoother integration and maintenance.

Feedback and opinions on this matter are welcome for further discussion.
CC: @majorbruteforce @punitkr03 @soumil-kumar17

@punitkr03
Copy link
Collaborator

@zakhaev26 Bro literally tagging me everywhere ☠️

@punitkr03
Copy link
Collaborator

punitkr03 commented Mar 4, 2024

@zakhaev26 SSE +1
Websockets are too resource intensive.
Btw, open to discussions.

@zakhaev26
Copy link
Contributor Author

zakhaev26 commented Mar 4, 2024

@zakhaev26 Bro literally tagging me everywhere ☠️

GitHub is not for beginners

@soumil-kumar17
Copy link
Collaborator

soumil-kumar17 commented Mar 5, 2024

Websockets are more resource intensive than sse, but until we recklessly open multiple connections, we should not face many issues regarding resource consumption. This may probably help.

@zakhaev26
Copy link
Contributor Author

Found a 🔥 article on websockets impl in go
Link to article :https://programmingpercy.tech/blog/mastering-websockets-with-go/
CC: @majorbruteforce @soumil-kumar17

@majorbruteforce
Copy link
Member

Good find Mr. White

@zakhaev26
Copy link
Contributor Author

zakhaev26 commented Mar 10, 2024

Made a POC using kafka ,ws referring to the article. stuff works good
check : https://github.com/zakhaev26/distributed-ws-kafka
will be adding traefik stuff soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants