Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert Redrive project #356

Open
Maelstromeous opened this issue Mar 22, 2023 · 0 comments
Open

Alert Redrive project #356

Maelstromeous opened this issue Mar 22, 2023 · 0 comments

Comments

@Maelstromeous
Copy link
Member

Maelstromeous commented Mar 22, 2023

This is potentially the biggest re-write to the PS2Alerts backend since V4.

This is to create a system that will utilise the Census endpoint https://census.daybreakgames.com/get/ps2:v2/world_event?type=metagame&c:limit=500 that pulls in all alerts since 1st Nov 2019.

Using this data, we should be able to reconstruct the entire alert meta since that date, including beyond Jan 2021 when PS2A formally started collecting again.

Event data types

The below events are available:

Event Type Available as of 2019-11-01? Example
AchievementEarned Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=ACHIEVEMENT&after=1667260800&before=1667266200
BattleRankUp Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=BATTLE_RANK&after=1572658200&before=1572652800
Death Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=death&after=1572652800&before=1572656400
FacilityControl Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/world_event?type=facility_control&after=1572652800&before=1572656400
GainExpereince No BUT varunda has data
ItemAdded Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=item&after=1572652800&before=1572656400
PlayerFacilityCapture PlayerFacilityDefend Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=FACILITY_CHARACTER&after=1667260800&before=1667266200
MetagameEvent Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/world_event?type=metagame&after=1572652800&before=1572656400
VehicleDestroy Yes https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=vehicle_destroy&after=1572652800&before=1572656400

Varunda has a copy of event data as of 2021-07-09, however it wil have to be a CSV data dump as there's no API on honu.

Methodology

Create a job that upon an API request accepting World and a date range, performs the following:

  1. Pulls in MetagameEvent for the date range. This must support paging as Census limits to 1000 events.
    1.1 Handling of alerts the end the day after or start the day before. This can likely be handled by increasing the start and end times by 5400 seconds (1:30 hours each way)
  2. Creates a list of Alerts based of start and end metagame event pairs (each start should have an end). TImeout checks need to occur (>2 hours is abnormal and needs handling)
  3. Pulls in a list of events from Census based on the following event types:
DEATH
FACILITY_CONTROL
VEHICLE_DESTROY

e.g. https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=DEATH&after=1572571800&before=1572566400 to pull in all deaths in that alert range.

A filter for world will need to be applied, it is not possible to filter by world on /event.

  1. Clear the current data for the alert in question (via instanceID)
  2. Send the events to a special RabbitMQ queue for Aggregator to ingest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant