I wonder if server responses on client operation requests should be tied by some operation id?
Tied would be when:
1.Client app sends request to server to e.g. buy item X, and sets operation id as ID.
2.Server responds with operation id and true or false. This would mean that operation with that id was successful or not.
Untied example:
1.Client app sends request to server to e.g. buy item X
2.Server responds with just an updated data of item X, where new item owner would be mentioned. This way client can check if owner name is equal to it's own name and if true, assume that item was bought successfully. Same response data could be sent to other clients, to let them know that item X was bought by someone.
Which approach is better?
IMHO untied is better and simpler in implementation, but it feels like there can be so many edge cases which I don't see right now.