(This is a conceptual question but as reference, I'm using Android Studio (Java) and Firebase Firestore...)
My app currently has a structure where the user can follow authors and favorite their works. Each user on the backend has a set of follows
and favorites
which updates according to this activity. This seems like a fairly straightforward task -- on each tap of a "Follow" or "Favorite" button, run a request to update that user's follows
/favorites
set (respectively).
However an issue continues to haunt me with this -- the user could very easily tap said button rapidly, sending a multitude of requests, for one, possibly overlapping on pending prior requests, and two, generally overflowing requests to the database. It does not feel wise to give the user that much power
So, my question is, what is the best way to handle updating data of this nature on the backend? Secondarily, is this even an issue in the first place? Is it okay to give the user that much control?