Does Atlassian Forge Storage (DynamoDB) support "Realtime updates"?

The Cloud Realtime database (Google) provides “Realtime updates” that easily updates all clients viewing a dataset when the underlying data is changed. Here is a short description:

“Realtime updates - Instead of typical HTTP requests, the Firebase Realtime Database uses data synchronization—every time data changes, any connected device receives that update within milliseconds. Provide collaborative and immersive experiences without thinking about networking code.”, Firebase Realtime Database

I am assuming AWS DynamoDB provides similar functionality.

  1. Can this be accomplished with the current Storage API today?
  2. If not is there anything preventing me from using Google Firestore db in a CustomUI Forge app?
3 Likes
  1. I’m pretty sure that “realtime updates” with Storage API can only be achieved by implementing some dirty hacks. The only possibility I see here is some kind of “short polling”: Ask your Forge backend every 10 seconds, if there are updates. Long polling is not an option as function calls are limited to 10 seconds. Websockets are not an option as Forges FaaS functionality doesn’t support that.

  2. I think it is not allowed to call a service which is outside of the Atlassian ecosystem. Allowing calls to a Google Firestore would mean that customer data could be saved outside of Atlassians Cloud. Preventing that is basically the point why Forge was created I guess.

Hey there @bjornbrynjar!

At the moment, real time synchronisation isn’t supported via conventional means (i.e. websockets), but there is potentially a way you could achieve this functionality with what we have now.

You would need to implement something like the “short polling” that @JulianWolf described in your Custom UI app. Each few seconds, you could invoke a resolver that reconciles updates made (which you would send) with updates received (which you would get from the storage API).

1 Like