jamesplease / jamesplease/orbit-examples
Example configurations: rest + memory + localStorage
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I surveyed some developers and asked how they've used local storage in the past (I haven't used it too extensively), and two general use cases came out of the responses.
They are read-heavy apps, and write-heavy apps.
##### Ready-heavy apps
These are applications that primarily read data from a REST source. In these apps, a user may request information that is then stored in local storage. That way, if the user travels to a new location and their connection is lost, they can continue using the data that they had calculated previously. An application that gives travel information is one example use case for this.
##### Write-heavy apps
A dashboard that allows you to configure something is another example of using localstorage. If it is designed to support offline usage, then the user can make changes even while offline. When the application comes back online, the offline changes will be pushed up.
#
Supporting the read-heavy case should just involve a fallback system where the memory source tries to fetch in local storage if the API can't be reached.
The write-heavy case needs a way to propagate the state of the local source to the rest source when a connection is re-established. I'm still a noob @ orbit, so I'm not sure if an API exists that lets you say, "Hey source A, update yourself right now with the state of source B' or something like that. @dgeb does that exist? Or how would you go about doing this?
//cc @gnarf
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the read-heavy and write-heavy use cases described in the issue, especially the proposed REST, memory, and localStorage relationships. Determine whether Orbit provides an API for synchronizing a local source with a REST source after reconnection, then define the example configuration and its completion criteria before implementing it.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100