RFC-7: expose message internals to the transport in order to implement a simple congestion protocol #88
Unanswered
hugoArregui
asked this question in
RFC
Replies: 1 comment 8 replies
-
I think we could get to some decoration in the response of the server signaling that the stream needs acks function streamWithAck<T extends object>(arg: T) {
arg[Symbol.for('rpc-requires-ack')] = true
return arg
}
function getServerSideModule() {
return {
async * remoteMethodWithAcks() {
return streamWithAck(generator())
},
async * remoteMethodWithoutAcks() {
return generator()
}
}
} |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As part of https://rfc.decentraland.org/rfc/RFC-7 the ACK process will be removed from the protocol. Although the current implementation has some problems I think it also provides a simple congestion mechanism. The suggestion of implementing an equivalent of the current ACK process using a bidirectional stream is a good one, but there is no way to implement a better congestion mechanism without incurring in overhead.
If some internals (I'm thinking about message_id in this case) becomes available to the transport layer (WsTransport for example), we could implement a simple congestion mechanism at transport level, without having to add this kind of information to our own app protocol.
Beta Was this translation helpful? Give feedback.
All reactions