Objective : Limiting signedIn users to be able to write only 'N' times per day in firebase realtime database.
Schema : Tree of the database:
Condition Value : Object dipt contains now key and document-name is the date & time when a user wrote in database via the application.
dipt:
{
ip: "",
now: "Tuesday, September 29th, 2020, 11:48:00 PM",
reg: ""
}
Problem Statement : Figure out a logic that isn't very resource intensive. I mean, I can get all search-data > Objs of a signedIn user and use foreach to make comparisons from now() and count to the value of 'N' but you & I, we both know that isn't going to be just very resource intensive but also a real pain in rear.
So, there is gotta be a simpler way of doing this. Any help, or any idea of doing this differently, or may be any past experience of dealing with such a scenario is highly appreciated. I look forward to hear from stack overflow geniuses and Firebase-Angular gurus.

