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

REST service fails with large BINARY values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2.6.0.Final
    • Fix Version/s: 3.0.0.Beta3
    • Component/s: None
    • Labels:
      None

      Description

      The REST service is currently embedding every BINARY value found in any properties of a node (see our documentation). The result can be (disastrously) large JSON documents and out of memory errors.

      Instead, the service should check the size of the BINARY value and, if perhaps above the "large values" size, insert into the JSON document a URL which can be used to directly stream the BINARY content. Note that the URL to a BINARY value probably needs to be encoded differently in the JSON document than would a regular STRING property value that happens to be a URL. Perhaps instead of appending "/base64" to the property name, we could append "/url"?

      The REST client would need to be modified to check for the URL value and, when needed, resolve it to obtain the value.

      Note that this solution does not address the PUT/POST of new or updated content. So the solution will also need something that will likely need to work with a multi-part upload mechanism.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hchiorean Horia Chiorean
                  Reporter:
                  rhauch Randall Hauch
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: