Remember my post about me having the algos but being lazy about implementing them? Well. here is what I was thinking when I posted that:
Bittorrent uses a single tracker
Freenet uses a slow broadcast message system
I would use multiple trackers, responsible for specific parts of the namespace(like, if your IP starts with a number less than 128, you go to tracker1, otherwise, tracker2) so I thought I was done with network topology.
Well,I was mistaken, it gets a lot more complicated than that.In fact, even with perfect knowledge of all nodes(not practical), finding an optimal topology involves extrapolating what each node is going to query, that is, it involves A.I.Amazing. I could easily spend 2 years just thinking about this subject before reaching an agreeable solution. Perhaps I should just use one-tracker-for-all and then make things on the go?
Network topology could be the reason I’m stuck.
Let n1 be the first and only tracker, let n2,n3,n4 and nM be nodes joining after n1,n2,n3..nM-1
Naive Approach(fully connected)
A network with J nodes will have J-1 connections per node. For a maximum of 100(my initial target), that would limit the network size to 101 nodes.
Naive Approach, then Least Connected First
n1-n2-n3,n2-n1-n3,n3-n1-n2(next paragraph is Least Connected First)
(tell n1 she(n4) arrived)
n1-n2-n3-TEMPORARY-n4,n2-n1-n3,n3-n1-n2,n4-TEMPORARY-n1(n1 tells n2 that n4 has only 1 connection)
(n2 sees that n1 has 3 connections(counting tmp))
So we have already surpassed a fully connected network number of maximum nodes if connections are capped(at 2)
Now, I need to continue this later and generalize a maximum number of connected nodes if the algo least connected first is used with max connections X (maxNodes= topologyAlgo(MaxConnectionsPerNode))