-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi process support #1091
Comments
Relevant Realm-Cocoa issue is here: realm/realm-swift#824 Main issues:
|
We might want to consider waiting to implement this until we have ObjectStore support. |
@cmelchior Any update on this? On iOS it is already working... |
@leisim If you are considering this because you want to use SyncAdapter. I originally starred this issue because of it but, I instead changed my implementation with GCMNetworkManager (Uses JobScheduler for newer API level). It requires less boilerplate compared with SyncAdapter. Hope that helps you. |
@beeender I created multiple apps for my company which extend each other, but they can be installed in various combinations. (Every employee has different apps) Thanks for your hard work btw ;) |
@beeender I am using this with react-native. My project needs background android service, that runs some js and captures some data into realm. And there is also an activity with react-native ui, that should be able to display results from realm. I run the service and activity in different processes, as I've had some problems creating two react-native contexts in the same process. |
@kabbi So you are using the Realm React Native as well? |
@beeender Yes. Forgot to mention this. |
@alazier This would be an interesting and quite useful use case. User can use our notification system work across native android and react native. |
@beeender is there still progress on this feature? I also would like to use the same realm files from a service. |
@rimeissner After #3370 merged, our master branch actually supports inter-processes notifications. You can try it with the snapshot release.
So before we solve above issues, there are risks to use it in multi processes. Also
|
Is there any progress on this? We're using a remote service, too. |
@mariusboepple Our current release is actually supporting notifications through multi-processes, but there are some limitations to use realm-java in multi-processes applications:
|
If you have two two processes running and you can guarantee that the parent process has an active Realm realm instance (since that would run all required migrations), then Realm should be process safe right now, but as @beeender mentioned there are also other edges cases. This is the primary reason we don't claim to be interprocess safe just yet. |
@cmelchior would object store schema integration fix cross-process migration? |
It would probably get us close enough that we choose to go the last mile. Encrypted Realms and using |
@beeender as you said:
I'm making use of a However, I noticed that the Thanks in advance! |
This is definitely something I would worry about because I feel like that might be related to what would explain the Then again, soon the object store will handle table creation and all this will be solved. |
@Zhuinden I'm locking on a file other than the Realm database file. Do you think I could still have issues? |
The migration will happen when the first process create the Realm instance. The migration itself is actually protected by our write locks among processes. The risk is if your two processes have different schemas, that would be problematic. |
We do support officially support multi-processes since 4.2.0 |
Currently Realm for Java only support multi threading but not multi process.
The text was updated successfully, but these errors were encountered: