Features

  • Efficient handling of basic attributes types
  • Supports registration of user-defined value types

Features which are currently implemented

  • Basic transaction support
  • Persistent storage of the graph pool

Using In-Memory Graph Storage

General Usage

The in-memory storage module is provided with any DRAGOS assembly. Just use the corresponding URL schema to create an in-memory storage:

memory:///NAME

where NAME is some unique name among all opened memory graph pools.

Persistent storage

As of Feb'06, DRAGOS In-Memory Graph Storage can be stored persistently using the Java serialization mechanism. When activated, the memory graph pool will try to read the contents of the given file. If no storage file exists, an empty graph pool will be used. When closing the graph pool, its contents is written to the given file. To activate persistency, you might choose between two alternatives: Global or graphpool-specific persistency.

  • For global persistency, set the environment variable dragos.db.memory.persistency to some file, e.g. as argument to the java command:
    java -Ddragos.db.memory.persistency=/tmp/store-my-graphs-here [...]

    Note, this way multiple graph pools opened by one application will always use the same file for storage. So the graphpool closed last will overwrite the storage of all other pools. All pools will try to read this data when opened again. This might not what you want when using multiple memory graph pools.

  • Local persistency is handled by a parameter of a specific graph pool URL. Only the corresponding pool will use persistency in this case. This datasource URL demonstrates the local persistency feature:
    memory:///A?persistency=/tmp/store-my-graphs-here

    As hard coding filenames in a datasource URL might be inappropriate, you may refer to an environment variable. For this purpose, preprend the value of persistency with an @. For example, the datasource URL

    memory:///A?persistency=@myfile

    in conjunction with the command line

    java -Dmyfile=/tmp/store-my-graphs-here [...]

    stores and retrieves graphs to/from the given file. If the environment variable is not set, no persistency will be used.

No matter which approach for passing the persistency file is used, some convenience methods apply:

  • If the filename ends with the platform's separator character ('/' resp. '\'), the default filename dragos-db-memory is appended.
  • If the path starts with a tilde symbol followed by a separator, it is replaced by the user's home directory. So, ~/x is evaluated to /home/me/x on UNIX systems for the user 'me'. Note that this does not work for the home directory of a specific user, e.g. ~me/x.