Tuesday, November 26, 2013

Re: Re-firing a failed/rejected server call in RequestFactory, is this possible?

Is there any progress on this issue?

Issue https://code.google.com/p/google-web-toolkit/issues/detail?id=5794 is related and is not fixed either.

RF's behaviour in this regard is inconsistent since an "unimportant" retrieval would fail on any ConstraintViolation
in batched requests. It should definitely be possible to batch requests but the current API is not sufficient.

A recommendation would be to pull batching out of the RequestContext interface and expose it in e.g. a RequestContextBatcher.
A RequestContext is used for one request only and is reusable on failure or violation. Thus removing append(), fire(Receiver), etc.
RequestContextBatcher is used for multiple requests.

The specific behaviour in onFailure and onViolation should be discussed further.

Transaction settings might make it necessary for all RequestContexts to be re-executed or to only re-execute the failed/violating requests.
Therefore it must allow customization by the user.

Am Dienstag, 6. September 2011 22:11:30 UTC+2 schrieb Thomas Broyer:
RF invocations are batched in a single HTTP request, but there's no implied transaction. You're free to use a transaction-per-HTTP-request scheme, or a transaction-per-invocation one (or no transaction at all). So when an invocation fail, RF doesn't assume the whole batch can be sent again.
BTW, batching things in a single HTTP request is a network optimization (less HTTP requests => better overall performance). You'd want to batch an important data update with an "unimportant" retrieval; and you wouldn't want a failing unimportant retrieval to make the important update fail as well.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment