Hopefully this all makes sense, but please don’t hesitate to ask for clarifications! Thanks in advance to anyone who actually reads this.
context
I’m assessing whether to use musicbrainz for a project, still at proof-of-concept stage. I’d only be using a very small subset of the data (the scope of which will be pretty obvious if you review my editing history).
My present thinking on approach is to request the data I need once, via api, caching the responses into a local document store that my app would then use (instead of repeatedly hitting the api directly). This would improve the performance of my app and would essentially eliminate any impact of my app on the seemingly always stressed musicbrainz servers.
notification of change
The challenge of the above approach is that I’d need to know when the upstream data changes so I can refresh my locally cached copy. I could accomplish that with regularly scheduled polling, but that would not be a great solution for me or you.
Ideally, you’d tell me that, behind the scenes, your architecture is aligned with some standard messaging pattern - say, publish/subscribe - and that my client app could subscribe to pushed notifications of change, providing the trigger for when my cached version of data needs refreshing.
From what I’ve seen in dev-oriented docs, that does not seem to be the case. And given your limited resources, I can’t imagine a switch to such an architecture arriving anytime soon, even if you recognize the value (honestly, I think such a switch would go a long way towards helping you solve your present scaling issues, and in a way that isn’t just throwing more money at the problem).
existing mechanisms?
More realistically, I’m hoping that some existing mechanism could be leveraged in a more modest and less impactful polling approach.
For example, I’ve played around with user collections, and they seem promising. I get an email alerting me of edits to resources I’ve saved into my collections. I also see human readable interfaces like (not a real URL) https://musicbrainz.org/collection/{collection-id}/edits. Is the content of such a URL available in a machine readable format - ideally JSON?
If I could periodically make a single request to retrieve this “changelog”, my subsequent requests could then be targeted to retrieve only what is known to have changed, rather than blindly checking each resource to determine whether it has changed and needs refreshing.
other ideas?
Maybe someone has an alternative idea? Maybe even already successfully accomplished what I’m after?