Closed rockey2020 closed 11 months ago
if the delay between node A and node B is high, the data will be lost or the data order will be mixed
This should not be the case.
What underlying transport are you using here? It's usually down to the transport to provide delivery/ordering guarantees.
import { webSockets } from "@libp2p/websockets"; import { tcp } from "@libp2p/tcp";
@achingbrain I currently use these two modules,This problem occurs in all
That's interesting, TCP provides delivery and order guarantees, and WebSockets run over TCP so should inherit those properties.
Please can you provide a runnable example that shows the problem?
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.
This issue was closed because it is missing author input.
"dependencies": { "@chainsafe/libp2p-gossipsub": "^10.1.0", "@chainsafe/libp2p-noise": "^13.0.0", "@chainsafe/libp2p-yamux": "^5.0.0", "@libp2p/bootstrap": "^9.0.5", "@libp2p/kad-dht": "^10.0.5", "@libp2p/mdns": "^9.0.5", "@libp2p/mplex": "^9.0.5", "@libp2p/peer-id-factory": "^3.0.3", "@libp2p/pubsub-peer-discovery": "^8.0.4", "@libp2p/tcp": "^8.0.5", "@libp2p/websockets": "^7.0.5", "@multiformats/multiaddr": "^12.1.7", "core.crypto": "^1.1.2", "deep-object-diff": "^1.1.9", "eventemitter2": "^6.4.9", "it-all": "^3.0.3", "it-map": "^3.0.4", "it-pb-stream": "^4.0.2", "it-pipe": "^3.0.1", "libp2p": "^0.46.7", "lodash-es": "^4.17.21", "p-queue": "^7.3.4", "uuid": "^9.0.0" },
Platform:
Subsystem:
Severity:
Description:
When I use stream to transfer a large amount of data, if the delay between node A and node B is high, the data will be lost or the data order will be mixed, what is the best solution?
If the qos function is provided it avoids the problem of data loss and disorganization
Qos: https://www.emqx.com/en/blog/introduction-to-mqtt-qos
Steps to reproduce the error: