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

Add WebRTC as a real-time notification method #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,20 @@ Allows the client to stream events over an HTTP connection without polling.
- cons:
- keeps a persistent connection.
- **Web-Sockets**:
Provide a bi-directional communication between client and server.
Provide a bi-directional communication between client and server, and work over TCP.
- pros:
- can transmit both binary and text data.
- cons:
- more complex to set-up compared to Polling/SSE.
- keeps a persistent connection.
- **WebRTC**:
Provides a peer-to-peer connection, and works over UDP.
- pros:
- best used for live streaming and video/audio calls.
- favors reduced network latency over quality unlike Web-Sockets.
- cons:
- packets may be lost when internet is slow or unstable.
- keeps a persistent connection.

The interviewer would expect you to **pick a concrete approach** most suitable for the design task at hand. One possible solution for the "Design Twitter Feed" question could be using a combination of SSE (a primary channel of receiving real-time updates on "likes") with Push Notifications (sent if the client does not have an active connection to the backend).

Expand Down