You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understood correctly, it's still not possible to listen for changes that originated in different processes.
Any idea on when will this be supported?
Thanks for working on this subject! I have multiple read and write operations in two separate processes. Currently it it is working quite well for most boxes except one. In this case I write in both processes. For the others it is either one of them writing.
For the one with the issues I have the issue with the error: "Error when updating with existing Id's..." (As a workaround I delete all items and add them again after it....). But also some unexpected loss of items when writing quit fast "couple of seconds" after each other.
Is it planned to support writing from multiple processes in the future?
Is it planned to support writing from multiple processes in the future?
According to our current plans, not in the near future. We advise to use one writer process and use IPC from other processes for writes via the writer process.
Activity
greenrobot commentedon Sep 27, 2017
You should be with one exception:It is not supportted at the moment. To make it work we have to:[-]Is this support to use in multi process? [/-][+]Multi process support[/+]jpmcosta commentedon Nov 14, 2017
If I understood correctly, it's still not possible to listen for changes that originated in different processes.
Any idea on when will this be supported?
greenrobot commentedon Nov 15, 2017
Multi process might be bumpy at the moment. Can you tell us about your use case?
jpmcosta commentedon Nov 15, 2017
@greenrobot not sure if it's relevant enough to pollute this issue. I have a service in a different process that's responsible to build all the data.
greenrobot commentedon Nov 15, 2017
It's always relevant to see how features are (intended to be ) used; sometimes it's surprising.
Got it. And why did you decide to give the Service its own process?
jpmcosta commentedon Nov 15, 2017
It's mainly for better memory management. I might be over-engineering.
greenrobot commentedon Dec 7, 2017
Sorry, I had to revise my initial comment. Multiple processes are not supported at the moment!
nickylin commentedon Dec 8, 2017
ok got it , thx bro
greenrobot commentedon Dec 9, 2019
Btw, additional read-only processes might even work if they do not rely on reactive queries / data change listeners.
greenrobot-team commentedon Sep 8, 2020
2.7.0introduced read-only stores that enable multi-process support.There is an example: https://github.com/objectbox/objectbox-examples/tree/main/android-app-multiprocess
Inter-process data observers are in preparation: #893
tomwassink commentedon Oct 16, 2020
Thanks for working on this subject! I have multiple read and write operations in two separate processes. Currently it it is working quite well for most boxes except one. In this case I write in both processes. For the others it is either one of them writing.
For the one with the issues I have the issue with the error: "Error when updating with existing Id's..." (As a workaround I delete all items and add them again after it....). But also some unexpected loss of items when writing quit fast "couple of seconds" after each other.
Is it planned to support writing from multiple processes in the future?
greenrobot commentedon Oct 17, 2020
According to our current plans, not in the near future. We advise to use one writer process and use IPC from other processes for writes via the writer process.
u007 commentedon Nov 24, 2020
in my project, I moved the objectbox.init into service to avoid multiple initialization. and do a code to wait for it to be available: