code: function publish(prop, obj, callback) {
      callback = callback || function() {};
      if (typeof callback !== 'function') {
        throw new Error('invalid callback');
      }
      if (!prop || typeof prop !== 'string' || prop.length < 1) {
        throw new Error('invalid property path');
      }
  
      // Worker for publishing queue.
      function _publish(obj, callback) {
        // Write the object to the separate file.
        var shortname = prop + '.json';
        var data = JSON.stringify(obj);
        var hash = _checkNewHash(shortname, data);
        if (!hash) {
          // No need to publish if the data is the same.
          return callback();
        }
        published[shortname] = true;
        // Update new object and call notifications.
        _updateObject(shortname, obj, hash);
        var fullname = path.join(folder, shortname);
        fs.writeFile(fullname, data, function (err) {
          if (err) {
            console.error('Failed to write file %s err:', fullname, err);
          }
          return callback(err);
        });
      }
  
      // If there is no queue for this object, create one.
      if (!publishQueues[prop]) {
        // Only one task should be executed by worker at any time.
        publishQueues[prop] = async.queue(_publish, 1);
      }
      // Publishing of the same object should be queued and executed one after
      // completion of another.
      publishQueues[prop].push(obj, callback);
    }
docs: Publish object. prop - dotted property path. obj - JSON object to publish. callback(err) - completion.