Replication - #153
Conversation
There was a problem hiding this comment.
As a developer consuming the API, I would expect Change.track to run continuously. Perhaps Change.pullUpdatesOf is a better name?
There was a problem hiding this comment.
Maybe the description needs to be reworded. This method rectifies change list entries for the given model ids. I'm not sure pullUpdatesOf is any less confusing.
There was a problem hiding this comment.
Few alternate names based on your description:
Change.rectify(similar toChange.prototype.rectify)Change.rectifyChangesOfModelChange.rectifyModelChanges
|
The code looks mostly good. It's difficult to review it from the big picture point of view, as there are no test cases covering larger and/or integration scenarios. Perhaps it's better to partition the implementation vertically, start with a full end-to-end implementation of something minimal (e.g. sync a newly created model instance) and expand horizontally later (i.e. add support for deletes, updates, conflicts - each of those can be a single self-contained change/PR). |
|
Test FAILed. To trigger a build add comment - ".test\W+please" |
See https://github.com/strongloop/loopback/pull/153/files#diff-e43576aabfd6aa741af8ac58f1b4a699R673 for an example of this. |
|
test please |
|
Test FAILed. To trigger a build add comment - ".test\W+please" |
|
Test FAILed. To trigger a build add comment - ".test\W+please" |
|
test please |
|
Test FAILed. To trigger a build add comment - ".test\W+please" |
|
test please |
|
Test PASSed. To trigger a build add comment - ".test\W+please" |
|
Test PASSed. To trigger a build add comment - ".test\W+please" |
|
Test PASSed. To trigger a build add comment - ".test\W+please" |
|
Test PASSed. To trigger a build add comment - ".test\W+please" |
|
The example does not work: |
|
The fact there is only one Will the current implementation work correctly when there are multiple replication targets, each replicating at different intervals? Consider the following timeline: Am I missing something? |
There was a problem hiding this comment.
What kind of value is expected here? Is it Change.id, Model.id or something else?
There was a problem hiding this comment.
I found it - Model.getSourceId. Could you please mention that in the property description?
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
creating a cache - Use the SharedClass class to build the remote connector - Change default base model from Model to DataModel - Fix DataModel errors not logging correct method names - Use the strong-remoting 1.4 resolver API to resolve dynamic remote methods (relation api) - Remove use of fn object for storing remoting meta data
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
Allow juggler to mix in these methods.
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
Test Failed. To trigger a build add comment - ".test\W+please" |
|
@ritch what's the status of this pull request? was it already landed on the 2.0 branch? |
|
Yes. Closing. |
Please read this document for background on our approach to replication.
http://docs.strongloop.com/display/DOC/Replication
This includes two new models
ChangeCheckpointHere is an example app using the api.
/to @raymondfeng
/cc @bajtos