Basic statistics - Data Gathering - #7839
Draft
Arnei wants to merge 6 commits into
Draft
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Putting this as a draft for now, but any and all feedback is very much welcome. Of particular interest:
file-fetchevents 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.tsandapi_datapass.tsshould be enough. Then runnpm run dev:engageand use the development ui to watch videos.AI Usage
This has been assisted by ChatGPT in various places.
Your pull request should…