this little bit of parse fallout.
i'm moving app use dynamodb doesn't seem support kind of offline mode.
how should this?
i'd use realm i'll end having manage synchronising , object <-> nosql. should use flag on row indicate has been synced?
should try , keep row flat in dynamo?
i don't think sync part of cognito applicable here.
i haven't used dynamodb before, read through ios documentation on amazon's website, , think integrating 2 should possible, , relatively easy.
it looks define data models in dynamodb same way realm: create subclass of awsdynamodbobjectmodel
, add properties. case, long created realm object
(or rlmobject
in objective-c) had same matching properties, should (theoretically) able pass dynamodb objects directly realm saved:
let realm = try! realm() try! realm.write { realm.create(myrealmsubclass.self, value: mydynamodbobject, update: true) }
realm smart in being able use kvc see if objects passed conform schema of model objects , automatically retrieve , save information.
(nb: in order update:
work properly, you'll need ensure objects share common primary key property well).
from sounds of it, if you're looking modify locally saved data in realm while app offline, , push modified data device online, it'll convert realm model objects dynamodb objects in order pushed aws.
you add additional properties realm model, such boolean haschanges
flag, or lastmodifieddate
date object in order able check offline object has changes need uploading.
let me know if need additional clarification!
(full disclosure: work realm.)
Comments
Post a Comment