CopyPastor

Detecting plagiarism made easy.

Score: 0.8216496764653006; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2018-03-31
by Alex Mamo

Original Post

Original - Posted on 2017-12-21
by Alex Mamo



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The main question should be, what happens when we reach the limit of `concurrent connections`? Meaning the `maximum number of writes per seconds`.
If you have a very popular app, you most likely already reached that limit, and at that moment, the Firebase database will start to queue up the number of writes that cannot be written on the disk straight away. With other words, Firebase biulds a `buffer of pendings write operations`. If the write volum goes down, it will start caching up with the buffer.
The answer to your question, is no, there is no way to programmatically catch an exception, when Firebase Realtime database reaches the limit. This is happening because at that moment, there is no exception to be thrown. There is also no method that has as a return value, the maximum number of connections.
But, there is although a workaroung in which you can attach a `CompletionListener` on the node that you are interested. If you'll see that the time between when you start the write operation and the time when it completes `goes up`, it means that you're buffered (queued). This is how you can know when the 100 simultaneous connection is reached.
The main question should be, what happens when we reach the limit of `concurrent connections`? Talking about `concurrent connections` it means the `number of writes per seconds`.
At that moment, the Firebase database will start to queue up the number of writes that cannot be written on the disk straight away. With other words, Firebase biulds a `buffer of the pendings write operations`. If the write volum goes down, it will start caching up with the buffer.
The answer to your question, is no, there is no way to know programmatically whether Firebase realtime database reaches the limit. There is no method that has as a return value the maximum number of connections. But, there is although a workaroung in which you can attach a `CompletionListener`. If you'll see that the time between when you start the write operation and when it completes `goes up`, it means that you're buffered (queued). This is how you can know when the 100 simultaneous connection is reached.

        
Present in both answers; Present only in the new answer; Present only in the old answer;