[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

    LEOcab

    Hi. First of all a big THANK YOU to Raphfrk for this plugin. I'm forced to keep the view-distance set to 10 on my server because of the screwed up mob spawning and a lot of my users can't play very well on this setting due to lag, but now thanks to CraftProxy (and some convincing from me, haha) they are reporting better performance than before.

    Now, I'm having one small problem with just one of my users. He can play fine for a few days but then it totally breaks. This has already happened to him in two different computers (one of them a Mac). Once it "breaks", he connects, moves around for about 5 seconds and then he gets disconnected and I can't fix it. I had him delete the cache folder and the TXT file on his end, and I restarted the server multiple times, but he's still having problems. The CraftProxy window (running it as a separate process) says "Buffer mis-calculation for length??". I tried running it in plugin mode instead (which works for everybody else) but this user is still having problems. This is the console output when running it as a plugin:

    Code:
    [SEVERE] Buffer mis-calculation for length??
    2011-06-26 21:40:24 [INFO] Buffer mis-calculation for length??
    2011-06-26 21:40:24 [INFO] IO ERROR
    2011-06-26 21:40:25 [SEVERE] Exception in thread "CompressionThread"
    2011-06-26 21:40:25 [SEVERE] java.util.concurrent.RejectedExecutionException
    2011-06-26 21:40:25 [SEVERE]     at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source)
    2011-06-26 21:40:25 [SEVERE]     at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)
    2011-06-26 21:40:25 [SEVERE]     at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
    2011-06-26 21:40:25 [SEVERE]     at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    2011-06-26 21:40:25 [SEVERE]     at com.raphfrk.compression.Compressor.compress(Compressor.java:177)
    2011-06-26 21:40:25 [SEVERE]     at com.raphfrk.craftproxyliter.CompressionManager$CompressionThread.run(CompressionManager.java:74)
    2011-06-26 21:40:25 [INFO] 67.?.?.?/20380 (user): Closed connection to server
    2011-06-26 21:40:25 [INFO] Connection reset
    2011-06-26 21:40:25 [INFO] 67.?.?.?/20380 (user): Closed connection to client
    2011-06-26 21:40:25 [INFO] user lost connection: disconnect.endOfStream
    The only common denominator is that it's the same user. As I said above, two different computers. According to him he has no mods installed. I really need help with this because this is one of my most active regulars and he can't play at all without CraftProxy.

    Thanks in advance! ;)
     
  3. Offline

    iama

    it seems the developer of this wonderful plug-in has left us...
     
  4. Offline

    LEOcab

    I kinda noticed in the latest posts...

    I'm gonna take a look at the code when I get back from the gym and see if I can fix it myself. Which is doubtful as I have next to zero experience with these things, but I'll post back if I come up with anything. ;)
     
  5. Offline

    iama

    LEOcab, please, adapt craftproxy for bukkit 860 if you can. i can help you with testing
     
  6. Offline

    LEOcab

    I got the source, put a try/catch block around the first offending line (CompressionManager.java:74), and then rebuilt the JAR linking against the latest Bukkit API (#747). I still haven't figured out how to reproduce the problem on my end so I have to wait for the player who has the problem to help me test it. I doubt this will work at all; in fact there's a bigger chance of my whole server crashing but it's the first thing I can try. I'll keep studying the code and see what else I can come up with. ;)

    Download it here.

    Are you sure you meant #860 and not the latest, #935? I can post another version linked against the #860 API but I just wanna make sure first. :)
     
  7. Offline

    iama

    yes, i have problem with 860 + craftproxy (see below http://forums.bukkit.org/threads/pr...hing-chunk-data-803.15479/page-24#post-394522). ive download your build, but i have same error:

    launch line:
    java -jar CraftProxyLiter.jar 23074 192.168.1.200:38558 local_cache auth_off log log.txt compress_info monitor 1 debug

    craftproxy side output:
    http://pastebin.com/HpGCs0RM

    server side:
    http://pastebin.com/8hr49icn


    may be we can contact to icq or irc?
     
  8. Offline

    Dominic

    Man this sounds like a GREAT plugin but noone can connect to the server anymore with this installed...Hm...
     
  9. Offline

    Raphfrk

    Hey guys.

    The problem is that I don't really have much free time at the moment and I figured that I better to go cold turkey :).

    Has there been a version change since I was here last?

    Packet 80 is a packet that I send but only to proxies, it shouldn't be sent to the server. It is possible that you have the default server setup incorrectly.
     
  10. Offline

    disturbed13

    does anyone know if this will work on the 935?
    also i use Hamachi2 ( it is a VPN client [Virtural Private Network] to allow my friends on my server)
    does anyone know how to get this to work with the VPN or will there be issues? or what?
    thanks for any input
     
  11. Offline

    LEOcab

    My workaround seems to partially fix the issue with my trouble player. Apparently, now it only disconnects him once, instead of repeatedly kicking him 5 seconds each time after he reconnects. :p

    It's intriguing how it's just this one player. I have like four others (plus myself even though I'm only one foot away from the server) using CraftProxy and they have no problems. Just this one user on two different computers, and I can't reproduce the problem...

    @Raphfrk: Hey! Glad to see you're still here! Yeah, it could be that. Or perhaps it's one of my plugins that's interfering... No way to test it though as this happens randomly. I couldn't expect you to be any less confused about this particular issue. :(

    @disturbed13: I'm running it on #935 right now and it works, except for this one problem I'm describing. You could give my version a try which is the same thing except a small workaround that MAY make things better (or not), and linkage against the #935 API.

    To everyone: the plugin works. To those who say it doesn't work at all: it's probably conflicting with another plugin. Try the process of elimination... All I know is that it works on clean installs of #860, #928 and #935.
     
  12. Offline

    iama


    hi ! about packet 80 error. my common server have a standart setup, running on stable bukkit 860. what i need to change for craftproxy work for me ?
     
  13. Offline

    LEOcab

    CraftProxy works fine on 860. Do this: upload your Bukkit folder somewhere and I'll take a look at it. It should be easy to fix. ;)
     
  14. Offline

    iama

    i launch craftproxy not with bukkit

    java -jar CraftProxyLiter.jar 20000 25565 auth_off


    this runs on standalone server, not in plugin mode
     
  15. Offline

    LEOcab

    Oh, alright. What error do you get exactly on the client's side? Or does it not connect at all?
     
  16. Offline

    iama



    for test i try launch plugin in "plugin-mode". my proxylite.txt:


    Code:
    clientversion=
    bridge_connection=false
    reconnectfile=
    monitor=10
    compress_info=true
    seed=
    local_cache=true
    cache_limit=
    default_server=127.0.0.1:30000
    quiet=false
    debug=true
    listen_hostname_port=20000
    log=craftproxy.log
    auth_off=true
    password=
    banned=
    info=false
    dimension=
    staticlocalhost=false
    log_time_off=false
    disable_flood=false
    
    i started server and join. using compas i fly to server but folder minecraft/CPL_cache dont have any files. how i can see cache or compress result ?

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

    LEOcab

    I'm sorry, comrade, I don't know what to do about that... Even though you're running it as a separate process, try running Bukkit with no plugins and see if it works. Maybe it's a compatibility issue.

    The CPL_cache folder stays empty on the server side. Only the client side saves chunks locally. :p
     
  18. Offline

    iama


    oh..:) i hope our thread can be useful for other.

    but why in cfg file crafproxy this params

    local_cache
    cache_limit

    I think that still some files should appear in folder CPL_cache
     
  19. Offline

    RG_PankO

    I didn't get it.
    Can I or can not just paste it on to plugin directory and forget about it?
    I don't want to make my users download this jar and typeing commands or editing their launchers.
     
  20. Offline

    Pisi-Deff

    Sure you could do that. But then you would get no benefits whatsoever.

    If players at least connect directly to the proxy's port (by default 20000) instead of the server port (25565), they'll benefit from the fairness manager, which re-prioritizes packets.

    To benefit from the caching feature, they will have to download the jar, run it on their computer and connect to localhost.

    There just is no other way until Mojang implements their own chunk cache.
     
    RG_PankO likes this.
  21. Offline

    RG_PankO

    Could you please explain me what happens when the packets are re-prioritizes?
     
  22. Offline

    Pisi-Deff

    Don't remember exactly... It's probably explained somewhere within this topic by the author... but I think it prioritized game data over chunk data. So you'd always get the positions of entities, attacks, damage taken, et cetera; chunk data can wait.
     
  23. Offline

    rtcabooservb

    Does this still work and lower bandwidth?
     
  24. Offline

    Lunar Delta

    Still working perfectly for me, running it in standalone mode.
     
  25. Offline

    Chojin

    Tested with CraftBukkit #956 (so Minecraft 1.7.2), no problem at all :)
     
  26. Offline

    Gangsta_hotdog

    I'm getting a ton of random disconnects and stuff on the latest bukkit
     
  27. Offline

    jeanpoivrot

    can't connect, "protocol stream closed", latest craftbukkit RB
     
  28. Offline

    dominixise

    i had that protocol stream closed error too, but i think i fixed it. I am using bukkit 953 , craftproxyliter v.99 and serverport v.375 . I have three servers connected, 2 local on my windows server 2008 box and one web server from servercraft.co

    serverport.txt globalhostname= make sure to use a line like this externalIPhere:port
    similar to like 184.23.45.2:40932 make sure that port is forwarded on your router or test it later without. dns server names work for me too.

    craftproxyliter proxylite.txt, default_server= make sure to use a line like this 25565,externalIPhere:port
    similar to like 25565,184.23.45.2:40932

    I also have staticlocalhost = true on my localhome server, i forget what that does though

    also do the same thing for your other server or servers except changing the ip address and ports to what they are like shown above. This is used for both having two servers on one machine and or having two or three servers on one machine and having one elsewhere like at a friends place.

    Make sure you have your a serverport plugin port set for each server too and port forwarded. And also serverport setname to your world name or something you like. And to also make your servers in offline mode and use craftproxyliter's internal auth_off=false syntax.

    So once your done all that you should be able to invite each servers with the plugin port /serverport invite iphere:pluginport

    and make a portal /drawgate watercurtain on each server and name them correctly.

    So the reason i wanted to post was that I been trying to use serverport and craftproxy for a few months and I finally still have it working and got rid of that "end of protocol stream" I really think end of protocol stream means that the server disconnected you. Cause when i restart my server it says that again. But this method configuration works as i remember raphfrk explaining it throughout his forums posts.
     
  29. Offline

    jeanpoivrot

    hmmm, usually i din't have problem with settings up my applications, i was thinking its a compatibility issue with one of my mods/plugins, i retry later, thanks dominixise :)
     
  30. Offline

    AgentKid

    Any way to get compatibility with BukkitContrib?
     
  31. Offline

    1n5aN1aC

    how is it not compatible with bukkitcontrib?
     

Share This Page