3 ms·
Ask HN: Designing robust on disk data structures in Java
I was wondering if anyone had resources, books, or articles describing how to design and implement robust / performant on disk data structures in Java.
Writing bytes to disk is straightforward, but seems to elevate quickly to fine art when considering concurrent online access, robustness, transactions, etc.
For many NIO classes, there is often a disclaimer (e.g., MappedByteBuffer : "Whether or not such changes occur, and when they occur, is operating-system dependent and therefore unspecified.") which makes semantics of (probably important) corner cases yet more inscrutable.
Lets say you would like to design something like H2 MVStore, or MapDb - where does one go to get the knowledge to do this?
For some context: I'd like to store time series sensor event data in my mobile app. I typically rely on trusted things like sqlite, but this doesn't seem like a good fit for time series data.
There are plenty of prior art for suitable representations, like Apache Hadoop RCFile and Dato SFrames - but I have not found a Java library suitable for Android - so I may have to create my own solution.
Because its a mobile (Android) app, and processes can be killed without warning, it has to be robust. Multiple threads in the app will be reading / writing to the store.
- Thanks