Updating UI Immediately after modifying data, without using instantsearch

Hi all. We have a job-board type of project with frequently occurring changes (as jobs are picked up and reviewed by peers). If someone changes the status of a job, we don’t need others to see that in realtime, but from their own UI their UX would be better if they could see the updates occurred by updating their UI immediately. The dataflow is that we update our NoSQL document and a cloud listener propagates that change to Algolia.

We’re not using instantsearch (we’re just using the client directly), and I can clear the cache and refresh after a few seconds but this feels less than ideal. What I really want to do is to update the cached values directly as soon as we know we’ve updated the NoSQL document. I saw that you can implement your own cache or use Algolia’s InMemoryCache, but I can’t figure out how to use it (nor do I necessarily have the time to implement our own from scratch)…

Does anyone have any recommendations?

Hi @hi1,

Thanks for reaching out and considering Algolia for use in your job-board application.

We highly recommend that you do not use Algolia like your database. In this case, you described that you:

  • update your NoSQL document
  • propagate changes to Algolia

We also do not provide guarantees on indexing time and, therefore, if you happened to update Algolia at a time of high indexing/search traffic on your shared cluster your reliance could also lead to a bad UX if it appeared to freeze or lag.

Can you update your UI after you’ve updated the NoSQL document instead, and get the data from your NoSQL document rather than Algolia?

Thank you so much for the prompt response! This was a good solution. I try to modify stored data in a way that preserves a single source of truth but this approach got everything working quickly so I can’t complain. Thanks!