Comments (11)
going to work on branch store-update-support
from store.
Note that lifecycle scoping gets tricker with uploads and we will need to make some decision here.
As long as we're only supporting reading data, it makes sense to have the store operate in a well defined scope like an Activity.
Once we add updates into the mix we'll need to add support for WorkManager
or an equivalent to run the uploads even if the user navigates away from the read scope.
from store.
Maybe I'm misunderstanding, why wouldn't suspend fun Store.update(key)
be sufficient since a user must launch that function inside of a scope. That way we leave it up to the consumer to either launch in a global scope or something like a lifecycle scope. Are you thinking something closer to suspend fun Store.update(key, scope)
?
from store.
i actually think most people will have the store as a global thing, like a singleton. (because repositories are usually singletons). That is also necessary to use cache across activities.
Should we do this in a branch though? I feel like it is a big undertaking to get into Store 4.0
from store.
@digitalbuddha - Here's what I'm thinking. For offline support to be a truly first class citizen, we would want to drain the LocalModification
queue whenever network became available That operation would outlive the scope of whatever the user will call update on. suspend fun Store.update(key)
will probably return whenever the local modification was recorded rather then when it was updated on the server.
Does that make sense?
from store.
It does! Could we maybe leverage the same scope that share uses? It is global by default unless user overrides
from store.
I think the scope used for share
(reading) is quite different than the flow used for writing for 2 main reasons:
- While the default for the read flow is
GlobalScope
it has a very clear API for changing this. In fact it seems as though the point of this API is to tie Store to a more specific scope like an activity. - Write's "scope" is not actually a coroutine scope. We probably want the app to launch in the background in order to upload updates when network is available.
from store.
^ This branch should now require PRs to commit like master so we can just merge it at the end
from store.
I've created a milestone for this issue so I can start breaking it down into smaller issues. I'll file them all under https://github.com/dropbox/Store/milestone/1
from store.
Hi everyone, Bisakh this side. I am interested in working on this feature as part of GSoC22. A while ago, I went through the dropbox paper link you have shared here and on the gsoc idea page. I have some thoughts based on the doc content. It would be awesome if you could take a look when you are free.
[Pasting my comment from the dropbox docs]
Hi everyone, Bisakh this side. I’d love to work on this issue as a part of GSoC 2022.
I have some doubts.
|||>> objects that can be re-run when items are fetched from the server
So IIUC, the modifications must be commutative, right?
|||>> developer calls the API to re-apply local changes on the object
Does it mean that we need to define the modification as Idempotent operations or we are going to keep some metadata (lamport clock ? ) to choose which modification to apply and which one not to (if it’s already been applied)?
Any thoughts on using CRDT (Conflict Free Replicated Data Type) based algorithms. For example, if we can represent the underlying data source as a JSON document, simple algorithms like RGA might be a good start for optimistic conflict resolution.
Thank you so much! Please share your thoughts : )
from store.
ping @digitalbuddha
from store.
Related Issues (20)
- [Documentation] Update Store documentation HOT 1
- Integrate website with CI
- [Feature Request] The stream of StoreResponse<T> should emit Loading(origin = SourceOfTruth) HOT 1
- [Question] Data with nested keys HOT 1
- [BUG] Stop with the breaking API changes in beta HOT 4
- [BUG] 5.0.0-beta02 breaks StoreReadRequest.cached + Validator HOT 2
- [BUG] Cached(refresh = true) will collect SoT reader twice HOT 3
- [Feature Request] fromLocalToOutput converter method went missing
- [BUG] Deadlock during synchronization in MutableStore
- [BUG] Examples on https://mobilenativefoundation.github.io/Store/mutable-store/building/builder/ are wrong
- [Feature Request] Common Testing Utils
- [BUG] Documentation "Edit this page" button 404's HOT 1
- Store Not Fetching or Read/Writing HOT 6
- CLA HOT 1
- [Question] Why should anyone consider using Store if they are already using NetworkBoundResource concept/framework? HOT 1
- [Feature Request] Synchronization HOT 3
- [BUG] State Flow From `launchPagingStore` Does Not Reflect Latest Writes in Mutable Store
- Improve StoreKey API
- Good practices for error handling and propagation HOT 1
- Cache control on source of truth ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from store.