classtranscribe / classtranscribe/FrontEnd

WebSocket + Protobuf?

Open
#283 0 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
JavaScript
Stars
24
Forks
29
PR merge metrics
No merged PRs in 30d

Description

# Background:
1. For each following API request (on average):
a. **api/WatchHistories** has 1563 Bytes (Header) + 37 Bytes (Body);
b. **api/Logs** has 1563 Bytes (Header) + 15 Bytes (Body)
2. 854/1563 bytes HTTP headers is "Authorization" field.
3. "WatchHistories" report occurs once per second.
4. "Event" report occurs frequently when "watching".

# Why WebSocket?
Duplex Communication!
1. Real-time update: Someone else changed the transcription? We want real time update.
2. Analytics: We want to know when user get disconnected.
3. Shorter packet: After connection established, we don't need to send Authorization header
4. "CT Party": learn with your friends

# Why Protobuf?
1. Shorter packet
2. High performance

# Cons
1. Pool of active users
2. TCP timeout

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.