anchor.diff:  part of clean_backend;
   
   class Backend {
  -  Publisher publisher;
  -  MongoProvider mongo;
  +//  Publisher publisher;  should be part of serverside sync
  +//  MongoProvider mongo;  should be part of serverside sync
     StaticFileHandler fileHandler;
     HttpServer server;
     String host;
     int port;
  +  RequestHandler requestHandler;
   
  -  Backend(MongoProvider mongo, Publisher publisher, StaticFileHandler fileHandler, {String host: "0.0.0.0", int port: 8080}) {
  -    this.fileHandler = fileHandler;
  -    this.mongo = mongo;
  -    this.publisher = publisher;
  +  Backend(StaticFileHandler this.fileHandler, this.requestHandler, {String host: "0.0.0.0", int port: 8080}) {
  +//    this.fileHandler = fileHandler;
  +//    this.mongo = mongo;
  +//    this.publisher = publisher;
       this.host = host;
       this.port = port;
       
  -    print("MongoDB max history version: ${mongo.maxVersion}");
  +//    print("MongoDB max history version: ${mongo.maxVersion}");
     }
     
     void listen() {
  
positive.code:       print("Listening on ${server.address.address}:${server.port}");
        
        router
          ..serve(new UrlPattern(r'/resources')).listen(_serveResources)
          ..defaultStream.listen(fileHandler.handleRequest);
      });
    }
  
    void _serveResources(request) {
      HttpBodyHandler.processRequest(request).then((HttpBody body) {
        List requests = JSON.decode(body.body);
        
        _processRequests(requests.reversed.toList(), []).then((response) {
          request.response
            ..headers.add("Access-Control-Allow-Origin", "*")
              ..headers.contentType = ContentType.parse("application/json")
              ..write(JSON.encode(response))
                ..close();
  
negative.code:       return new Future.value(response);
      }
      else {
        var req = requests.removeLast(); // req is {'id': int requestCount, 'request': Request request} see performHttpRequest in clean_ajax, server.dart
        
        return requestHandler.handleRequest(req["request"].name, req["request"]).then((result) {
          response.add({"id" : req["id"], "response" : result}); 
          print("RESPONSE: ${result}");
          return _processRequests(requests, response);
        });
  //      return _process(req["request"]["args"]).then((result) { // we have request hadler for this
  //        response.add({"id" : req["id"], "response" : result});
  //        print("RESPONSE: ${result}");
  //        return _processRequests(requests, response);
  //      });    
      }
    }
  //  This probably should be in serverside sync? or somewhere registered as requestExecutor to requestHandler
  //  Future _process(Map data) {
  //    print("");
  //    print("REQUEST:  ${data}");
  //    if (data["action"] == "get_data") {
  //      num version = mongo.maxVersion;
  //      return publisher.getData(data["collection"], data["args"]).then((d) => {"data" : d, "version" : version});                             
  //    }
  //    else if (data["action"] == "get_diff") {
  //      return publisher.getDiff(data["collection"], data["args"], data["version"]);
  //    }
  //    else if (data["action"] == "add") {
  //      return mongo.collection(data["collection"]).add(data["data"], data["author"]);
  //    }
  //    else if (data["action"] == "change") {
  //      return mongo.collection(data["collection"]).change(data["_id"], data["data"], data["author"]);
  //    }
  //    else if (data["action"] == "remove") {
  //      return mongo.collection(data["collection"]).remove(data["_id"], data["author"]);
  //    }
  //    
  //    return new Future.value({"action" : data["action"]});
  //  }
  }