code: function (write, refresh, callback) {
    return function (err, result) {
      if (! err) {
        // XXX We don't have to run this on error, right?
        refresh();
      }
      write.committed();
      if (callback)
        callback(err, result);
      else if (err)
        throw err;
    };
  }
docs: The write methods block until the database has confirmed the write (it may not be replicated or stable on disk, but one server has confirmed it) if no callback is provided. If a callback is provided, then they call the callback when the write is confirmed. They return nothing on success, and raise an exception on failure.  After making a write (with insert, update, remove), observers are notified asynchronously. If you want to receive a callback once all of the observer notifications have landed for your write, do the writes inside a write fence (set DDPServer._CurrentWriteFence to a new _WriteFence, and then set a callback on the write fence.)  Since our execution environment is single-threaded, this is well-defined -- a write "has been made" if it's returned, and an observer "has been notified" if its callback has returned.