I'm designing a REST API for my app on Firebase Realtime Database. I would like to know which of the two options would be better for me both from a point of view of cost and efficiency:
Client writes the request directly on my database and the cloud functions' onWrite gets triggered and writes a response at an appropriate node which the client reads.
Client sends a HTTP request with a request and Firebase Cloud Functions' HTTP trigger sends an appropriate response back to the client.
I expect to get around 300 000 API requests per month.