[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

    Raphfrk

    The white list file is just a list of player names, one per line.
     
  3. Offline

    Tueurdragon

    Yes that's what I did. I create a file that I named whitelist in which I wrote the players' name. On the other hand, I don't know what is to be configured in proxylite.txt to make craftproxy check in it
     
  4. Offline

    Raphfrk

    Just put

    whitelist name.of.whitelist.filename

    at the end of the command line
     
  5. Offline

    Sapd

    Does this plugin also work as a proxy for Serverteleport Plugins?
     
  6. Offline

    Tueurdragon

    clientversion=
    bridge_connection=false
    reconnectfile=/home/minecraft/Proxy/reconnect
    monitor=
    seed=
    cache_limit=48
    default_server=35565
    quiet=false
    debug=false
    listen_hostname_port=25565
    password=tapir
    auth_off=true
    log=/home/minecraft/Proxy/proxy.log
    banned=
    info=false
    dimension=
    staticlocalhost=false
    log_time_off=true
    disable_flood=false
    whitelist=/home/minecraft/Proxy/whitelist

    Should it looks like this?
     
  7. Offline

    Raphfrk

    I updated again. Sorry, it was only usable if you started the proxy from the command line.
     
  8. Offline

    ssechaud

    I've noticed since 1060 that this seems to be pretty laggy when going through doors and such. Wondering if this is still useful with the updates to bukkit?
     
  9. Offline

    Raphfrk

    There is a bug with CB 1040+ (or CB 1040+ exposes a bug in craft proxy). Anyway, it causes major memory usage.

    I have a comment in the first post about how to help track it down.

    A bug in CB has been found and that is possibly the problem, so maybe a newer version of CB won't have the problem. However, there hasn't even been a pull request relating to it.

    Also, it might be an unrelated issue. If you could start your server with:

    Code:
    java -Xms256M -Xmx256M -XX:+HeapDumpOnOutOfMemoryError  -XX:HeapDumpPath=craft_proxy_dump.hprof -jar CraftProxyLiter.jar 20000 25565 <add the rest of your parameters>
    
    and send me the file, then that would be a big help. That assumes that your server eventually runs out of memory, ofc. You can also save the file somewhere else by changing the path.

    Btw, @Simanova , did you have any luck with it?
     
  10. Would you update the title to the newest version? I'v used version 108 for a 'While' now as the title always stated it'S the recent one, but did notice now its already advanced to version 113
     
  11. Offline

    Simanova

    Not lucky atm, no crash - only huge lag and hot cpu
     
  12. Offline

    Raphfrk

    Another option would be to use visualVM. This allows a heap dump of a running java process.

    Are you running windows or Linux?

    Also, is CB using extra memory too?
     
  13. Offline

    Simanova

    Linux, CB is running completly normal
     
  14. Offline

    Raphfrk

    I added the option to do a heap dump. You need to start with something like:

    Code:
    java -Dcom.sun.management.jmxremote  -Dcom.sun.management.jmxremote.port="9004"  -Dcom.sun.management.jmxremote.authenticate="false" -Dcom.sun.management.jmxremote.ssl="false" -jar CraftProxyLiter.jar 20000 25565 adminname raphfrk
    
    (plus any other options you use)

    adminname sets the user who is allowed to do the heap dump. It is case sensitive.

    If that user connects and enters /memdump, the memory contents is dumped.

    @ssechaud , you could give it a try too. Ideally, it would be someone who has a large upload capability.
     
  15. Offline

    Kilandor

    So me and some friends wanted to play Industrial Craft. I wanted to try CraftProxy in standalone (server) mode with it. But it seems CraftProxy can't handle the packets.
    The server responds with the following in log.
    Code:
    [7:02:36 PM] ***/52779 (Kilandor): Connection successful
    [7:02:36 PM] ***/52779 (Kilandor): Connecting using proxy to server connection format
    [7:02:37 PM] ***/52779 (Kilandor): Server login successful
     Unknown packet Id e6
     Unknown packet Id e6
    0 0 24 76 17 1 0 0 67 0 0 25 1 11 1 0 35 67 0 0 26 1 12 1 0 5f 67 0 0 27 0 32 10
     0 0 67 0 0 28 1 13 1 0 14 67 0 0 29 1 40 1 0 0 67 0 0 2a 75 cd 1 0 0 67 0 0 2b
    0 3 29 0 0 67 0 0 2c 76 18 1 0 0 *e6* 11 41 11 f8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    0 21 0 0 2 77 0 0 0 78 0 21 0 0 2 76 0 0 0 fe 0 1f 0 0 2 7b f4 18 fc 21 0 0 2 7a
     fe 0 fe 67 0 21 0 0 2 79 f5 0 f7 61 0 1f 0 0 2 78 0 0 0 21 0 0
    [7:02:37 PM] ***/52779 (Kilandor): Downstream link
    [7:02:37 PM] ***/52779 (Kilandor):  Unable to read packet
    [7:02:37 PM] ***/52779 (Kilandor): Packets: [50, 50, 50, 13, 4, 104,
    103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103]
    [7:02:37 PM] ***/52779 (Kilandor): Client requested caching mode
    [7:02:38 PM] ***/52779 (Kilandor): Closed connection to server
    [7:02:38 PM] ***/52779 (Kilandor): Closed connection to client
    
    Client gets
    Code:
    [7:16:32 PM] 127.0.0.1/52837 (Kilandor): Connecting to :*** 20000
    [7:16:32 PM] 127.0.0.1/52837 (Kilandor): Attempting to connect to: ***
    :20000
    [7:16:33 PM] 127.0.0.1/52837 (Kilandor): Connection successful
    [7:16:33 PM] 127.0.0.1/52837 (Kilandor): Connecting using proxy to server connec
    tion format
    [7:16:34 PM] 127.0.0.1/52837 (Kilandor): Server login successful
    [7:16:35 PM] 127.0.0.1/52837 (Kilandor): Kicked with: [CraftProxyLiter] Protocol
     stream closed
    [7:16:35 PM] 127.0.0.1/52837 (Kilandor): Redirect detected: null
    [7:16:35 PM] 127.0.0.1/52837 (Kilandor): EOF reached
    [7:16:35 PM] 127.0.0.1/52837 (Kilandor): EOF reached
    [7:16:35 PM] 127.0.0.1/52837 (Kilandor): Closed connection to server
    [7:16:35 PM] 127.0.0.1/52837 (Kilandor): Closed connection to client
    
     
  16. Offline

    Maeyanie

    Each packet has to be coded in individually, and at the moment packet 230, aka packet e6 (which is used by ModLoaderMP) isn't implemented. I tried to do it, but for some reason the server->client stream hangs after a while, and I can't figure out why.

    I sent the code to Raphfrk, who expressed interest in trying it, but mysterious unknown bugs like that can be a pain to solve so wouldn't expect it in the very near future.

    (I'm assuming it wasn't just caused by my forgetting something obvious, otherwise he would've noticed and fixed it by now. ;))
     
  17. Offline

    Simanova

    Ill try it :)

    PS:

    [​IMG]

    [​IMG]
    Doesnt seem to work
     
  18. Offline

    Raphfrk

    I assume that this is modloaderMP? Craft Proxy doesn't support the additional packet. I was planning to look into it.

    You need to replace raphfrk with your name not adminname. Adminname is just the name of the field. You can also add any other parameters you were using after that.

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

    Simanova

    Dumpfile ready for download ...
    Direct download: http://exotica-esports.de/craftproxy_hprof.zip
     
  20. Offline

    Raphfrk

  21. Offline

    Simanova

    Its a dump right after a complete server and cp restart

    Ill try to make a dump when the server is crowed and a while running ...
     
  22. Offline

    Raphfrk

    Great. Unfortunately, that will probably mean it will be larger. However, to best see the memory leak, it should represent a reasonably large portion of the memory usage.

    Hopefully, it will compress well.
     
  23. Offline

    Simanova

    btw ... CP 108,109,110,111,112,113 and 114 are completly disfunctional
    even without parameters the data transfer freezes for every client after 1 or 2 seconds

    perhaps bandwidth limit is set to zero by default?

    So i have to use 107, and 107 does not offer the ability to generate a dump file ( tested )
    The previous dump file was generated by -> log in -> type really fast /memdump -> disconnect

    So i cant test CP 114 longer than 2 seconds
     
  24. Offline

    Raphfrk

    I will have a look. Maybe I will just revert to 107 and use that as base for future versions.
     
  25. Offline

    Simanova

    Could you upload a v115 or new v107 with the dump creation feature?
     
  26. Offline

    Raphfrk

    Hmm, is there just 1 person online at the time?
     
  27. Offline

    Simanova

    Only me, while generating the dump file - nobody can stay online longer than 2 sec with 108-114
     
  28. Offline

    Raphfrk

    Ok, must be a linux thing or something, because that doesn't happen for me. Are you connecting from a remote computer?

    I think the easiest would be just to remove the bandwidth limiter.

    Hmm, I wonder if it is a 1060 thing.
     
  29. Offline

    Simanova

    Me, Simanova is connecting local, the other ppl via internet
     
  30. Offline

    Raphfrk

    Yeah, but when you were doing the dump, it was just you. That is what is weird. Anyway, since I don't think the limiter is that important a feature, it is best just to remove it and go back to 107.
     
  31. Offline

    Simanova

    The dump was generated via internet , at work, with a laptop by me :)
     

Share This Page