I create an android application that uses firebase. In my application, users can follow other users. (Like twitter). Users can write posts. I would like, for a user, that he can retrieve the last posts of the people that it follows. I have been looking for several days but I can not find a design that would allow me to do this.
I thought of a few things like this:
"user":{
"Alize":{
"nom":"Alize",
"follow":{
"franck":true
}
"franck":{
"nom":"franck"
}
}
"post":{
"franck":{
"-APUH45599D":{
"titre":"blablabla,
"author":"franck,
"date":"21025522402"
}
}
}
But if i want, for a user, get last posts of the following people, this require one requete for each following people, and i can't order by date...
Someone would have an idea ? Thank you ! (Sorry for my english)