[ANet-devel] Part 3: Network Optimization
Status: Abandoned
Brought to you by:
benad
From: Benoit N. <be...@ma...> - 2000-12-10 19:30:45
|
I don't know why, but I can't add a new documentation page in sourceforge. Can anyone else try? Anyways, I'll post it here. ----------------BEGIN DOCS--------------- Part 3: Network Optimization<BR> <BR> <BR> <BR> 1. Distributed Networking Speed Limitations<P> The basic idea of distributed networking is to have an unstructured network. The reason why it has to be unstructured is that if the network is structured, the network will be easier to attack as a whole. For example, take Napster. Its structure is simple: a big, fat server in the middle, and everyone (the "clients") are connected to that server. If the server shuts down, then the whole network stops working. While there exist a lot of different network structure, simply taking the step of trying to restructure the network while not having control over the individual nodes is complicated and would allow easily someone to break the network apart.<P> <P> The network has to stay anarchic, for the security and the anonymity of the network.<P> <P> So, you have to take extra steps to make sure the network is the least cetralized, the most flat. But this will make the time for a query to be distributed to the whole network very high. Thus, we have to find different ways to make the network as fast as possible, without changing its structure. <P> 2. Bandwidth Management<P> To optimize the transfer between two nodes, we could try to "manage" the available bandwidth between the two nodes. <P> Firstly, the total bandwidth used between two nodes must be the same in both directions. Otherwise, too much data would get in compared to the data comming out, and the node will be forced to delete some data. While you can't totally avoid this situation, for example when a node is connected with two other nodes with different bandwidth, we must avoid as much as possible to have data deleted. <P> 2.1 Bandwidth distribution between different nodes When a node wants to connect to another node, the other node will try to allocate as much bandwidth as it can. Thus, the other node will answer with "I have X1 upload and Y1 download", and your node will reply with "X2 download, Y2 upload". The smallest of X1, X2, Y1, and Y2 is choosen as the maximum amount of data flowing in both directions. <P> If you connect to two or more nodes, then the amout of bandwidth allocated to each node is in proportion of the transfer speeds. For example, if node A is X1 and node B is X2, then node A will have X1/(X1+X2) of your bandwidth. The values of X1 and X2 are the the maximum amout of data in both directions that you could handle with A and B if you were connected only to A or B. <P> The bandwidth between two nodes can be re-negociated at any time. If you send a different amount of data than what was negociated, then the connection will be dropped. If you want to send less data than what you have, you must send dummy data to proove that the bandwidth has not changed. If the internet connection becomes slower and that packets of data are starting to get lost, then both nodes should try to re-negicoate the data to a lower value. <P> 2.2 Bandwidth distribution between two nodes<P> Basically, the data transfered between two nodes fall into 3 categories: queries, static data and data transfers. There should be a certain proportion of the maximum bandwidth they can use. For example, let's say that queries is 2, static data 4 and data transfers 6. Then, queries cannot take more than 2/12 of the bandwidth, static 4/12 and transfers 6/12. But then, let's say that data transfers are not used. Then, queries could take up to 2/6 of the bandwidth. Let's say that data transfers only use 2/12 of the bandwidth. Then, queries could take up to (2/6)*(10/12) of the bandwidth. <P> The proportions used between nodes could be negiciated, but both nodes have to fully accept the values. (Benad: how can this negiciation could work? can we abuse of that?) <P> 3. Network Management<P> The goal is to make the network as "flat" as possible. To do so, a node should connect to the node with the lowest ping time it can find. <P> (DOCUMENT NOT FINISHED YET) --------------END DOCS------------------ - Benad |