SRGSSR / pillarbox-documentation

Technical cross-platform documentation for Pillarbox
3 stars 0 forks source link

Write QoS specifications #70

Open defagos opened 1 month ago

defagos commented 1 month ago

As a Pillarbox team member I need to better understand how Pillarbox behaves in production.

Acceptance criteria

Tasks

defagos commented 1 month ago

Excellent WWDC session about KPIs we can extract and how. Here are the associated slides for quick reference. Associated sample code and video can also be found online.

defagos commented 1 month ago

First draft:

Image

jboix commented 3 weeks ago

See here the format for a START event payload:

{
  "session_id": "1",
  "event_name": "START",
  "data": {
    "device_id": "MAC / ISBN",
    "device_model": "Samsung Galaxy S24 / iPhone15,7",
    "device_type": "TV / Car / Phone / Tablet",
    "screen_width": 1280,
    "screen_height": 720,
    "os_name": "android / iOS / macOS / windows / linux ",
    "os_version": "11.23",
    "browser": "safari / chrome / firefox",
    "browser_version": "11.0",
    "player_name": "pillarbox / video.js / letterbox",
    "player_platform": "android / apple / web",
    "player_version": "2.0.1",
    "origin": "ch.srgssr.srf-meteo / www.rts.ch/info/article/1234",
    "media_id": "urn:rts:video:1234",
    "media_source": "https://il.srgssr.ch/composition/?urn=urn:rts:video:1234",
    "time_metrics": {
      "media_source": 1200,
      "asset": 1500,
      "drm": 100,
      "total": 2856
    },
    "timestamp": 1717665997932
  }
}

And an example of how it can be stored in the database:

device_id device_model ... payload
iOS iPhone15.7 ... {"session_id": "1", "event_name": "START", "data": {"device_id": "MAC / ISBN" ... }}

Remarks:

defagos commented 2 weeks ago

See here the format for an ERROR event payload:

{
    "event_name": "ERROR",
    "session_id": "1a2b3c-xyz",
    "timestamp": 1717665997932,
    "data": {
        "severity": "WARNING / FATAL",
        "name": "ERR_001",
        "message": "Not found",
        "player_position": 11000,
        "log": "Raw error information as returned by the player, for example stack trace"
    }
}

Some remarks:

defagos commented 2 weeks ago

See here the format for an event payload:

{
    "event_name": "BUFFER / HEARTBEAT / STOP / STALL / DISCONTINUITY / ...",
    "session_id": "1a2b3c-xyz",
    "timestamp": 1717665997932,
    "data": {
        "url": "https://www.rts-vod.akamai.com/content/segm10.ts",
        "bitrate": 1000000,
        "bandwidth": 2000000,
        "buffer_duration": 120000,
        "stall_count": 2,
        "stall_duration": 1000,
        "playback_duration": 40000,
        "player_position": 10000
    }
}

Some remarks:

Open question

Cumulative values can be sent in different ways to create charts that show total or increments:

We should investigate what is possible with graph tools before we decide what we send.

defagos commented 2 weeks ago

TL;DR We keep things as simple as possible and avoid introducing complex logic where no strict alignment is required.

Playback sessions

In the end, and from a QoS perspective, having the same media counted as two sessions or seen as a single one should not be relevant. Therefore we should keep each platform implementation as simple as possible and identify sessions in the simplest way on each.

Enabling / disabling QoS on the fly?

Is it a problem if we send QoS data about 3rd party content to our QoS service?

GDPR compliance

As long as we don't store any IP address server-side, the data we send should be safe. But we should check with the data officer first.