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
Move storage format over to binary, this change allows the addition of: #12
Conversation
Checksums, File format versioning and feature flags i.e: encryption, this change also makes the db files way more compact. Other changes: tighten except clauses in Util class, change some names to snake case
PS: the assertion that if data is JSON serializable it can be stored to the file format remains valid |
@DarthUdp My understanding is Elara can now store objects in the files (since you're moving it out of json) along with the checksum feature. Can you possibly add some more comments and a few |
You can add a new test file into the |
No it cannot store arbitrary objects, such serialization is essentially not achievable without the use of the very unsafe pickle module, and even then it cannot store any and all objects, what an implementer of a class can do is implement the Serialize interface. But then they are just describing a way to encode their class state into primitive types that can then be serialized. refs: |
Yup, got it 👍🏽 thanks |
Do you think the code could use more comments? |
To me the code is pretty self explanatory but since you will have to work on it eventually :) |
Yup I think the code is fine. I'll format it later if needed. But please do add some basic tests. |
I added one test of a full cycle data store and recovery. |
Thanks, I'll merge the PR. :) |
Checksums, File format versioning and feature flags i.e: encryption, this change also makes the db files way more compact.
Other changes:
tighten except clauses in Util class, change some names to snake case
This is a more involved change so take the time to review it and consider it's impacts and ask away any doubts you may have about it
closes #10