PlanetSide 2 Live Population API
Find a file
2022-11-26 21:55:17 -05:00
.github/workflows docker stuff 2022-11-20 22:19:55 -05:00
hack/codegen add magriders to websockert 2022-11-24 02:21:32 +00:00
services nuke old api, add html 2022-11-26 21:52:59 -05:00
terraform initial commit 2022-11-20 14:49:35 -05:00
.dockerignore docker stuff 2022-11-20 22:19:55 -05:00
.gitignore initial commit 2022-11-20 14:49:35 -05:00
Cargo.lock add graphql support 2022-11-25 18:36:33 -05:00
Cargo.toml initial commit 2022-11-20 14:49:35 -05:00
docker-compose.live.yaml dc: fix redis connection 2022-11-23 16:02:24 -05:00
docker-compose.yaml refactor, add vehicles and classes 2022-11-23 15:16:49 -05:00
Dockerfile add ca-certs and add live deploy compose file.. until we do nomad :) 2022-11-20 23:58:30 -05:00
README.md remove api reference from README 2022-11-26 21:55:17 -05:00

Saerro Listening Post

PlanetSide 2 live population API. This API is free and open for anyone to use.

https://saerro.harasse.rs

Our methodology is to add any player ID seen on the Census websockets to a time-sorted set, and returning the number of player IDs seen within 15 minutes.


The one and only goal of this app is to provide a current "point-in-time" population status for PlanetSide 2, per world, per faction, (and later, per continent.) Historical info is not a goal; you may implement this on your end.

Please open an issue here or get in touch with Pomf (okano#0001) on the PS2 Discord if you have complex use cases for this data; it may be trivial/easy to implement APIs tailored to your needs.

The main use case is for Medkit bot to have an in-house source of population data, without relying too heavily on any third-party stats service, like Fisu, Honu, or Voidwell; which all have different population tracking needs and goals (and thus, different data.)

Architecture

  • Websocket processors
    • A pair per PC, PS4US, PS4EU
    • Connects to wss://push.nanite-systems.net and Census Websocket
    • Primary will connect to NS.
    • Backup will connect to Census. It will wait for 60 seconds before deciding the primary is dead, and then start processing events.
  • API
  • Redis
    • Using ZADD with score as timestamp, ZCOUNTBYSCORE by timestamp in 15 minute windows, and cleaned up with SCAN+ZREMBYSCORE, population data is tracked.
    • There is deliberately no persistence.
  • Redis "Tender"
    • Cleans up Redis every 5 mins.