internetarchive / internetarchive/bookreader

Function call for fetching data

Open
#123 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
491
Avg merge
2d 15h
Merged PRs (30d)
3

Description

**Context**

The bookreader makes various calls to get data, and for both Dweb and the Offline server those calls have to be processed differently than an HTTP call.
* Dweb: Use its own algorithms to use Gun / IPFS etc to fetch the data
* Offline: Go to the proxy to check caching.

**Proposal & Constraints**

The tentative proposal is that the code could check for a function parameter before doing an HTTP call.
This function would use the same signature as whatever bookreader is using (e.g. fetch) and could be provided by a consumer which could then do whatever it wanted - e.g. check local storage, use dweb, go to a proxy.

This is still tentative, and ideally we would use the same mechanism with jwplayer and other components that do data fetching inside the component.

@jbuckner @iisa

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the BookReader currently fetches data and how jwplayer and other components perform data fetching. Clarify the shared function signature and the expected Dweb and Offline behavior before implementation; done should mean consumers can supply the mechanism without relying on a direct HTTP call.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.