Giter Site home page Giter Site logo

Comments (7)

JulianKingman avatar JulianKingman commented on July 20, 2024 1

Fixed with version 2.

"uniqueIdentifierName" links the documents to the subscription for purpose of synchronization
When MO goes offline, "things" are populated from offline redux store
When MO comes online again, added "things" (ddp) are compared with offline things, ones that don't exist anymore are removed from minimongo and redux.

MO.subscribe('uniqueIdentifierName', 'subscriptionName', ...params, callback);
const things = MO.collection('things', 'uniqueIdentifierName').find();

from react-native-meteor-offline.

JulianKingman avatar JulianKingman commented on July 20, 2024

Yep, that's pretty accurate.

from react-native-meteor-offline.

adamgins avatar adamgins commented on July 20, 2024

@JulianKingman what happens now with "App Startup", if there's a connection to Meteor... ie goes it "burn with fire" the redux store/disk and replenish redux/disk?

Ie I expect thats probably the simplest approach (in a very complex online/offline sync/merge/resolve-conflicts world). ie when you're offline you won't be getting any DDP add/change/delete, so when you come back online you need refresh things.

I guess the big question is what happens with conflicts?

BTW, a bit confused on the Realm Branch... is there an overview beyond the very basic setup in the branch's read me, please? ie is this only for new apps that are using Realm from the getGo, or does it replace Redux and can be used with an existing Meteor app?

from react-native-meteor-offline.

Diwei-Chen avatar Diwei-Chen commented on July 20, 2024

Thanks, Julian

from react-native-meteor-offline.

JulianKingman avatar JulianKingman commented on July 20, 2024

@adamgins burn-with-fire would be the simplest, but it's quite expensive to save data, so I'm trying to see if a more intelligent solution is possible.

For conflicts, any records that are different on the app are overwritten by the remote versions. I don't have immediate plans to support write operations, so that shouldn't be a problem.

The realm branch uses realm instead of redux. There are pros and cons to this. It should be faster, but it requires native linking, which you can't do in expo, for example. So long as you install realm properly, you should be able to integrate it. A couple people are having issues with it atm though, and I haven't been able to trace the problem.

from react-native-meteor-offline.

adamgins avatar adamgins commented on July 20, 2024

Thanks.

As opposed to the burn-with-fire, you'd probably have to check last modified date on each document and maintain some sort of replication log.

Wondering if we could borrow from Meteor here as it already has this issue solved with minimongo, that said I don't currently know how that works under the covers?

from react-native-meteor-offline.

JulianKingman avatar JulianKingman commented on July 20, 2024

Checking if a document has changed is not a big problem, the problem is finding out if a document has been removed from the server. The ideal option would know which documents you're subscribed to, and notice if documents are missing. Unfortunately there's no way to tell what subscription brought in a particular document.

from react-native-meteor-offline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.