Skip to content

Instantly share code, notes, and snippets.

@gregoryyoung
Last active March 21, 2023 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregoryyoung/16e8f37519b59e82a36b32d3da08264d to your computer and use it in GitHub Desktop.
Save gregoryyoung/16e8f37519b59e82a36b32d3da08264d to your computer and use it in GitHub Desktop.
So packet arbitrage is a common feature with udp protocols *especially* multicast protocols.
What is being discussed is a mechnism of dealing with the "possibly lossy" behaviour of UDP. UDP can lose packets
so we will have N sources sending identical packets (eg: they have the same sequence numbers/data/etc).
Packet #133 on multicast A is identical to packet #133 on multicast B but they have disinct network paths.
In doing this when I receive packet #133 in the sequence I do not need to care **which** feed it came down, they are all the same.
I accept the packet from the feed I find it **first** and in proper order. This leads to far less lossage (UDP right?) and
better latency etc. In order to "lose" a packet t needs to be lost on every feed which happens quite rarely thus ... no retries :-D
This ability however obviously requires that the feeds from the multiple sources must be **identical** in terms of packet data.
@LesterCovax
Copy link

The fact you're using multicast as an example solves a lot of issues. Some of your hypotheticals are more applicable to unicast setups. Additionally, mDNS also cuts down a lot on network lag / packet flooding / etc.
I was thinking about this earlier, and it made me wonder if you've considered DAGs instead (Directed Acyclic Graphs). They work fantastically in distributed setups in regards to speed and data parity. If you control master nodes, you also wouldn't need to worry about 51% attacks regarding the quorum. The idea of needing to rewrite old data is moot IMO, as data should always move forward.
Look at the Nano cryptocurrency as a great example. I did some dev work with it in the past.
DAGS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment