CympleTech / chamomile

Lightweight p2p library. Support build robust connection on decentralized network.
Apache License 2.0
113 stars 18 forks source link

[Question] Protocol and Transport Characteristics #19

Closed zicklag closed 3 years ago

zicklag commented 3 years ago

I've got a couple of general questions about the chamomile protocol and transports:

  1. What are the requirements for a chamomile transport implementation at the message level. Does it need to make sure that messages are delivered reliably and in-order like TCP or can messages be unordered and unreliably delivered like UDP?

  2. Is the protocol suitable for streaming applications such as network gaming or video conferencing or is it not designed for high-bandwidth, low-latency communication and it would instead be used to find peers and establish a different protocol connection between peers for things like streaming video?

sunhuachuang commented 3 years ago
  1. upper's data package is not need in-order. Transport only receive whole-data-package and send it to remote. (How to send the data packet depends on the transport process, like TCP: [0,0,0,0,x...xxx] first-4-bytes is package length, and others is package value.)

  2. stream/big-file protocol will be independent, only as a transmission channel, TCP or other as a control channel.

zicklag commented 3 years ago

Awesome, thanks!