# Ember updates my client data almost immediately after a database change

**URL:** <https://discuss.emberjs.com/t/ember-updates-my-client-data-almost-immediately-after-a-database-change/13388>\
**Category:** Learning Team\
**Created:** [August 2, 2017, 9:14pm UTC](https://discuss.emberjs.com/t/ember-updates-my-client-data-almost-immediately-after-a-database-change/13388 "2017-08-02T21:14:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![keanedawg](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/keanedawg/32/13257_2.png) [@keanedawg](https://discuss.emberjs.com/u/keanedawg)\
**Post date:** [August 2, 2017, 9:14pm UTC](https://discuss.emberjs.com/t/ember-updates-my-client-data-almost-immediately-after-a-database-change/13388/1 "2017-08-02T21:14:54Z")

</div>

Hi there, this is not really a bug but just something that I’m mostly just surprised by.

I am using Firebase as our companies back-end database for a couple of small services. I have two completely separate web applications but they use the same firebase database. I figured that that the way it ought to work is that if I update a certain object in one web app, the other web app would not know about it until it called model() again. That doesn’t appear to be true though. As soon as I update Firebase, the other website immediately updates with the new information (no refresh require or explicit querying required).

Is this normal for Ember? Does my website just keep querrying Firebase for updates every second? How did Ember know the database got updated without me ordering any queries or refreshing anything. I’m still learning how to use Ember.

Thank you!

---

<div class="post-metadata">

**Author:** ![dknutsen](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dknutsen/32/16471_2.png) [@dknutsen](https://discuss.emberjs.com/u/dknutsen)\
**Post date:** [August 2, 2017, 9:36pm UTC](https://discuss.emberjs.com/t/ember-updates-my-client-data-almost-immediately-after-a-database-change/13388/2 "2017-08-02T21:36:08Z")

</div>

Hey @keanedawg, that’s not really an Ember behavior, it’s specific to Firebase. It’s actually one of the coolest parts of firebase! The short version is that firebase uses a websocket connection (it doesn’t need to poll, the server can basically “push” data to the client) and Emberfire contains some specialized adapter code that auto-updates your records whenever they change in the backend. This is part of why (at least I think) the “main” feature of firebase is called the “real time database”.

---

<div class="post-metadata">

**Author:** ![keanedawg](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/keanedawg/32/13257_2.png) [@keanedawg](https://discuss.emberjs.com/u/keanedawg)\
**Post date:** [August 2, 2017, 10:56pm UTC](https://discuss.emberjs.com/t/ember-updates-my-client-data-almost-immediately-after-a-database-change/13388/3 "2017-08-02T22:56:04Z")

</div>

I see. Thank makes more sense. Thank you!
