Alternatives to Realm Functions



In order to realize the same function as Ream Functions, is the concept of implementing with Data Adapter API correct?


@tkymgr That is correct OR you can use the Global Notifier which is a more coarse grained API and easier to set-up at first:


Thanks for your help!

Initially, I implemented it using global notification, but deleting the db file with realm studio, after a while, the db file was restored in some cases. So I thought of a way to use the data adapter API.
However, the result is similarly the db file has been restored. This is because I noticed that the access history of the db file remained as a file inside the program using the adapter API, so stop the program with shell script, delete the db file with the REST API , The problem is solved by starting the program after deleting the db file inside the program.
Is there a smarter way?

my script is


USERID=$(curl -X POST \
  -H 'Authorization: ADMIN_TOKEN' \
  -H "Content-Type: application/json" \
  -H "cache-control: no-cache" \
  -d '{"query": "{users(query: \"accounts.providerId='\'''${1}''\''\") {userId}}"}' 2>/dev/null | jq -r '.data.users[].userId')

/bin/supervisorctl stop all 2> /dev/null

rm -rf /home/expamle/adapter/realms/${USERID} 2> /dev/null

curl -X DELETE --header 'Authorization: ADMIN_TOKEN'${USERID}%2Fdbfile

/bin/supervisorctl start all 2> /dev/null



@tkymgr Why do you need to delete the realm? Yes that is true the Adapter and Global Notifier are built off the Realm SDKs so they act like just another client and react to data being synced from ROS


We use the DataAdapter or Global Notification feature to synchronize with MySQL at business transaction level (ordering, sales etc.).
We have created Realm Datafile for each customer, and we have deleted Datafile when the contract with the customer expires.
Therefore, this problem is occurring.


@tkymgr Do you delete the Realm on ROS as well?