Skip to content
Shawn Wilkinson edited this page May 1, 2014 · 18 revisions

For nodes and software to be able to work together we need some common framework. We do this my establishing meta template. A meta template meta information in a a JSON format. For example, this is some meta information used on the current prototype of Metadisk.

{
    "datetime": "1398875062",
    "filehash": "b17fee6427ee665eb54159762fe03847792af1d94bf6769b82f95b95e82975d2",
    "filename": "b17fee6_WhatisStorj.pdf",
    "filesize": 337748,
    "uploads": [
        {
            "host_name": "ge_tt",
            "url": "http://ge.tt/162T7Ef1/v/0"
        },
        {
            "host_name": "gfile_ru",
            "url": "http://gfile.ru/a4WfC"
        },
        {
            "host_name": "rghost",
            "url": "http://rghost.net/54761561"
        }
    ],
    "version": "0.2"
}

All nodes on the network can view this meta information. So if you asked a Storj node, like Metadisk, for the file with the hash b17fee6427ee665eb54159762fe03847792af1d94bf6769b82f95b95e82975d2 it would retrieve this information, then retrieve the specified file for you.

We can do this through the current API: http://node2.storj.io/api/download/b17fee6427ee665eb54159762fe03847792af1d94bf6769b82f95b95e82975d2

If the information was missing fields or in the incorrect format then the nodes would not be able to function correctly. We establish a meta contract so everyone can work from a standardized format.

{
  "name": "metadisk-template-a",
  "filehash": <string>,
  "filename": <string>,
  "filesize": <int>,
  "uploads": [
    {
      "host_name": <string>,
      "url": <string>
    },
    {
      "host_name": <string>,
      "url": <string>
    },
    {
      "error": <string>,
      "url": <string>
    }
  ]
}

We sent this data as a transaction to a metachain, like Datacoin.

Clone this wiki locally