Tuesday, November 12, 2013

Re: synchronization problem with rpc calls

In the callback for the click on the hyperlink, disable the hyperlink so it can't be clicked twice. In your RPC callback, you can enable it again in the onFailure method. Presumably it should stay disabled in your onSuccess method.

That will stop people from asking for two games with a double click, but won't stop separate people from asking for the same game at the same time. If that's also possible then you still need some server code to make sure only one game can be created for an invitation.

If you are storing invitations in a database then you can use the database to track whether an invitation has been used yet. Just make sure you use transactions with the database so you perform atomic operations.

HTH
Paul

--
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate