Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to group gwt-rpc calls?

With DWR it is possible to group together several service calls into one single HTTP request :
dwr batch feature

This feature is very useful to reduce the latency of an ajax application. Is there a way to do something similar with GWT / GWT-RPC ?
Thanks for your help

like image 661
Alexandre Victoor Avatar asked Oct 25 '08 18:10

Alexandre Victoor


1 Answers

Google's Ray Ryan did a presentation about Best Practices For Architecting Your GWT App, where he talked about using a command pattern. Sending asynchronous commands that happen to go over RPC is what you probably want. Once you're sending commands instead of RPCs, it's very easy to batch them.

See gwt-dispatch for a library that implements this pattern for you. I'm just starting to use it, so I don't know if it batches automatically, but it's all open source with a permissive licence, so you can fix it if it doesn't.

like image 125
Steve Armstrong Avatar answered Sep 30 '22 13:09

Steve Armstrong