[REL] [CLIENT] [LOBBY] [LIVE GAME] Faster Server Browser for Titans & Classic

Discussion in 'Released Mods' started by mikeyh, September 9, 2014.

  1. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    THE FASTER SERVER BROWSER IS NOW BACK ON PAMM

    Revised 2.3.0 functionality tested on 79600:
    • fixes missing starting planet html
    • adds a filter retired checkbox to get rid of those annoying retired games
    • adds the following to the selected system in new game
      • starting planets
      • halley count
      • tooltip with radius and metal spots
    • adds a connecting to play fab message when clicking join or spectate and waiting for lobbyId to resolve to server hostname : port
    • prompts to refresh user interface when server mods using scenes are loaded in new game lobby
    • switched to uber feed (full filtering is now implemented by Uber)
    • fix for stale data in Uber games feed (fixed by Uber)
    • fix for auto refresh checkbox not working
    PA Mod Manager (PAMM): https://forums.uberent.com/threads/rel-pa-mod-manager-cross-platform.59992/

    Historical Info

    Add votes to this task: PA#4081

    This is another quick fix mod that patches the server browser to use a filtered gzipped version of the Uber feed (until Uber can fix).

    Yes... it's much faster and uses much less data.

    My feed filters out any games with missing TitleData and uses maximum gzip compression.

    This is hosted on my AWS CloudFront service (just like Uber's feed) and I'll keep it active until it starts costing me too much.

    After that I'll switch to just the gzipped Uber feed with no filtering.

    Here's some example numbers:

    • typical Uber lobby feed is around 500KB/sec (4 Mbit/sec)
    • when really busy it's over 800KB/sec (6+ MBit/sec) with 1,000+ entries of which only 30-50 are valid games
    • gzipped filtered feed is around 40KB/sec (0.3 Mbit/sec) up to 60KB/sec (<0.5 Mbit/sec) and supports 304 Not Modified responses when unchanged which are around 404 bytes
    The mod also patches the following:
    • failed to join now returns to game browser
    • leaving a game now returns to game browser
    • kicked from a game now returns to game browser
    • shows starting planet icons in currently selected game details
    • automatic updates currently selected game details
    • reconnect to last game started or joined (if different from server): PA#1270
    EDITS: removed manual modinfo.json and added numbers and other patches.
    Last edited: April 25, 2015
    huangth, Remy561, xankar and 13 others like this.
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Using a proxy to circumvent the unmoddable native webservice call to ubernet? Nice!
    tatsujb and proeleert like this.
  3. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    I just patched it by replacing updateServerData with an ajax call to my optimised feed.
    tatsujb likes this.
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    As I said, nice. I didn't come up with that idea. Only went like "damn native code" and accepted it for what it is.
  5. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Thanks... I was over thinking it for a while trying not to touch the Uber code. eg the craziest one was spoofing the CloudFront server using a DNS entry in the hosts file. :)
    tatsujb and cola_colin like this.
  6. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    I have no idea what is going on here :rolleyes:
    aapl2 likes this.
  7. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  8. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Semi-manual installation instructions:
    OS X: ~/Library/Application\ Support/Uber\ Entertainment/Planetary\ Annihilation/mods/
    Linux: ~/.local/Uber Entertainment/Planetary Annihilation/mods
    Windows: %LOCALAPPDATA%\Uber Entertainment\Planetary Annihilation\mods where %LOCALAPPDATA% in a typical install might be: C:\Users\<username>\AppData\Local
    tatsujb likes this.
  9. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    The native api call can be replaced by on xhr request to enable the gzip compression without the need for an external api endpoint :

    Code:
    engine.asyncCall("ubernet.getCurrentGames")
    to
    Code:
    $.ajax('https://uberent.com/GameAcquisition/CurrentGames', {
                    headers: { "X-Authorization": sessionStorage.jabberToken }
                    ,dataType: 'text'
                })
    With this, I'm going from 3Mbps to 400Kbps with the current game list. But yes, the prefilter could definitely help too :)
  10. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Yep, but don't use that server directly as it will cost them more.

    Use their CloudFront instance on http://d2803xoht194y.cloudfront.net/GameAcquisition/CurrentGames (no authorisation header is needed).

    For my filtered feed I'm using HTTPS which is more expensive and I'll probably switch to HTTP if it starts to get costly.

    I wanted to demonstrate the difference with a filtered gzipped feed.

    Do you want to push this and gOptimiseUserTagMap out to PAMM?
    tatsujb likes this.
  11. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Now available on PAMM.
    Quitch likes this.
  12. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    I like that it doesn't have the ColaColin game that is running for ages still :)
  13. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Yeah I guess I am playing around with the game creation API too much xD
    proeleert likes this.
  14. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    I know this is off topic but does anyone know how to do this, if you have not already seen it.

    I heard it's impossible, but there's got to be some weird way to do it.
  15. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Some AWS stats for the filtered gzipped games feed over the past 24 hours:
    • 70,000+ requests
    • 4GB data
    And those are with only a small number of users and a ~50KB feed vs 550KB !!!
    tatsujb and DeathByDenim like this.
  16. Schulti

    Schulti Active Member

    Messages:
    226
    Likes Received:
    56
    I´m sorry - this mod sounds good - but can you explain me, what it actually does? What is this filtered data?
    Thx!
  17. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    eg the uber feed right now has 621 entries of which 502 are invalid and 103 are private games.... all of those are immediately filtered in their code leaving 16 games to display in the lobby.

    My feed filters those, then max gizps the result reducing the current feed from 562KB to 49KB.

    I've also enabled 304 Not Modified responses if unchanged which are around 404 bytes :)
    tatsujb likes this.
  18. DeadMG

    DeadMG Member

    Messages:
    217
    Likes Received:
    8
    Game goes from "Totally unplayable" to "Enjoyable experience". You are the winrar.
  19. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    tatsujb and Quitch like this.
  20. earth75

    earth75 Member

    Messages:
    93
    Likes Received:
    25
    awwww yiiiss. But the game queries your personnal server instead of the official servers, is that normal?

Share This Page