Reputation: 1518
I have an app that makes a booking and receives back a booking ID. With this booking ID the app can send this to the server to check the status of that particular booking.
At the moment, I have a Service that sends the booking ID to the server every 10 sends until the booking is confirmed.
Would it be better to have a push notification sent to the app using GCM when the booking is confirmed or is the current solution adequate?
Upvotes: 0
Views: 49
Reputation: 1595
If this similar situation occurs with me, i would not request the server on every 10 sec. It is a bad practice.
I will go for the following solution, i will try to get the immediate response from the server after the booking request. If the server is unable to respond at that time, then i would have implemented a stack or queue on the server to save the booking request. After when the server process the request of the booking it should send a push notification to the user for confirm the request(positive or negative). Hope this will help :)
Upvotes: 1