Ok, I know a lot of people run servers off of their home DSL or Cable internet lines (myself included) but this only works up to an extent.
After running my server for a few months I found that the "laggiest" time on the server was when somebody connected and all of the chunks in their area had to be sent to them from my server. This would also cause other connected clients to experience significant lag.
To solve this, I propose a torrent-like P2P system for sending chunks to clients.
It would work like this:
- The server would act as a "tracker" for every chunk
- When a chunk is modified, the client that modifies the chunk sends the modification to the server (like it is now)
- Once the server modifies the chunk, it "tells" the client (that modified the chunk) to begin sending that chunk to the other clients
- Once one other client receives the update, it "tells" the "tracker" that it received the updated chunk
- Each client that has the modified chunk then begins sending it to clients that do not have the chunk yet.
What about when a new client connects?
- The client connects to the server
- The server "tells" all of the other clients that a new client has connected and sends the new client a "list" of all of the chunks
- The current clients then begin sending chunks to the new client (like in a torrent system 1 chunk = 1 piece)
- When the client has received all of its chunks, it acts like one of the current clients in that it would follow the above steps (for modifying chunks)
Thoughts?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
After running my server for a few months I found that the "laggiest" time on the server was when somebody connected and all of the chunks in their area had to be sent to them from my server. This would also cause other connected clients to experience significant lag.
To solve this, I propose a torrent-like P2P system for sending chunks to clients.
It would work like this:
- The server would act as a "tracker" for every chunk
- When a chunk is modified, the client that modifies the chunk sends the modification to the server (like it is now)
- Once the server modifies the chunk, it "tells" the client (that modified the chunk) to begin sending that chunk to the other clients
- Once one other client receives the update, it "tells" the "tracker" that it received the updated chunk
- Each client that has the modified chunk then begins sending it to clients that do not have the chunk yet.
What about when a new client connects?
- The client connects to the server
- The server "tells" all of the other clients that a new client has connected and sends the new client a "list" of all of the chunks
- The current clients then begin sending chunks to the new client (like in a torrent system 1 chunk = 1 piece)
- When the client has received all of its chunks, it acts like one of the current clients in that it would follow the above steps (for modifying chunks)
Thoughts?