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

migrate from socket.io to traditional ws server #3

Open
MridulDhiman opened this issue Jan 27, 2025 · 0 comments
Open

migrate from socket.io to traditional ws server #3

MridulDhiman opened this issue Jan 27, 2025 · 0 comments
Labels
enhancement New feature or request low low priority

Comments

@MridulDhiman
Copy link
Collaborator

MridulDhiman commented Jan 27, 2025

Problem Statement

  • implement event driven sort of architecture in traditional ws server
  • can use protocol buffer serialization for large file payloads

Tradeoffs

Current Socket.IO approach:

  • Built-in fallback mechanisms you might not need
  • Additional overhead from the Socket.IO protocol
  • JSON serialization by default, which is less efficient for binary data
  • Higher-level abstraction that's easier to work with but comes with performance costs

Proposed WebSocket + Protocol Buffers approach:

  • Raw WebSocket is more lightweight and has less overhead

Protocol Buffers would give you:

  • Much more efficient serialization compared to JSON
  • Strict typing and schema validation
  • Better handling of binary data
@MridulDhiman MridulDhiman self-assigned this Jan 27, 2025
@MridulDhiman MridulDhiman added the enhancement New feature or request label Jan 27, 2025
@MridulDhiman MridulDhiman removed their assignment Jan 27, 2025
@MridulDhiman MridulDhiman added the low low priority label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low low priority
Projects
None yet
Development

No branches or pull requests

1 participant