Research: supporting using hive in multiple isolates
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
## Why?
People are using Hive in background isolates to work with persistent data, and because hive doesn't have proper isolate support, and dart doesn't have proper thread support, it's currently impossible to make sure different hive instances can sync up with each other when mutating database. So proper isolate support was requested multiple times on [hive/hive issues](https://github.com/hivedb/hive/issues?q=is%3Aissue+is%3Aopen+isolate).
## When?
I don't know, it totally depends on our findings on this research thread.
## Limitations
- We can't send lots of data through isolates, even tho isolates are improved a lot, it's still costly a lot for workloads like database
- Dart doesn't have proper (fully compatible) [Thread](https://en.wikipedia.org/wiki/Thread_%28computing%29) API
- We have to keep existing API and database structure as stable as possible
## Other references
- Some comments on dart-lang threading support issue: [1](https://github.com/dart-lang/language/issues/333#issuecomment-1060825399), [2](https://github.com/dart-lang/language/issues/333#issuecomment-1061619521)
- [IsolateNameServer](https://api.flutter.dev/flutter/dart-ui/IsolateNameServer-class.html)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.