Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9789

REST interface for querying properties content

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: HTTP Console
    • None

      I propose here an elegant way to transform mongodb in media server.

      Currently, in most cases, we have a media server and a database containing metadata about this medias. Something like that :

      {
      "_id" : "image_id",
      "url" : "http://media.domain.com/image.jpg",
      "tags" : ["tag_1", "tag_2", "tag_3"],
      "description" : "lorem ipsum..."
      }

      We use this datas to retrieve the image url and insert it into the html document. Like that :

      <img src="http://media.domain.com/image.jpg">

      The problem? Data and metadata are separated. Why not have something like this :

      {
      "_id" : "image_id",
      "image" :

      { "jpg" : "binary datas of the image" }

      ,
      "tags" : ["tag_1", "tag_2", "tag_3"],
      "description" : "lorem ipsum..."
      }

      And the ability to retrieve content like this (mongod on port 80):
      "http://server/database/collection/id/property"

      Then we will be able to do :
      <img src="http://media.domain.com/database/collection/id/image.jpg">

      We can of course consider using a proxy (in Java or Php for example) between the client and the binary datas in mongo, but it would be too slow in terms of performance.

      In the real world the problem is a little more complex. The mongo server should be able to return the mime type for the image format. But beyond that, I find this feature very elegant and mongodb would no longer only a database server, but also a media server (for small media such as images).

            Assignee:
            Unassigned Unassigned
            Reporter:
            jalric Julien Alric
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: