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
A new chapter: Hive v4 #1225
Comments
Great news! I love Isar, but I also still use Hive in the same project, because it's just a simple key-value storage. I use it to store cache, counters, json responses, lists and maps. I don't need complex stuff like indexes and queries, because I already have that data in isar. |
Hey Simon, thanks for an update! I am wondering what's your plans regarding storage migration. How do you think to handle the transition to make sure existing applications won't lose any data. Also considering both hive and isar has (or had) their own way of encoding data types, not sure about isar, but hive also have support for writing custom encoders/serializers. What's the plan for migrating them? |
That's indeed the biggest problem to solve. I think the best approach for now is to let the hive generator generate migration code. For custom encoders & decoders I didn't find a solution yet. Maybe we can just deprecate them and ask users who rely on them to stay on Hive v2 |
Are you planning to support database queries like Isar does? If so, then it's tough, I don't have an idea to create smooth migration plan. If not (only key to value lookups), maybe we can continue using the existing hive generated (and custom) encoders to encode structs into byte stream and store it within isar with its respective key. |
This is really exciting news!
In my opinion, a migration to Isar as the data store should focus solely on that and leave out advanced functionality that Isar could provide. That simplifies the migration and maintains the simplicity of Hive. If you need more advanced functionality, using Isar directly is likely a better fit. |
Yeah agreed! I think Hive has a good feature set and if someone is looking for queries, Isar should be used directly. The only feature I think would be valuable for Hive is (optional) atomic transactions. |
I merged my work in the main branch. Check it out and provide feedback please 💜 |
Hey @simc , that plan sounds great! I wanted to use Isar but decided to stick with Hive, as Hive supports Flutter on the web. With the migration to Isar as the engine for Hive, will it still work over IndexedDB? |
This is promising, but I have a few questions. Is there a list of things that Hive v4 will lack vs. v2? Will there be a v2 support branch if v4 will not have feature parity? Also what of Hive v3, is it being abandoned? BTW, thanks for all this work! Glad to hear Hive will live on in one form or another. |
No. Isar web uses SQLite compiled to WASM and so will Hive.
I don't think there is anything Hive v4 will lack. The API is almost identical with a few minor differences. Edit:
To my knowledge Hive v3 was never released as a stable version and I don't have time to maintain it unfortunately. |
I published the first version of Hive v4 and I'd love to hear your feedback |
Does "No more code generation" mean that we don't need to reference a generated file like part 'main.g.dart';? If so sounds pretty good. As a follow-on, does this also hold for Isar 4.0? |
@simc, thanks for reply. Can you confirm that given this issue: isar/isar#1362 (Isar on the web supports only in-memory sqlite), in practice, Hive v4 cannot be used as a persistency service on the web? |
Not right now that's correct @t-kozak. I hope to implement that before a stable release |
Because MY_APP depends on hive ^4.0.0 which doesn't match any versions, version solving failed. You can try the following suggestion to make the pubspec resolve:
|
@pishguy You can use |
@simc we're working on testing this and noticed that it's leveraging Isar 4 Alpha. Any timeline on Isar 4 getting to stable? Also, any chance that Hive 4 could leverage Isar 3? |
Hi @simc, First of all, I want to express my sincere appreciation for all your hard work on Hive and the dedication you've shown to the community. Hive has been an invaluable tool for me, and I'm excited to see its future unfold with Hive v4. I'm sure many of us are eager to get our hands on the new Hive v4. Do you have a rough estimate of when we can expect a release candidate or a beta version? Lastly, cheers from Munich! 🍻 Looking forward to Hive's continued evolution and success. |
@simc Do you have any rough time schedule when a stable release for Hive v4 will be available? |
Please make it happen i can't wait to see Hive V4.0.0 official release |
At the same week US starts using metric system 👀. |
LGTM! |
Hi @simc, Anyway thanks for making this amazing package. |
Dear Hive Community,
I'd like to apologize for my lack of support and updates for Hive over the past year. Despite this, your commitment to the community has ensured that the package is still in a remarkably good state, and for that, I'm incredibly grateful.
As many of you know, I have spent a lot of time optimizing Isar to be as fast, reliable, and fun to use as possible. However, I recognize that a lot of you truly appreciate the simplicity of Hive. The thought of discontinuing Hive did cross my mind, but I now see a much more constructive way forward:
Over the next several weeks and months, I plan to invest my energy into the development of Hive v4. The primary focus will be to maintain the user-friendly interface and feature set that you've come to love. However, instead of continuing with the custom storage engine that has been causing several issues, we will transition Hive's data storage to Isar.
This significant change comes with several exciting advantages, including support for multiple isolates, significantly improving resource efficiency and reducing startup time, among others. Moreover, this will simplify the maintenance of Hive, ensuring its longevity through sustained support.
I cannot thank you enough for your continued support and use of Hive. Together, let's continue to make it a tool we all love and rely on. 💜
Simon
The text was updated successfully, but these errors were encountered: