[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

    codename_B

    Alright - I'm waiting with bated breath I hope you know :p
     
  3. Offline

    Cid

    Yes, the exception is the client side error. We do not get this error when connecting without the proxy. We tested that by visiting each area with and without the proxy enable on the client side. The result is 100% exception error when running the GUI proxy in those areas and 0% exception area when not running the GUI proxy in those areas.
     
  4. Offline

    Raphfrk

    @Cid

    Can you PM the hostname of your world, so I can do testing. Does it cause the proxy to crash or just the player?
     
  5. Offline

    MatCat

    Ok if I do no gui how do I set the cache size? :)
     
  6. Offline

    Raphfrk

    Code:
    java -jar CraftProxyLite.jar 25565 20000 local_cache quiet bridge_connection cache_limit N
    
    You replace N with the cache size. It counts in bytes.

    The default is 48*1024*1024.
     
  7. Offline

    NotYetRated


    I have set logging so collect every 300 seconds, just to see what kind of info I come up with. I may increase this time once I see the data flow start coming in. I will let you know how it goes.

    As for collecting CPU states... I am not quite sure of an easy way to do this in linux. I know how I can in windows, just not linux. Know of anything? I am going to research this myself now, just wondering if you/anyone else has some useful info for me.

    As for the usage myself, I typically only ever hit maybe 5 Mbit/s upload, on a 20 line, so it was never a problem for me. I have some members who are on some poor quality lines and such so I went with this to see if we could clear up some of there problems. So far, they report good news. A couple of them which see no difference I suspect is due to their slow computers, no connection speeds. All in all, it helps some, and most importantly doesn't negatively affect anyone else so thats a win-win in my book. Awesome plug in. Ill get you some info when I gather it.
     
  8. Offline

    Raphfrk

    Thanks, the more "real-world" info I have the easier it is to optimize.

    I am thinking of looking at entity updates next. In principle, many updates could be combined into 1 for entities that are more than a certain distance from the player. You don't need to know that a pig has turned 1 degree if it is 50 blocks away.

    Did the GUI say that it had saved data?
     
  9. Offline

    NotYetRated

    I have yet to see any logs come through for the collect. Where do these save?

    I will have to check with those members this evening. It is possible it was their first start up and the did not heed my advice of not paying attention to their first run..... :)

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

    S0mebody

    This may help:
    http://library.linode.com/server-monitoring/munin

    Looking to try this out, sounds like a must have plugin.
     
  11. Offline

    Raphfrk

    They just print to the server log.
     
  12. Offline

    blutherz

    nice "bot" tool.....i mean that "can be"

    hope notch read such fixes mojang should implemt such stufff too!

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

    Sich

    ok, this is the good line for me for local headless lan proxy, with remote server runing the craftproxy server plugin.

    java -jar CraftProxyLite.jar 25565 <distant server>:20000 local_cache quiet bridge_connection
     
  14. Offline

    Raphfrk

    @Cid

    I updated, you logged off at exactly the time I logged on.

    The issue is that Notch's auto-generated chunks are easier to compress than complex chunks with lots of built stuff.

    I assumed that if the average was 5kB, then 16kB was enough length for the buffer.

    However, they can be 16kB+ if they are complex. I increased the buffer to 32kB and also fixed it so that it doesn't cause a disconnect error when that happens.
     
  15. Offline

    Cid

    Ok, will give it a test and let you know what comes about.

    Thanks Raph!

    After about 5 min of testing I have already trapsed all over the problem area and was never kicked.

    Will keep you posted.. Excellent work.
     
  16. Offline

    Raphfrk

    @Joy

    Updated again

    Version 48

    • Fixed a bug where a thread wasn't closing properly
    • Added support for variable cache disk sized to the GUI
     
  17. Offline

    Pim1234

    is this only for lan's??
     
  18. Offline

    Raphfrk

    Nope, in fact, I don't see much point in using it if you are on a standard LAN.

    It is designed to reduce upload bandwidth. I think the main people who would benefit are those who are hosting the server on their home computer.
     
  19. Offline

    Pim1234

    im am just doing that (hosting on my home computer).
    but what do i do wrong when i get this:

    Connecting to: 25565
    22:53:32 [INFO] [22:53:32] 127.0.0.1/50050 (pim): Unable to open socket to localhost:25565
    22:53:32 [INFO] [22:53:32] 127.0.0.1/50050 (pim): Unable to open connection to backend server

    i did everything... i connect trough 25564 but i still get this...
    i do have Hamachi... does that matter?
     
  20. Offline

    Raphfrk

    In plugins/CraftProxyLite/proxylite.txt

    Change

    default_server=25565

    to

    default_server=<your server's local ip>:25565

    Also, to connect to a server on the same computer as the client, you need to use a slightly different procedure, see the OP.
     
  21. Raph , Change

    default_server=25565

    to

    default_server=<your server's local ip>:25565
    If My Server Ip is with no-ip ( ex: minecraftquebec.no-ip.org do I have to change to minecraftquebec.no-ip.org:25565 ... ?

    Just to be sure , Thanks
     
  22. Offline

    Raphfrk

    It should be the local IP of the server. If you are running the server behind a router, then it isn't the same as the external IP.

    Type
    In windows:
    ipconfig

    In Linux
    ifconfig

    It will probably start with 192.168.
     
  23. Yes I know that part , the thing is that my internet IP changes everyweek ( when I go to my moms ... ) because I live with my father 1 week and my mom 1 week so I have 2 different IPs , I don't want my friends to change it everyweek :S So I was wondering if it would work with a No-ip or If you know a way to get a stable ip or something like that
     
  24. Offline

    Navist

    I am a server host. Going to download this and see what the players say about it. I don't think players will miss 50mb of space on their HD :) And it will increase the chance they already have chunks loaded in an area. 10mb will be overwritten to quickly. Great mod! I always look for new ways to improve my server.
     
  25. Offline

    jaboy

    i need to ask
    auto reconnect ?!
    does that mean if they lose connection it run of the cache ?!
    if yes: cant users then grift the whole map then reconnect ?!

    i looked at the script ... and i dont know what to put in the config file

    Code:
    clientversion=1.5_01 <- right ?!
    
    bridge_connection=true <- what ?!
    
    reconnectfile= <- what ?!
    
    monitor= <- what ?!
    
    seed= <- the map seed ?!
    
    cache_limit= <- what ?!
    
    default_server=25565 <- hey i know that :confused:
    
    quiet=true <- what ?!
    
    debug=false <- what ?!
    
    listen_hostname_port=20000 <- what ?!
    
    password=<- what ?!
    
    auth_off=false <- what ?!
    
    log= <- what ?!
    
    banned= <- what ?!
    
    info=false <- what ?!
    
    dimension= <- what ?!
    
    staticlocalhost=true <- what ?!
    
    disable_flood=false <- what ?!
    yes i know what you thing "he stupid :eek:"

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

    Cid

    I use no-ip and it works fine.
     
  27. Offline

    XORDYH

    NotYetRated, let me know how this works for you. When I enabled logging set to 300 s, I was getting reports every 1/3 s. I had to disable it because it was flooding the server log so bad I couldn't see anything else that was going on.
     
  28. Offline

    Pim1234

    could someone tell me (total noob) exactly how to do this?
    i can't get it to work :S
     
  29. Offline

    rtcabooservb

    Everytime I add "local_cache" to the craftproxy lite batch file, I get the error saying that the server is outdated.
    Here is my startup batch file for the proxy.

    Code:
    @echo off
    java -jar CraftProxylite.jar 25565 1337 auth reconnectfile  CPLreconnect.txt banned CPLbanned.txt log CPLlog.txt staticlocalhost  bridge_connection quiet
    pause
    Any suggestions? :/
     
  30. Offline

    Raphfrk

    The server port plugin allows you to teleport from one server to another.

    The plugin kicks the players with the message "[ServerPort] Please connect to : <new server>:<new port>".

    The proxy detects this and connects to the new server. The player's client doesn't even disconnect.

    It works like multi-worlds on Bukkit, so teleporting to nether doesn't work that well.

    It depends, if you are using a router, then you want something like

    192.168.1.2

    If you have an external IP, then you use minecraftquebec.no-ip.org:25565.

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

    Pim1234

    could you giv me a step by step easy to follow guide on how to install this?
     

Share This Page