Unfortunately, Firebase doesn't have out of the box an aging mechanism (delete old entries automatically). So, I am trying to implement one. However, I am stuck between two decisions:
- If a client fetch an old entry, he will delete automatically: I think it is the easiest for my context, but it doesn't look very secure to me.
- Implement a small script/program on a server that will check the full database and delete old entries.
I like the first solution, since it doesn't include deploying another server side application but I don't know if it could represent a risk.
What do you think is the best ? How can I secure the first solution to avoid any possible deletion of all items ? For the second solution, I don't won't to run the script from my computer and I don't want to pay for another sever to deploy the script, it it possible to to deploy it on Firebase ?