Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent data structures in Java [closed]

I need a persistent storage in Java for certain (possibly large) data structures, such as:

  • dense and sparse matrices of integers, doubles, booleans
  • directed graphs with labeled nodes and edges
  • binary trees
  • maps: string->string, string->integer (with fast retrieval of the keys with largest values)
  • sets of integers or strings

I don't mind if there is a separate storage for each data structure, as long as all the storages have similar, consistent interfaces.

I need to be able to efficiently modify the data structures "remotely", that is, without fetching the entire structure to RAM, modifying it, and storing back. Example operations: put a key-value in a map, remove a node from a tree, modify a node's label in a graph, add a value to a set.

It would be very nice if these storages could be also easily accessed from other programming languages, most notably Python. I'm thinking of a RESTful service in the backend and client APIs in Java and Python.

Motivation: I need to process a large collection of documents and perform various analyses on them. I want to explore various approaches and create fast prototypes (for that reason I need simple, easy-to-use APIs).

I guess I'm not the first person needing such a functionality and I would hate to reinvent the wheel here. Which brings me to the question: which open-source solutions allow easy-to-use persistence of data structures in Java?

Thanks in advance!

like image 299
Bolo Avatar asked Sep 14 '26 00:09

Bolo


1 Answers

Have you thought about using something like MongoDB? It seem perfect for what your looking for and Its picking up a lot of steam. It's a high-performance, schema-free document-oriented database and I love the fact it's based on json! Check it out!

Here is nice Java tutorial.

like image 179
Michael J. Lee Avatar answered Sep 16 '26 15:09

Michael J. Lee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!