dcramer / mangodb

A database that operates at CLOUD SCALE
886 stars 71 forks source link

Switch to UDP Protocol #34

Open mitsuhiko opened 11 years ago

mitsuhiko commented 11 years ago

TCP requires a handshake and is slow. Can we please use UDP as protocol instead? Maybe provide some sort of support to make it a bit reliable in safe mode though I don't think that will be necessary.

dcramer commented 11 years ago

Maybe we should just UDP broadcast all commands when we aren't running in safe mode. Should we do two-way UDP? Broadcast and then listen on sockets when you need a result? It seems like the async methodology of two-way UDP would fit very well.

tkaemming commented 11 years ago

Should we do two-way UDP? Broadcast and then listen on sockets when you need a result?

It's might also be worth considering adding some features to this two-way UDP "safe mode" idea, like making sure packets can be reordered in case of out-of-order delivery, retries for lost packets, error checking, and congestion. I'm surprised nobody has thought of this before… maybe there's a node.js library to add this kind of functionality to UDP?

mattrobenolt commented 11 years ago

Have you guys considered using the Hadoop protocol?