Discussion: Rewrite with socket.io

Open
#56 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
go, javascript
Domain
backend

Research direction

The issue names no files, tests, or entry points. Start by locating the backend's current broadcasting, communication protocol, restart flow, and session handling, then compare those responsibilities with the proposed socket.io options; done requires an agreed migration scope and implementation direction.

Written by the indexing model from the issue text.

Description

Right now, if I recall correctly, you need to restart the backend before each use.
Also, rooms are not supported to handle multiple sessions simultaneously.

socket.io is a great library for applications such as this. Lots of clients syncing with WebSockets.
Since the current communication protocol is application-specific I think a transfer to socket.io brings a bit of friction but it's not without a decent gain and a more production-ready application. As I've understood it the application has been used a lot?

Socket.io server implementations exist for golang.
This one for example. https://github.com/googollee/go-socket.io
We could use that if we want to keep using golang, but I think most of the codebase we have right now that handles broadcasting overlaps a lot with what socket.io will do for us. So we might end up replacing a lot of it. In which case we could consider using javascript/typescript with the original socket.io implementation: https://www.npmjs.com/package/socket.io.

What do you think @NeonNeon or any other interested didIT/digITs?

Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cthit/speakIT

All issues in cthit/speakIT

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.