Skip to content

Networking control protocol#6

Draft
GregoryLi360 wants to merge 9 commits into
mainfrom
majdnasra2/comm-protocol
Draft

Networking control protocol#6
GregoryLi360 wants to merge 9 commits into
mainfrom
majdnasra2/comm-protocol

Conversation

@GregoryLi360
Copy link
Copy Markdown
Contributor

@GregoryLi360 GregoryLi360 commented May 28, 2026

Control and data pipe protocol between Arca and the Linux monitor.

Control protocol (spec in PROTOCOL.md):

  • Wire format: 7-byte header (message_type, payload_len, request_id) plus fixed-layout payload.
  • Message types: ListenRequest/Ok/Err, ConnectRequest/Ok/Err, AcceptRequest, IncomingConnection/Err, AcceptErr.
  • Arca side: ArcaSession::bind / connect / accept mirror std::net.
  • Linux side: Monitor::pump_once / serve_one / poll_accepts drive the kernel sockets.
  • One static control pipe; per-connection data pipes allocated on demand.
  • 'DataPipeInfo.pipe_id` is u64 to hold the SHM allocator offset (used by both sides to reconstruct their local pointer via from_offset).

Pipe and data-pipe (update) (spec in DATAPIPE.md):

  • RingHeader adds writer_closed / reader_closed atomic flags in shared memory
  • BidirectionalPipe exposes close_write/read(), is_peer_write/read_closed(), is_closed().
  • SyncStream / AsyncStream rewritten to raw byte stream (dataframe framing removed), send / recv use shared-memory close flags for EOF and error detection.

See PROTOCOL.md and DATAPIPE.md for the full specs.

@ruiting-chen ruiting-chen force-pushed the majdnasra2/comm-protocol branch from d762d8e to 8e4e10f Compare May 29, 2026 21:41
…I on BidirectionalPipe, rewrite data-pipe streams to use flags instead of FIN/RST dataframe framing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants