Page MenuHomePhabricator

[Spike] Review DPLA's top phab tasks related to Commons Impact Metrics
Closed, ResolvedPublic2 Estimated Story Points

Description

Context

The Advancement department's Culture & Heritage team asked the Digital Public Library of America what their top structured data tasks were. They also included their top analytics tasks.

As part of our work to get ready for the GLAM Wiki conference, let's review the top requests and see if we can meet needs outlined.

Tasks

This is an old one that has a lot of discussion on it that I think is mostly missing the point and might be discouraging any developer work, but the request is simple. If I have a list of files to query in the API, I cannot actually send a request without first doing another query to the Commons API to translate the file name to a server path. This is a major performance issue over large sets, because this additional query for every file is a significant cost over millions of files.

This idea for incorporating media requests in the PageViewInfo extension would greatly improve ease of access to the data, since you could then get the data you wanted from the Commons API itself, just using a category generator and the right page properties.

These are a set of tickets around extending the time and granularity of available data in PageViewInfo. It's mainly only of use to me if T235588: PageViewInfo should include media counts on ?action=info for stuff in File namespace is also being done, but these would make the data you could get from the API actually useful for our applications, whereas the current design with only a moving window of a few days' data makes this more useful only for the novelty right now.

  • NTY AQS data in wikireplicas

Generally, one thing that is not currently captured in Phabricator—because I am not sure what it would entail or if it's even feasible—would be inclusion of the data behind all the AQS endpoints in the actual wiki replicas such that you could do a query in Quarry where you, for example, join categorylinks and mediarequests tables and get page view reports that way.

Event Timeline

• VirginiaPoundstone raised the priority of this task from Medium to High.Nov 7 2023, 11:41 AM

Re. T244712:
Francisco was suggesting to allow API users to input EITHER upload file paths OR file names. And then, if the passed string was a file name, convert it to an upload file path in AQS's JavaScript.
This way, we would not have to change the mediarequests calculation in SparkSql and neither the Cassandra loading job, and neither reload years of data, which would take months it seems.
This approach has some drawbacks, though:

  • The conversion would couple AQS code to MediaWiki internal code (MD5 digits). If the related MediaWiki code changes in the future, we'd have to update our code if feasible, otherwise our code would break.
  • Given a file name, it seems it's not always possible to deduce its upload file path. I understand that this would be possible if we only reported on images uploaded via commons.
  • The TOP endpoint, would still serve upload file paths instead of file names.

So we still need to make the difficult decision: do we want to deploy the easy solution with the corresponding drawbacks? do we want to build another endpoint based on file names from scratch with the engineering costs? other options...?

Re. T235588:
This seems like a task for PageViewInfo extension maintainers no?
(Also applies to the tasks in the 3rd checkbox in the task description)
@VirginiaPoundstone Are we them? :-)

Re. NTY AQS data in wikireplicas:

The part of the data that backs AQS up that is not already present in the wiki replicas is the traffic related data coming from the webrequest pipeline.
This data is bigger than the one coming from the MediaWiki databases. For a comparison, the full revision table up to today is about 273.8GB, while the mediarequest table for the last 4.5 years is about 33.5TB.
I don't think it would be a good strategy to load mediarequests and other large datasets like pageviews into the wiki replicas. It would likely generate performance problems.
Especially the types of queries like joining categorylinks with mediarequests.

Maybe this is another use case for the commons impact metrics data prototype. It seems the data we'll provide answers the type of query in the description.

mforns set the point value for this task to 2.Jan 9 2024, 6:14 PM