Skip to content

Alert Redrive project #356

@Maelstromeous

Description

@Maelstromeous

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions