Hi Rafe,

ProtoRPC looks great! Thanks for sharing this preview with us. I've been 
working on something similar a couple of weeks ago. My gaesynkit 
project http://code.google.com/p/gaesynkit/ enables GAE application 
developers to create entities in the client's Web Storage and synchronize 
them with the server-side Datastore at a later point of time. It utilizes 
JSON-RPC 2.0 for syncing between client and server.

I define a JSON-RPC 2.0 service as follows:

import json_rpc

class HelloHandler(json_rpc.JsonRpcHandler):

  @json_rpc.ServiceMethod
  def hello(self, name):
    return "Hello, %s" % name

A pure JS client makes an RPC like this:

var data = {"jsonrpc": "2.0", "method": "hello", "params": ["Joe"], "id": 
42};
var http = new XMLHttpRequest();

http.open("POST", RPC_ENDPOINT_URL, false);
http.setRequestHeader("Content-Type", "application/json-rpc");

http.onreadystatechange = function() {
  if(http.readyState == 4 && http.status == 200) {
    callback(JSON.parse(http.responseText));
  }
};

http.send(JSON.stringify(request));

I wonder if I should switch to or merge some code with the ProtoRPC library.

Kind Regards,
Tobias

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to