Basicnet Protocol Documentation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- go
- Lĩnh vực
- audio-video-rtc, backend-api-design, distributed-systems
Hướng nghiên cứu
Issue không nêu tên tệp tài liệu, bài kiểm thử hoặc điểm vào nào. Hãy bắt đầu bằng cách xác định cấu trúc tài liệu hiện có của repository và so sánh cấu trúc đó với giao thức được mô tả ở đây; được xem là hoàn tất khi các kiểu thông báo, vai trò của node, vòng đời của stream, cách xử lý playlist và hành vi của node-status được ghi lại rõ ràng và nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Super Rough Version
Message Types:
- Sub
- Data (video segment)
- Finish
- Cancel
- TranscodeResponse
- GetMasterPlaylist
- MasterPlaylistData
- NodeStatusReq
- NodeStatusData
Node Roles:
Broadcaster
- Sends video segments to its listeners
- If no listeners, drop the segments
- Broadcasts exist for each StrmID
Subscriber
- Receives video segments, and puts it into local video streams
- Subscribers exist for each StrmID
Relayer
- Receives video segments and calls the callback function.
- Relayers exist for each (MessageType, StrmID)
Protocol:
When a node wants to broadcast a stream:
- Create a local broadcaster, push Data to the broadcaster's listeners
- This can happen even when no one in the network wants the stream
When a node wants to subscribe to a stream:
- Create a local subscriber with the streamID
- This registers a callback, we usually put the data into a video stream in the caller
- Send Sub req to the network
When a node receives a Sub req:
- If there is a local broadcaster, add the requester's ID to its listener array
- If there is a local relayer, add the requester's ID to its listener array
- We assume the local relayer has already been created and the Sub req has been passed on.
- If there is a local subscriber and no local relayer, create a local relayer, add the requester's ID to its listener array
- If there is no local relayer, local subscriber, or broadcaster, create a local relayer, add the requester's ID to its listener array, and forward the request along.
When a node receives a Data req:
- If there is a local subscriber, send the data there
- If there is a local relayer, send the data there
- Otherwise, report an error
When a broadcaster finishes a stream:
- Send a Finish message to its listeners
When a node receives a Finish message:
- If there is a local subscriber, call it with EOF and delete it
- If there is a local relayer, forward the Cancel message to its listeners, and delete the relayer
When a node finishes subscribing (for example, player shuts down)
- Send a Cancel message to its upstream peer and delete the subscriber
When a node receives a Cancel message:
- If there is a local broadcaster, remove the peer from its listeners array.
- If there is a local relayer, remove the peer from its listeners array. If this makes the listeners array empty, remove the relayer.
The node sends a TranscodeResponse msg to the broadcasting node when it gets a transcode job from the blockchain.
- The broadcasting node should have set up a callback function to be able to receive the TranscodeResponse message (ReceivedTranscodeResponse)
StrmID might be confusing with MasterPlaylistID → Each master playlist contains multiple media playlists (represented by a single StrmID) - https://developer.apple.com/library/content/referencelibrary/GettingStarted/AboutHTTPLiveStreaming/about/about.html
The node populates the masterPlaylist map when it creates a new stream, and updates the masterPlaylist if it receives MasterPlaylistData.
The node sends out a GetMasterPlaylist request when it gets a media server video request
When a node receives a GetMasterPlaylist request:
- If we find the masterPlaylist in the local map, return it.
- If not
- If the nodeID from the streamID is the current node, we return a NotFound
- Otherwise, we forward it along, and create a local relayer if it doesn't already exist
When a node receives a MasterPlaylistData
- If we are the node requesting for it, give it to the requester
- If we are not the node requesting for it, we should have a local relayer, so relay the message along
NodeStatus works the same way as GetMasterPlaylist/MasterPlaylistData, it's used for getting a remote node's status (planning to use it for debugging)
- Ngôn ngữ chính
- Go
- Star
- 18
- Fork
- 6
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của livepeer/go-livepeer-basicnet
-
Transcoder error feedbackĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
livepeer/go-livepeer-basicnet#39 · 1 reaction ·
-
Routing LoopsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
livepeer/go-livepeer-basicnet#37 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
livepeer/go-livepeer-basicnet#34 · 3 bình luận · 2 reaction ·
-
Code generation for messagesĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
livepeer/go-livepeer-basicnet#33 · 5 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
livepeer/go-livepeer-basicnet#31 · 5 bình luận ·
Tất cả issue của livepeer/go-livepeer-basicnet
Issue tương tự
-
automation models
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
txn2/mcp-data-platform#1984 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix broken Code of Conduct linksĐang mởkind/docs prio/P2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
agent-substrate/substrate#1986 ·
Maintainer thường phản hồi trong vòng 1 ngày