开发者

How can I do block-oriented disk I/O with Java? Or similar for a B+ tree

开发者 https://www.devze.com 2022-12-25 06:53 出处:网络
I would like to implement an B+ tree in Java and try to optimize it for disk based I/O. Is there an API for accessing individual disk blocks from Java? or is there an开发者_运维问答 API that can do si

I would like to implement an B+ tree in Java and try to optimize it for disk based I/O. Is there an API for accessing individual disk blocks from Java? or is there an开发者_运维问答 API that can do similar block-oriented access that fits my purpose?

I would like to create something like Tokyo Cabinet in 100% Java. Is there anyone that knows what Java only databases like JavaDB is using in the back-end for this?

I know that there are probably other languages than Java that can do this better, but I do this in a learning purpose only.


Off the top of my head I think that MappedByteBuffer in NIO could be your best bet. It's basically as-direct-as-possible mapping between HDD and Java.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号