Is realtime functionality of Firebase and Supabase DBs any useful?
In my understanding, Firebase Realtime Database can sync the data to the mobile clients only when the app is in foreground and not in killed/background state. This needs developers to handle the killed/background app case separately, and send a push notification to the device (e.g. chat notification). For the right UX, the push notification should only be sent to the apps in killed/background state. So, to detect whether the app is in the foreground or killed/background state, the server will need to maintain a WebSocket connection with every foreground running app. But doesn't this defeat the purpose of using Realtime Database, as the WebSocket itself can be used to sync data now? Or am I missing something?
This may not be what you are looking for, but why not use a combination of Postgres listen/notify and PushPin[0] to support push notifications?
[0] https://pushpin.org
The ~1.2MB per-document limit was a deal killer for my team. Realtime completely irrelevant, we never even got to such a stage.