Wednesday, January 28, 2015

Re: GWT + GAE : how to handle communication failure...

What is the key of the object?

To store in AppEngine Datastore, we use GUIDs and just generate them on the client side. Multiple saves just overwrite.

It sounds like your object might be too big.

E


On Friday, December 26, 2014 at 9:06:35 PM UTC-5, 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+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/d/optout.

No comments:

Post a Comment