Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Android and Mysql Database Communication without wasting too much if your time.
The question is published on by Tutorial Guruji team.
The question is published on by Tutorial Guruji team.
- Apps like Spotify and Instagram that their database, how fast users
to click on buttons respond? How quickly without having to process
the information stored in the database? - For example: the Spotify app, I quickly click on the follow button (a
very rapid clicks). In this case, how information is stored in a
database? - What is the best way to connect to the database and managing lots of
connections? - Should I use the database interface? example: android sqlite
- In the application Instagram, when I click on the button Like I
quickly what happens? When information is stored in a database?
(i use volley library)
thanks
Answer
Let us take an example scenario, when you hit a like button
- the first thing to do is to store in your local DB that a user has liked a particular artist
- Based on this, you should call an API off your backend which will record this event. But this has to be asynchronous and you shouldn’t
run this on the Main thread- Before you wait for a response from the API, you can go ahead and update the Android view based on the local like counter (you can use
sqllite for this)- The backend will run a cronjob to get the total amount of likes and put them into another table column
- So when a new user comes after the cronjob, he/she will see the updated counter
We are here to answer your question about Android and Mysql Database Communication - If you find the proper solution, please don't forgot to share this with your team members.