Hello. thank you for your answer. However I just gave a scenario where there would be a problem... but even if you reduce the size of the object returned to 0.1 KB, you can still have a connection failure on the client side "JUST AT THE WRONG TIME" --> the request is received by the server and the server save the item to the datastore --> but the response is not received by the client... so the client believes that the item has not been saved...
Le samedi 27 décembre 2014 13:22:03 UTC-3, Chad Vincent a écrit : > > Reduce the size of SaveBarterItemResult. If the whole 3MB of data is > required, but causes disconnects frequently, return a smaller/lighter > object from the save call, and then retrieve the full data set in a more > resilient manner. > > On Friday, December 26, 2014 8:06:35 PM UTC-6, Clement Boret wrote: >> >> Hello. >> >> I have a question concerning: how to handle communication failure... >> >> The best way to explain my problem is to give an exemple: >> >> >> In my app, the user has a gwt UI page where he creates an "item" when he >> has finished to fill all the requested information, he clics on a "save >> button" which is going to call the server using RPC: >> >> >> serverService.saveBarterItem(saveItemRequest, new >> AsyncCallback<SaveBarterItemResult>() { >> public void onSuccess(SaveBarterItemResult result) {} >> public void onFailure(Throwable caught) {} >> }); >> >> in my exemple, when everything is going ok, the server returns an object >> "SaveBarterItemResult". >> >> >> imagine that the object that should be returned is very big in size (for >> exemple 3 MB). >> NOW imagine the following scenario: >> >> the client (the browser of the user) successfully reach the server. >> the server (which is a GAE) save the "item" in the DB and starts >> returning the result. >> then the internet of the client is lost.... >> --> >> the onFailure function is called in the browser... >> which makes the user think that the "item" has not been send >> successfully... (whereas in fact it has been send successfully and it has >> also been saved successfully) >> >> >> >> >> THE PROBLEM THAT I HAVE is that I have no way to know that the item has >> been saved successfully on the server. >> (so the normal way for my gwt app to behave would be to let the user >> click on the save button again... but if he does, then his item will be >> saved two times...) >> >> HOW DO YOU USUALLY HANDLE THIS? >> >> -- 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+unsubscr...@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/d/optout.