Skip to content

Basic statistics - Data Gathering - #7839

Draft
Arnei wants to merge 6 commits into
opencast:developfrom
Arnei:basic-statistics
Draft

Basic statistics - Data Gathering#7839
Arnei wants to merge 6 commits into
opencast:developfrom
Arnei:basic-statistics

Conversation

@Arnei

@Arnei Arnei commented Aug 5, 2026

Copy link
Copy Markdown
Member

Based on the specification from the discussion: https://github.com/orgs/opencast/discussions/7620

This is a first attempt at implementing the basic built-in statistics in Opencast, specifically the part that concerns itself with gathering raw events. That means there is no way to turn the events into a view count yet.

The main things this PR concerns itself with are:

  • Raw event storage
  • Daily hash secret
  • Event push APIs
  • file-fetch events

Putting this as a draft for now, but any and all feedback is very much welcome. Of particular interest:

  • Which nodes should the basic statistics service live on? Should remotes be used?
  • Is this a sane way to generate and distribute the daily secret?
  • Can sending file-fetch events from the StaticResourceServlet event work like that?

How to test this patch

True to the idea of basic statistics, there should be no extra setup necessary. If you want to generate more evens than just file-fetch, you'll the Paella PR too.

Paella PR: polimediaupv/paella-opencast#163. You can can check that out locally and make it point to your local Opencast instead of stable.opencast.org. Changing vite.config.ts, search_datapass.ts and api_datapass.ts should be enough. Then run npm run dev:engage and use the development ui to watch videos.

AI Usage

This has been assisted by ChatGPT in various places.

Your pull request should…

Arnei added 5 commits July 22, 2026 11:54
Adds a new module for Opencast basic statistics, which is a system that
will allow Opencast to gather and report basic statistics.

This includes a basic service, database setup and endpoint for adding
*raw events*.
Adds the second push endpoint for trusted pushes.

Also adds session hash calculation.

Also adds some skeleton code for generating the daily secret,
which is by no means finished and will error on non-leader nodes.
Moves the service for daily secret generation into their own
modules, with the intent of using the "remote" architecture
for inter-node communication.

This also means we don't need to configure the "leader" node
anymore, as the node with the impl module is automatically
the leader. Though care has to be taken that it is only
employed on exactly one node.
Add a function to the StaticResourceServlet that sends file-fetched
events to the statistics service. Concerns:
- Properly determining mp and element id
- Properly determining event type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant