Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1346

Support centralized storage of Binary values, keeping content off of the heap

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Blocker Blocker
    • 3.0.0.Alpha1
    • 3.0.0.Alpha1
    • None
    • None

      One of the primary use cases for JCR is to store files. To support storing many files or large files, ModeShape should not represent these BINARY property values in (heap) memory, but instead should utilize disk or off-heap memory. Therefore, ModeShape needs a new storage facility for binary values, where values are stored by SHA-1 hash so they can be reused. We'll likely need multiple implementations:

      1) Store on the local file system and streaming content using a buffered stream. This would work for transient storage by just using a temporary directory. This option may work in a clustered configuration (via FileLocks), though it may not if using NFS.
      2) Store in a database, perhaps with a local transient cache using the local file system.
      3) Store in Infinispan, breaking the binary values into chunks similar to Infinispan's GridFileSystem (or extending the file-system based store but using Infinispan's GridFileSystem directly)

      (Note that per the FileChannel#map method JavaDoc, streaming files via buffering is often faster than memory mapping the file. Since random access is really not needed, simple buffered streaming may be the preferred choice.)

            rhauch Randall Hauch (Inactive)
            hchiorean Horia Chiorean (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: