async hessian rpc
rzo
rzo at gmx.de
Wed Sep 30 15:23:37 EDT 2009
hello,
i am currently using netty to implement asynchronous hessian rpc client
+ server.
is there interest to include this into the netty project ?
the idea is the following.
client side:
HessianProxyFactory factory;
pipeline factory:
pipeline.addLast("outputStream", new OutputStreamFilter());
pipeline.addLast("inputStream", new InputStreamFilter());
pipeline.addLast("hessianCallEncoder", new HessianCallEncoder());
pipeline.addLast("hessianReplyDecoder", new HessianReplyDecoder());
pipeline.addLast("hessian handler", factory);
client code:
ATestService service = factory.createAProxy(TestService.class)
Future<Object> future = service.someMethod()
Object result = future.get()
TestService is the interface defining the available server side methods.
ATestService has the same methods as TestService. However all methods
return Future (even void methods).
Synchronous calls are also provided:
TestService service = factory.createProxy(TestService.class)
Object result = service.someMethod()
On the server invocations are also asynchronous, thus allowing comet
like services with a single tcp/ip connection.
First tests on a single PC with single client/server show a performance
of apprx 2000 invocations/responses per second.
Note: input/output streams can also be used for other applications where
for example incoming xml streams have to be parsed.
ideas and suggestions are welcome.
- ron
More information about the netty-users
mailing list