feedhenry / fh-sync

Node.js implementation of the FeedHenry Data Synchronisation Server. To be used in conjunction with the FeedHenry Data Synchronisation Client.
http://feedhenry.org
Apache License 2.0
5 stars 17 forks source link

Add option to configure global syncFrequency #39

Open wtrocki opened 6 years ago

wtrocki commented 6 years ago

Current sync api requires us to register dataset on the server to change sync frequency.

  sync.api.init('myDataset', {
    syncFrequency: 10 // seconds
  }, function() {});

Problem is that this will require users to know their datasets all the time and init them directly in the server. I think it will be nice to have global sync frequency setup on the server so users will still have configuration to tweak for all the requests. Alternative will be to support passing syncFrequency in the client.

By default now everything will be done even 10 seconds which may impact performance.

wtrocki commented 6 years ago

ping @david-martin @aidenkeating

paolobueno commented 6 years ago

:+1: I think having a global overridable default for new datasets would be helpful.

I think a separate frequency per client might be a much bigger change, but I think there are scenarios where this level of fine-grain could help with valuable tweaks.