SRGSSR / pillarbox-documentation

Technical cross-platform documentation for Pillarbox
https://www.pillarbox.ch/
MIT License
3 stars 0 forks source link

Write QoS specifications #70

Closed defagos closed 4 months ago

defagos commented 6 months ago

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

Acceptance criteria

Tasks

defagos commented 6 months 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 6 months ago

First draft:

Image

jboix commented 5 months ago

See here the format for a START event payload:

{
    "session_id": "1",
    "event_name": "START",
    "timestamp": 1717665997932,
    "data": {
        "time_metrics": {
            "metadata": 1200,
            "asset": 1500,
            "token": 1000,
            "drm": 100,
            "total": 2856
        },
        "screen": {
            "width": 1280,
            "height": 720
        },
        "os": {
            "name": "android / iOS / macOS / windows / linux ",
            "version": "11.23"
        },
        "player": {
            "name": "pillarbox / video.js / letterbox",
            "platform": "android / apple / web",
            "version": "2.0.1"
        },
        "browser": {
            "name": "safari / chrome / firefox",
            "version": "11.0"
        },
        "media": {
            "id": "urn:rts:video:1234",
            "metadata_url": "https://il.srgssr.ch/composition/?urn=urn:rts:video:1234",
            "asset_url": "https://akamai.com/quality_content.m3u8",
            "origin": "ch.srgssr.srf-meteo / www.rts.ch/info/article/1234"
        },
        "device": {
            "id": "MAC / IDFV",
            "model": "Samsung Galaxy S24 / iPhone15,7",
            "type": "TV / Car / Phone / Tablet / Desktop / Headset"
        }
    }
}

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

device_id device_model ... payload
iOS iPhone15.7 ... { JSON }

Remarks:

defagos commented 5 months 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,
        "url": "https://www.rts-vod.akamai.com/content/segm10.ts",
        "log": "Raw error information as returned by the player, for example stack trace"
    }
}

Some remarks:

defagos commented 5 months 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,
            "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 5 months 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.

defagos commented 4 months ago

@amtins contacted the RTS team but got no answer. Maybe we should ask the GD data governance team directly.

defagos commented 4 months ago

The mail has been sent. Moving this task to Follow while waiting for an answer.

amtins commented 4 months ago

Summary of the meeting with the legal department of the GD

  1. The declaration to User Centrics is mandatory to ensure transparency with our users. When QoS is ready to go live, we'll need to contact him again to draft the text for User Centrics to distribute to all business units. Counterparts in the various business units will also be copied on the e-mail.
  2. The Pillarbox QoS service will have a necessary status and cannot be deactivated by the user. I have stressed that the purpose of this service is to ensure that what needs to work works, so that our users can enjoy the best possible experience, and not to feed traffic analysis tools.
  3. The collection of the user's IP address is authorized for Pillarbox QoS. I've highlighted the case of users who were geolocated abroad even though they were in Switzerland.