Some way to mirror the review database by a third party
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ratings and Reviews server |
New
|
Undecided
|
Unassigned |
Bug Description
I would like to build a third-party app to allow people to "follow" reviews for particular packages or by particular people in the Ubuntu click store. There are a few ways that my app could get the information for this, and I'd like to discuss which is best and how it could get done.
== Canonical does it ==
Make the RnR API able to query data in many different ways, so that the external service can use it how it wants. This is likely to look like having all the reviews in some searchable system like elasticsearch or solr and then exposing the raw ES/Solr API to the public, which has potential security concerns but is one approach. (Since this is blocked on Canonical work, having RnR expose just the subset of searches that the third-party app needs is not likely to scale well, because every time my third-party app wants to query the data in a different way there'll be a long cycle time before Canonical provides it, and constant ongoing work for Canonical engineers. But it is a possibility.)
== I do it ==
If I can mirror the reviews database, then I can store it however I want, and query it however I want, without any work devolving on Canonical engineering at all. This requires a way of mirroring the database:
1. Download a database dump
Once a day, Canonical dumps the whole rnr database (or a subset of fields for each review, to keep some things internal for privacy reasons) somewhere so it can be downloaded. These could either all be complete database dumps (and keep the last three or four around) or work like a backup where there is a "full" dump once a week/month and "incremental" dumps for each day since the last full backup, thus meaning that an external app downloads the changes. This needs duplicate file storage for all the data but does not put extra pressure on the API, no matter how many third-party apps use the data. It does not allow for returning different data dependent on authentication credentials, which is not important for my app but may be for others.
2. Allow querying the API by time
Add a "since" parameter to http://
I'm happy to hear other suggestions too.
Related branches
- Ratings and Reviews Developers: Pending requested
-
Diff: 125 lines (+72/-6)4 files modifiedsrc/clickreviews/admin.py (+14/-0)
src/clickreviews/api/handlers.py (+10/-3)
src/clickreviews/forms.py (+11/-1)
src/clickreviews/tests/test_handlers.py (+37/-2)
On Thu, Jan 8, 2015 at 3:24 AM, Stuart Langridge
<email address hidden> wrote:
> Public bug reported:
>
> I would like to build a third-party app to allow people to "follow"
> reviews for particular packages or by particular people in the Ubuntu
> click store. There are a few ways that my app could get the information
> for this, and I'd like to discuss which is best and how it could get
> done.
Hi Stuart. I don't see a problem with dumping all published reviews
(Martin?), but given that the source is open, would it be an option to
improve the API by adding feeds?
For example, 0/feeds/ developer/ (?P<developer> )/ 0/feeds/ app/(?P< app>)/
/api/1.
/api/1.
Yep, the downside would be that it'd be slightly more difficult to get
things you need landed, and you'd not have control over when that was
deployed. Benefit would be that everyone can just use it and/or
improve it in the one place.
Anyway, Fabien has been working on this app for the past while and may
have other ideas.