I am writing a custom REST service on ROS which will create a shared realm, initialize it with a schema, and apply permissions of multiple users.
The documentation shows that you can use
server.openRealm(realmPath, schema) to open it on the server side, but the documentation doesn't mention how or when you should close it.
Since this is something running on the server, per user, I want to make sure I close it properly, making sure everything is synced back to the core ROS realm before closing the server-side realm that was open. I want to avoid "leaking" thousands of open connections on the server.
What is the recommended approach to closing it safely, ensuring all sync data has been pushed?