I am writing an Android app that retrieves its data (in this case Questions) from Firebase' Real-Time database.
When the app starts I want to retrieve X random questions from the DB. However I do not want to fetch all of the questions and take random ones in the client side.
I know that I can limit the number of entries to fetch but they wont be random. I tried to see if I can write a server side to get the random data but I don't see how I can do it. I would write a PHP script in the server but It seems that there are only Cloud Functions.
Any suggestions ?