On Monday, March 26, 2012 8:27:08 PM UTC+2, Miroslav Genov wrote:
Hello,
Was wondering where anyone is using RequestFactory with JsonRpc ?
I believe Google is using it, as there have been some fixes to it this winter.
I'm trying to get it working, due performance issue with the standart serialization of RF,
I'm not sure it'll change much things re. serialization performance, but it changes a few things in how you use the RequestFactory. For instance, there's no batching: only one method invocation can be made per RequestContext instance. Also, I'm not sure you can transport graphs of proxies (almost sure you can't). And you'll always send full objects, not diffs of changes as with the "standard" payload dialect.
And last but not least: GWT doesn't give you any server-side implementation (AFAIK, the JsonRpc dialect of RequestFactory has been designed for calling existing JSON-RPC services).
but the RfValidator complains with: "The type JsonRpcRequestContext must be annotated with Service, ServiceName, or JsonRpcService". The strange part is that my RequestContext already have it:
public interface JsonRpcRequestFactory extends RequestFactory {
@JsonRpcService
public interface JsonRpcRequestContext extends RequestContext {
@JsonRpcWireName(value = "findAll")
Request<List<SimpleJsonRpcProxy>> findAll();
}
JsonRpcRequestContext simpleRequest();
}
It looks like you should run the RfValidator in "clientOnly" mode when using the JSON-RPC dialect. Unfortunately, you can only do that with the command-line ValidationTool.