What is the difference between the Firebase REST API and SDK clients? And how to the clients work?
<p>I have a couple of questions on Firebase.  I went through their documentation on their site, and the tutorial.  I've never used anything like this before, so it's a bit confusing:</p>

<ol>
<li><p>I see there is a REST API and a Javascript API.  Is the main difference that the REST API is more like a traditional API and requires polling, whereas the Javascript API allows you to receive deltas from Firebase itself?</p></li>
<li><p>I want to create a service that receives these deltas and stores them in my own database.  But I don't understand how Firebase can keep a connection open for so long.  I'm assuming there must be a connection open that Firebase pushes the data through back to my service.  Is there a time limit?  Or if the connection gets closed is the best practice to detect this error and re-login?</p></li>
</ol>