[MISC] CraftProxy 0.2.0 - Reduce bandwidth use by caching chunk data [1.6]

Discussion in 'Archived: Plugin Releases' started by Raphfrk, May 1, 2011.

  1. Offline

    Raphfrk

    CraftProxy - Reduce bandwidth use by caching chunk data
    Version: 0.2.0

    Description

    This plugin and local client allows chunk data to be cached locally by players. This reduces the bandwidth required for hosting the server. It also helps users who are on slower connections.

    I am not sure what the status of this system is. It doesn't count as a plugin, since it has 2 parts.

    Even when running the plugin, players who don't use the client proxy can still connect. However, they will use the full bandwidth.

    The system can reduce bandwidth by 70-90% (after the 2nd login).

    Setup

    Server

    Add the plugin file to the plugins folder

    Client

    Start minecraft client and login
    Double click on the client jar file
    Enter login details
    Enter the server location/port in the GUI
    Press start on the GUI
    Connect to localhost on the minecraft client

    Stable Builds

    None yet

    Dev Builds

    Warning: These may not be stable

    Client
    Plugin

    Had it get the compress/decompression gain backwards.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
    Jushy, Martin1704, Nathan C and 24 others like this.
  2. Offline

    ledhead900

    In response to both it was just me solo no other users when i tested a couple builds ago.
    I't works now so far no packet id issues or radom dc.

    but a user did report gui showing unkown.
     
    Simanova likes this.
  3. Offline

    Simanova

    Bug confirmed.

    And look at the title -> "CraftProxyLite R"

    [​IMG]
     
  4. Offline

    RandomMiner

    @Raphfrk
    lag seems to be gone in the latest version (0.82) using localhost with and without port doesn't make a difference anymore for me. Nice!

    I sadly can't report how the Program works with several users yet, because I do not run a public server (my brother/ friends play it rather seldom, well they can only play when I turn the server on after all )

    I can also confirm the gui bug - I've taken a look at the rights for the folder, but they where correct. If it helps I'm on Windows 7 x64 with Java 6 Update 24 x64

    [​IMG]
     
  5. Offline

    Raphfrk

    I have updated again. The GUI thing was just a display issue, I didn't update the display when I checked the directory size.
     
  6. Offline

    RandomMiner

    Seems to work now. Very nice.

    Though I do have to add it's almost unbelievable how much traffic minecraft is supposed to cause. I mean it's not like I didn't know but it's just something else seeing actual numbers.
     
  7. Offline

    Raphfrk

    Well, he has to send the status of every block.

    Each chunk would normally take 80kB. This is then compressed to 5-10kB. When pulling from the cache, the proxy reduces it to just 600 bytes.

    @Navist

    I was doing a quick Google for craftproxylite and saw your post here (Interesting the post appears in Google cache, but not as a directly link).

    Anyway, your instructions are not correct. The player needs to connect to localhost:25564 with their minecraft client (assuming that you have the GUI set up as you have shown).

    Otherwise, you are directly connecting to the server and bypassing the GUI and so won't get much benefit.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  8. Offline

    Simanova

    [​IMG]--> [​IMG] --> [​IMG]
     
  9. Offline

    Raphfrk

    Right, though just for clarity, the official version compresses from 80k to 5k.

    The proxy takes it down to 600 ish.
     
  10. Offline

    ledhead900

    Raphrk
    When updateing the gui fixed version is it just a cosmetic change or do both client and server need it?


    I just want to say again that is probably one or the more usefull tools around for minecraft lately.

    Something had to be done since notch clearly does not bother to tune is network code. With his code players expeierence overflow issue sometimes with this no more overflow.

    I could run 12 + on 1.2.2 from home but with 1.3 or lower it more like 5 -6 before lag but if just 3 use this that number doubles.

    Works like a charm. Its really good for the users who have bad connections themselves.
     
  11. Offline

    Raphfrk

    Mostly cosmetic.

    It does re-enable the output latency buffer (the previous version bypassed both the fairness system and the output buffer), but that doesn't appear to be critical functionality.

    Also, with the GUI, I have latency set to zero by default now anyway.

    Cool :), so back to 12?

    I wonder if everyone used the proxy if you could get it higher than 12 :).

    Right, it should help reduce upload bandwidth for servers and download bandwidth for players.
     
  12. Offline

    ledhead900

    Yes it does and thats whole reason why it makes it less laggy. Sending less
    so over all more speed for everyone.

    Not that I get metered uploads or anything My home connection is not that bad.
    Its an ADSL2+ SOHO service.

    I do think if everyone used this that we could run 25 players no worrys
    like norm ppl say home servers are bad but only due to slow upload speeds with this even a 170kb upload server could run 10 players with zero lag.

    since going by your math it would send bugger all per player.
     
  13. Offline

    Atticus Craft

    Linux server, Windows Client. version 83
    Installed the liteR version and ran it exactly as directed in first post.

    Server seemed to be fine, but on the client end it would crippled both my minecraft, and the other guy testing it's as well. Just insane amounts of lag, if it would let us login at all.. and then we would be disconneted after not all that long.

    Whenever one of us disconnected, it would put this error into console:
    Code:
    java.net.SocketException: Broken pipe
    09:13:49 [SEVERE]       at java.net.SocketOutputStream.socketWrite0(Native Method)
    09:13:49 [SEVERE]       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    09:13:49 [SEVERE]       at java.net.SocketOutputStream.write(SocketOutputStream.java:132)
    09:13:49 [SEVERE]       at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
    09:13:49 [SEVERE]       at net.minecraft.server.Packet30Entity.a(SourceFile:119)
    09:13:49 [SEVERE]       at net.minecraft.server.Packet31RelEntityMove.a(SourceFile:63)
    09:13:49 [SEVERE]       at net.minecraft.server.Packet.a(Packet.java:121)
    09:13:49 [SEVERE]       at net.minecraft.server.NetworkManager.e(NetworkManager.java:96)
    09:13:49 [SEVERE]       at net.minecraft.server.NetworkManager.d(NetworkManager.java:231)
    09:13:49 [SEVERE]       at net.minecraft.server.NetworkWriterThread.run(SourceFile:90)
    
    
    Any thoughts? Its 100% unusable atm.
     
  14. Offline

    Raphfrk

    I haven't seen that. Does it give any message on the proxy?

    Is anyone else using the proxy on the Linux server?

    I made some changes for v84 that might cause the socket to terminate, are you sure it is 83 and not 84?
     
  15. Offline

    Kizzard

    I'm running a linux server. I just updated to v84 and tested, it works fine with one player. However I have not tested v84 with 2 people yet. Will report back when I get the opportunity.
     
  16. Offline

    ssechaud

    I can confirm that using v84 on Ubuntu server with more than 4 people is running fine.
     
  17. Offline

    Raphfrk

    @Atticus Craft

    I can't replicate your issue.

    I have updated again.

    This should fix a bug where there was no sound when players were damaged (and also lava didn't set them on fire).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  18. Offline

    Joy

    Would be great to get it back to work as plugin, as the standalone has no config? I can't get it to work standalone anyways :/
     
  19. Offline

    Raphfrk

    It should work as a plugin now.

    The command line given in the OP should work (actually not, I needed to add the r to liter)

    Code:
    java -jar CraftProxyLiter.jar 20000 25565  auth_off
    
    Btw, as a "marketing" change, I wonder if I should change auth_off to

    auth_by_server

    and auth to

    auth_by_proxy
     
  20. Offline

    Faust

    Well.. I've never used the auth_by_proxy and I wouldn't know how to go with it, but yes, it would clear up some misunderstanding if you changed the naming. Thanks for the updates and this awesome plugin.

    I am unsure if the chunks are replaced with different chunks if you port to a new world, but I would assume they are. So would it be possible to cache so each world go into their own folder?
     
  21. Offline

    Raphfrk

    Auth by proxy is only if you have multiple servers and want to use serverport to teleport between them. You set all servers into online mode and then have the proxy handle authentication.

    The cache doesn't actually store the location of the chunk, so chunks don't overwrite like that.

    Every chunk is broken down into 2048 byte pieces. Based on those 2048 bytes, a 64 bit hash code is calculated for that piece.

    The client tells the server what hash codes it knows about (it actually only sends reasonably likely matches). If the server detects a piece with the one of the known hash codes, it just sends the hash code.

    There is a chance that there would be 2 completely separate 2048 sequences that give the same has code. However, that is tiny and on average there would be over 100 million chunks between false matches.
     
  22. Offline

    Kimundi

    I noticed that in Plugin mode, craftproxy logs the time on its own:
    23:43:25 [INFO] [23:43:25] xxx.xxx.xxx.xxx [...]
    So, how about this: If in Plugin Mode, replace '[time]' with 'CraftProxyLiter':
    23:43:25 [INFO] CraftProxyLiter: xxx.xxx.xxx.xxx [...]
     
  23. Offline

    thepackett

    does this work with multi worlds? every time i switch worlds it seems like it may be overwriting previous data because of the highly decreased reduction.
     
  24. Offline

    Raphfrk

    Yes, it should. Have you been to the target location before? Maybe it hadn't cached it yet?

    In fact, it doesn't know anything about chunk positions, so there is no sense in one world overwriting chunks from another.

    I just tested the latest version and it seems to work fine for me.
     
  25. Offline

    ledhead900

    This is going well but please update your wiki I can not tell on the OP what parameters do anything anymore.
     
  26. Offline

    Kimundi

    Well, in the meantime you could start craftproxy with -h to print the help.
     
  27. Offline

    ledhead900

    Where was that bit of info in the OP.
     
  28. Offline

    Raphfrk

    That isn't even a valid command. However, the proxy does list parameters when you start it with bad parameters.
     
  29. Offline

    Kimundi

    Ooops xD. Well, same result anyway, right?
     
  30. Offline

    Raphfrk

    Yeah :).

    The idea was that it would do that with no parameters, but then I set it up so that starts the GUI.
     
  31. Offline

    Kimundi

    Btw, any comment about my suggestion?
     

Share This Page