Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am building a reporting app on node.js and Angular. I am using the Quickbooks Online API to pull in reports information.

I have to add custom fields to the reports I pull in and save this customized report locally to a database. The custom fields are basically to aid in forecasting. (Note that these custom fields are only present in the local copy of the database)

However, I also have to make sure that the local copy is in sync with the remote one. That is proving to be a challenge.

I am struggling on what the best approach to this problem would be. Currently, I am just making an API call, getting the JSON and saving it to a Mongo DB. I am thinking of adding a manual "Refresh database" button that syncs the two copies.

Is this a good approach? Any help or pointers would be appreciated.

share|improve this question
    
Would it be feasible to query the remote source to check for changes each time the local copy is accessed? If the frequency of local GET operations is low or the latency of the remote GET operations is low, this may reduce the complexity of the solution. –  John Duane 18 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.