[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

    Yeah, that was implemented in version 88 (see change log :)).
     
  3. Offline

    Kimundi

    Well, then it doesn't work :p
    19:52:51 [INFO] [19:52:51] [...] (Kimundi): Closed connection to server

    Wait, I'm stupid, I should Update the Plugin as well as my local copy...
    Yep, it's gone.
     
  4. Offline

    ssechaud

    ??

    [19:07:56] 127.0.0.1/56995 (ssechaud): FAT error, unable to find hash in file number 86
     
  5. Offline

    Raphfrk

    I assume that is the local log?

    It means that there was corruption in the cache.

    Basically, there is a FAT file that lists where to find all the hashes. That is saying that the FAT said a particular hash should be in file 86 but it wasn't.

    The best plan would be to delete the cache, maybe there was a save error or something.
     
  6. Offline

    thepackett

    ok, i was just worried because when i had multiple worlds the reduction stayed at around 50% (this is the previous version, i've already updated now), but when i had more than one it would often be at 10% or so. Could not having enough processing power/ram cause this?
     
  7. Offline

    Raphfrk

    I don't think so, how much disk space is assigned to the cache and was it using all of it?

    Also, the more you move around, the less effective it is, since it is less likely that you were there before.
     
  8. Offline

    thepackett

    i had allowed it 1024 MB (1 GB) and it has stored 50 MB of map data. I had been staying in relatively 1 spot and did not spawn enough map for it to be 50 MB and the number kept going up, that is why i am concerned.
     
  9. Offline

    Raphfrk

    It keeps saving the chunk data as it is received, even if they were received already.
     
  10. @Raphfrk
    I've just updated to ver .093 from .083. The session window is now filling up with this :

    [01:50:21] 127.0.0.1/51979 (icephantom): Chunk update packet sent for unallocate
    d chunk 144, 192 adding fake init packet
    [01:50:21] 127.0.0.1/51979 (icephantom): Chunk update packet sent for unallocate
    d chunk 160, 192 adding fake init packet
    [01:50:21] 127.0.0.1/51979 (icephantom): Chunk update packet sent for unallocate
    d chunk 176, 192 adding fake init packet

    Are these messages 'dis-ableable' ( is there such a word ? ) :confused:
    or is there some bad reason I'm receiving them please ?
     
  11. Offline

    Raphfrk

    Hmm, what version of Bukkit are you using?

    It is basically saying that the server didn't initialise the chunk before sending data for it. This used to happen when teleporting for older versions of Bukkit.
     
  12. Offline

    Todrias

    I'm getting the same messages. It started with RB#798 and it's still happening on RB#803
     
  13. Offline

    Raphfrk

    I think they might have reverted the teleport code.

    Does this happen when you teleport, or is it all the time?
     
  14. Apologies, should have included that - bukkit #798 currently, although I've just downloaded #802 and will be uploading that to the server shortly.
    [Edit]
    Just seen your post about teleporting - I haven't teleported anywhere on the session where this is occuring.
    Also, just for info, I'm using Performance Tweaks if that makes any difference ? although I was using this when using ver. 083 and didn't have these messages coming up.
     
  15. Offline

    Raphfrk

    Hmm, can't replicate this.

    Not sure, but it might be worth seeing if it happens with that plugin disabled. Does it happen pretty regularly (so you can quickly check)?

    @Todrias are you using Performance Tweaks?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  16. This is unfortunate - I've reverted to ver. 083 for the time being and all the messages have stopped.
    All I was doing when the messages occured was roaming around my minecraft house setting some thing up & tidying up my front garden - nothing unusual. For info - my connection is a lan connection to the server.
     
  17. Offline

    Raphfrk

    Could you try with a few over versions :) (if it doesn't take to much time). Maybe, you can figure out which update causes it.

    I can then focus on those changes.
     
  18. I'm willing to assist, however, where do I get your older versions please ? I jumped from 083 to 093 - I've nothing inbetween.
    By the way, just tried going back to 093 on both server & client. The moment I log in, the messages begin. With ver. 083 - nothing ? just the normal loading chunk messages, but nothing else.
    [Edit]
    Messages only appear on the client window, not the server.
    My startup params : java -jar CraftProxyLite.jar 25565 mine1:20000 local_cache bufferlatency 2 auth_off
     
  19. Offline

    Raphfrk

    Hmm, which suggests that it is the server proxy that is breaking the ordering.

    Anyway, I added a link to the older versions in the top post. It is in the download section.

    Old Releases

    Actually, I can replicate it now, I was only trying it with 1 proxy, figuring it was a server issue.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  20. Just tried 086 and the messages are occuring on that one as well, so working my way back from there.

    Just tried 084 and the messages are occuring on that version as well, it seems anything after ver. 083 is causing the messages to come up.

    Just to make sure, I used the ver. 083 included in the zip file I just downloaded - that version does not cause the messages to come up. So this comfirms anything above ver. 083 causing the issue.
    Thanks for any help you can give.

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

    Raphfrk

    I have updated, this issue should be fixed.

    Thanks to you too :). I think I have it fixed now.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  22. Just seen your ver. 094 and downloaded it. Quite a reduction in file size ! ...... however, this one works without the messages appearing in the client window. Early days yet - only been running it for about 5 mins, but on the previious versions, the messages started the instant you logged in, so, up to now, appears to fix the problem with your latest version.
    Thanks.
    [Edit]
    Missed your post about the fix, the thread had started a new page and I hadn't realised, but thanks again - still working after 10mins+

    Well, took around 35mins but on client window :
    Loading file: 804
    IO ERROR
    [04:17:42] 127.0.0.1/53895 (icephantom): Unable to flush output stream
    [04:17:42] 127.0.0.1/53895 (icephantom): Closed connection to server
    [04:17:42] 127.0.0.1/53895 (icephantom): Closed connection to client

    and I was kicked from the server. Help needed again please ........
    Still using bukkit #798 - Craftproxy 094 at both ends.
    [Edit]
    Cancel above - it appears my server had shutdown unexpectedly. I'll post again if it re-occurs. Sorry about that.

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

    rtcabooservb

    I am currently using this to start up craftproxy for my server.
    Code:
    java -jar CraftProxyLiter.jar 25565 1337 auth_off quiet bufferlatency 0 compression_level 0
    Is there anyway I can tweak it some more to make latency lower and the connection faster? I keep the main server open on port 1337 so it can authenticate through minecraft.net.
     
  24. Offline

    Raphfrk

    That is pretty much as fast as it can go. Are you seeing major latency? When testing on localhost, I don't really see much latency. It is supposed to tag chunk data packets as lower priority.
     
  25. Offline

    Kimundi

    Hm, If i close the proxy with ctrl-c instead of typing end into the console it throws an nullpointer exception:
    Code:
    Exception in thread "main" java.lang.NullPointerException
            at com.raphfrk.craftproxyliter.Main.main(Main.java:148)
    Also, for simplicity and ease of use you could include these points to the first post:
    • You don't need two differnt port numbers in client mode: proxy can listen on localhost:25565 and connect to remotehost:25565
    • You don't need to expose two differnt ports in server mode, as all regular traffic can also be routed through the proxy.

    For my private Server, I simply setup craftproxy on port 20000, then changed my firewall to route 25565 to 20000.
    But an simple alternative would be to setup craftproxy on port 25565, and give the mc server itself the port 20000, this way you don't have to change the firewall settings at all.
     
  26. Offline

    Pjstaab

    Well i'm having a heck of a time getting this working. It was working in plugin mode when I was connecting from the same computer but my friend couldn't connect and I can't connect now under standalone mode. Not sure if i'm doing it wrong or what.
     
  27. Offline

    Kimundi

    If he can connect to the server without the proxy, do this:
    Server:
    change the Minecraft server to listen to port 20000 instead of 25565
    setup the proxy-plugin to listen to port 25565 and connect to 20000

    Client:
    remotehost = same address as before
    remoteport, same as without proxy = 25565
    localhost port =25565

    This way, evry connection to the server gioes thrugh the proxy, no mather if the client uses the poroxy or not
    On client side, you can either connect directly to the server, or to lacalhost wich will connect to the server via proxy
     
  28. Offline

    Lunar Delta

    This tool is AWESOME, I must say. It has cut average upload speeds on my server down to about 500kbps, from 5mbps or more. Nobody has reported any problems whatsoever. I hope that this tool stays around for a long time. :D
     
  29. Offline

    Pisi-Deff

    "Fixed network packets being sent unbuffered, causing huge amounts of packets being sent" - Notch
    The buffer feature won't be needed anymore, apparently, thanks for building it though, Raph :D
     
  30. Offline

    Raphfrk

    Yeah. I wonder if he will hit similar problems. Buffering is risky, as you need to be careful about latency.

    I was also considering adding a feature where entities would be refreshed (though probably as a Bukkit pull). Normally, the server just sends relative movement packets (go up by 0.2 of a block) and so on. This means if the initial position is out of alignment (or alignment is lost), then it stays out of alignment.

    1.6 will change the code so every 20 seconds, the server sends the actual position of the entity.
     
  31. Offline

    spunkiie

    REQ: Whitelist.

    We are planning to let only certain users (VIPs) use this plugin.
     

Share This Page