Context
We want to measure query federation in the Wikibase ecosystem to be able to evaluate the success of our initiatives focused on improving it. See details in the main doc.
We are currently looking for a metric that could be used that is 1) easiest to measure, 2) provides meaningful insights that can drive our work.
One of the approaches we decided to explore is measuring on the Query Service UI.
+: Naturally mitigates the effect of subqueries coming from other SPARQL endpoints, only focusing on the 'original' queries.
-: Completely ignores the 'original' queries that were executed from a client different from Query Service UI (for example, Python notebooks).
Task
Measure:
- A: # of federated queries that started on a specific WD/WBQS UI in the last day/week/month
- B: # of non-federated queries that started on this WD/WBQS UI in the last day/week/month
Our metric is A/(A+B).
Acceptance Criteria
Write a report on Phabricator that assesses the feasibility of a future set of work that builds something like:
- No dashboard required at this point, but we should be able to run this measurement ad hoc for a given WD/WBQS UI to get the measurement.
- For WBQS UI on Cloud, we should be able to get measurements for all running Wikibases separately.
It's not necessary to fully implement this metrics but having a plan of work with some of the tickets necessary would be desirable.
Notes
- When analyzing a script, we should not consider it federated if the SERVICE syntax is only used for utilizing helpers. See example chat with GPT on this topic. One approach to recognizing proper federation would be to compare the URL after SERVICE with the instance's Allowlist. If this is not available yet out of the box, another cheapest meaningful solution could be used in the prototype.
- The PrPL team is already experimenting with doing similar analysis of queries on the front end (although, they are classifying them according to different criteria). Please get in touch with them where possible. T391264 cc: @Ifrahkhanyaree_WMDE @AndrewTavis_WMDE @ItamarWMDE