Any way to do an "upstream"? #86
Replies: 1 comment 3 replies
-
Sorry, I don't get your question in the last statement. At the beginning of stream connection, library send the request and get the response from server which the response included header and payload of data at the streaming node path. If your whole data size at the streaming node path is 1 k, every time the stream connection begin (new connection or timed out resuming), the data 1k+ will be downloaded to device. How often the stream resuming depends on the network connection interruption. Server will push the payload data to client when server data under the streaming node changed. How often and how much your data changes on the server control your download amount. Server will push the keep-alive data periodically but not constantly (30+ seconds) as following The size of header for each request (CRUD operations and stream) depends on the auth token size which you can read here. The amount of upload and download data depend on the database structure, how often you request or trigger the stream event. |
Beta Was this translation helpful? Give feedback.
-
I'm writing tons of data on Firebase(an Integer in a new path each 10 seconds), but it consumes about 1/4 MB per hour doing this uploads with
Firebase.RTDB.set()
method.Some time ago, I was doing the same with downloads: read continuously from Firebase and that got a bigger impact on my downloads counter. And thanks to an answer from here a I got the solution for this problem: Streams.
Now I would like to know if there is any way to do an stream to upload values constantly to avoid at least connection protocol and SSL encryption overhead expenses on the download counter.
Beta Was this translation helpful? Give feedback.
All reactions