bloom-lang / bud

Prototype Bud runtime (Bloom Under Development)
http://bloom-lang.net
Other
854 stars 60 forks source link

Handling of overly large messages #325

Closed vzaychik closed 9 years ago

vzaychik commented 9 years ago

Break apart large datagrams into safe-size chunks and send individually to prevent silent message dropping. Note that eventmachine documentation states that send_datagram method should not be used for arbitrarily-large data packets.

neilconway commented 9 years ago

UDP might reorder and/or duplicate packets, so I don't think the proposed patch is quite sufficient. For this to work, one approach would be to have the sender assign sequence numbers and have the receiver reassemble packets in sequence-number-order.

An alternative would be to provide a TCP-based channel implementation.

vzaychik commented 9 years ago

Fair enough. I'd consider it an improvement over the current state but not a complete fix.

neilconway commented 9 years ago

The previous behavior was to simply to drop large packets; the proposed behavior allows large packets to be either delivered successfully, dropped (which is always possible with UDP) or mangled (if datagrams get reordered). So I'm not sure if I would call it a clear improvement :)

I'm inclined to think providing TCP-based channels as an alternative might be the best way to go.

vzaychik commented 9 years ago

I am happy to withdraw the pull request. I agree with you that providing TCP-based channels is the best way to go. Since we are being pedantic, I think whether it can be considered an improvement depends on your point of view. In a statistical case on a not super busy network I think it's an improvement. :)

neilconway commented 9 years ago

Okay. Bug #100 is open for supporting TCP-based channels.

palvaro commented 9 years ago

I'm on it.