I am building a small mobile app with react native.
My initial thoughts were, that it is safer to communicate with the database over a running nodejs backend server in order to avoid security risks due to direct connection between mobile and DB.
Now i want the clients to receive realtime updates from the DB and the only way that i can think of, is to connect the mobile app to the firebase realtime database and subscribe to changes without having any backend server between it.
Is this a good way to go or are there alternatives?