# Which protocol does Node RED get data from Firebase

**URL:** https://discourse.nodered.org/t/which-protocol-does-node-red-get-data-from-firebase/13736
**Category:** General
**Created:** [27 July 2019 01:48 UTC](https://discourse.nodered.org/t/which-protocol-does-node-red-get-data-from-firebase/13736 "2019-07-27T01:48:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![quangminh.le0701](https://avatars.discourse-cdn.com/v4/letter/q/22d042/32.png) [@quangminh.le0701](https://discourse.nodered.org/u/quangminh.le0701)
#### Post date: [27 July 2019 01:48 UTC](https://discourse.nodered.org/t/which-protocol-does-node-red-get-data-from-firebase/13736/1 "2019-07-27T01:48:54Z")

</div>

I'm using Node RED to get data from Firebase Realtime Database now.  
As i know, unlike typycal HTTP, Firebase using "something" to remain a connection with a client, so data will be updated realtime (like websocket).  
So does Node RED and Firebase use websocket to get data too?  
i use this one [https://flows.nodered.org/node/node-red-contrib-firebase](https://flows.nodered.org/node/node-red-contrib-firebase)

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [27 July 2019 09:13 UTC](https://discourse.nodered.org/t/which-protocol-does-node-red-get-data-from-firebase/13736/2 "2019-07-27T09:13:15Z")

</div>

When you install Node-RED it doesn't come with any nodes for Firebase so you must have installed some yourself. If you want the definitive answer you will need to determine the full name of the node you are using [https://flows.nodered.org/?term=firebase&type=node&num\_pages=1](https://flows.nodered.org/?term=firebase&type=node&num_pages=1) and try adding that info to your question (and the title)

You could also investigate yourself by following the link to the nodes source code (generally on github) and either looking at the source yourself or asking the author.

---

<div class="post-metadata">

### Author: ![quangminh.le0701](https://avatars.discourse-cdn.com/v4/letter/q/22d042/32.png) [@quangminh.le0701](https://discourse.nodered.org/u/quangminh.le0701)
#### Post date: [27 July 2019 13:25 UTC](https://discourse.nodered.org/t/which-protocol-does-node-red-get-data-from-firebase/13736/3 "2019-07-27T13:25:23Z")

</div>

> **[node-red-contrib-firebase](https://flows.nodered.org/node/node-red-contrib-firebase)**
>
> Node-Red module for interacting with Firebase

  
i use this one. Thanks for your advice

---

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [27 July 2019 14:01 UTC](https://discourse.nodered.org/t/which-protocol-does-node-red-get-data-from-firebase/13736/4 "2019-07-27T14:01:58Z")

</div>

Like ukmoose set, to get the answer digging in the source gives often the clue. The node itself uses the official firebase js SDK. Under the hood, xmlhttprequest is used, as well as `faye-websocket`. So websockets indeed. Each of the libraries in the SDK comes with their own package.json to check the dependencies. To figure out how it actually works, you’ll have to read the code, which I’ll readily admit I did not do. It’s written in TypeScript, and I’m not exactly a fan of reading that.

> <https://github.com/deldrid1/node-red-contrib-firebase/blob/master/package.json>

> <https://github.com/firebase/firebase-js-sdk/blob/master/packages/database/package.json>

> **[faye/faye-websocket-node](https://github.com/faye/faye-websocket-node)**
>
> Standards-compliant WebSocket client and server. Contribute to faye/faye-websocket-node development by creating an account on GitHub.
