Question

I want DWR to transparently batch all remote calls that are done in the course of handling the same event.

The reason is that handling an event in Javascript must only take a short time and nothing else can happen during the same time. So if I am going to do many calls, I would like to DWR batch them transparenty. Is that possible? How?

Was it helpful?

Solution

DWR's website explains Call Batching.

From another DWR page:

Remote calls can be batched together to reduce latency. Options can also be set on the endBatch() method:

dwr.engine.beginBatch();
Remote.methodInBatch1(params, callback1);
Remote.methodInBatch2(params, callback2);
dwr.engine.endBatch({
  timeout:3000
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top