internetarchive / internetarchive/openlibrary

Following Feed should include Lists updates (not just reading log)

Open
#11,022 0 comments 0 reactions 0 assignees View on GitHub
Lead: @mekarpeles Module: Following Needs: Breakdown Priority: 3 State: Blocked Theme: Lists Theme: Reading Log Type: Feature Request
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

### Feature Request

### Problem / Opportunity

When a subscriber follows other patrons, they expect to see updates from that patron. The updates today only include Reading Log actions.

It would be great if this activity feed also included items added to Lists.

https://openlibrary.org/query.json?query={%22type%22:%20%22/type/list%22,%20%22key~%22:%22/people/ScarTissue/*%22,%20%22*%22:null,%20%22sort%22:%20%22-last_modified%22}

The blocker or challenge right now is Reading Logs can be queried a single time for many usernames, whereas we must first get all of the recently modified lists for a single user (making it somewhat untenable right now).

Some platforms employ a "Fanout on write" policy, where events across types are included in this table, and we basically just query for patron names in this table that are being followed.

Perhaps a `patron_events` which gets pushed to any time (user_key, item_key, metatype)
e.g. `(@scarTissue, `@mekBot`, {"follow"})` or `(@scarTissue, /lists/scarTissue/OL12312L, {"list-add": "/books/OL123M"})`

Periodically truncate table, only 1 month of history?

## Downsides or Risks

Yet another table, we would have to add anonymization support, update stale IDs (even harder for json types)

### Proposal

### Evaluation

For now we've decided that we won't implement this.

### Breakdown

### Related files

Refer to [this map of common Endpoints](https://github.com/internetarchive/openlibrary/wiki/Endpoints):
*

### Requirements Checklist
Checklist of requirements that need to be satisfied in order for this issue to be closed:
* [ ]

### Stakeholders

*


### Instructions for Contributors

* **Before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) or pushing up changes to a PR, please first [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date, as the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.