0

Our organization is using Bim360 Docs. I'm writing a service that should stay constantly updated with any changes to documents/folders in the project. I'm using WebHook API to achieve this.

Everything works fine if service is always running, but if it would crash or there would be any maintenance then it would inevitably miss some webhook calls and would never know that some file/folder was updated, moved or deleted. What I'm looking for is a way to get all changes in the project files/folders that happened while my service was offline. Something like GET projects/:project_id/changes?sinceTs=1588764730.

If there is no such method then during a "cold start" I would need to walk through project hierarchy comparing versions (or mtime) of the files/folders to find what has changed. This is doable but could take a lot of time, as our typical project contains ~6k folders.

DimGun
  • 111
  • 5

1 Answers1

0

If there is no such method then during a "cold start" I would need to walk through project hierarchy

Optimally it'd best to consider set up a cluster of redundant instances so you could update/maintain each one of them and still have the ability to receive callbacks available as a whole or at least have a stand-in service to receive and persist (temporarily) the callbacks for your app to come back online and consume

I'd suggest to have an always-on gateway (such as a FaaS on AWS/Azure etc) with the availability to either trap the callbacks when your app is down for maintenance or redirect them to your stand-in.

Bryan Huang
  • 5,247
  • 2
  • 15
  • 20
  • 1
    Yep this would be a redundant solution for sure, but no one could guarantee 100% uptime anyway. Btw, found an interesting solution in a comment for a similar question https://stackoverflow.com/a/61670846/447277. It suggests to use `Search API`, the only issue is that it requires three-legged authorization. But still this is a good option. – DimGun May 12 '20 at 13:07