Hacker News new | past | comments | ask | show | jobs | submit login

I can't tell from the docs - are server functions able to to modify or reject writes to refs in the realtime DB before they happen?



No. All events are asynchronous. This use case is best simulated by having clients post to a queue. Cloud functions then either discards or applies writes in that queue.


You should add this technique to the docs! It makes you realize that the Cloud Functions feature is a lot more powerful than you might initially think.


A lot of people use the Firebase Queue library for this:

https://github.com/firebase/firebase-queue




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: