Closed oubiwann closed 4 years ago
The clj-mmap project provides a wrapper around Java NIO's support for memory-mapped files. Looking at the source code, access is typical for files: get n bytes at location i. This isn't exactly what we need; perhaps a layer on top of that, for accessing x, y coordinates of an image?
Here's an example of someone creating NIO Memory-mapped file images:
What about creating a RoaringBitmap for each layer?
There doesn't seem to be a Clojure wrapper for RoaringBitmap, but here's an example of memory-mapped RoaringBitmap usage.
Time to run some experiments:
Some additional considerations, before I put too much time in the testing approach above:
So I don't think we can get away from database storage, here. I also think the project will be best-served by a file-based database, not an in-memory database.
I've convinced myself that we don't want to manage RGB layers, precipitation, temperature, hightmap, rivers, oceans, land, ice, etc., from a single JVM process. So I'm going to close this ticket and focus on the service-based approach investigation ticket here: #30
In that ticket I'll mention consideration for array databases and see if there are any databases that use Roadringbitmap as an underlying store ... in case that's still a good choice.
This would be useful for the map service: