i found out that pubnub is a solution to stream real time data to mapbox on this video .
But what about the storage?
Did pubnub store the data on a database so it can be analyzed later or not ?
PubNub Storage
When you publish message to PubNub, those messages can be stored for 1 to 30 days or forever. You can use the PubNub history and fecthMessage APIs of the PubNub SDKs to retrieve those messages. You can deleteMessage's, too.
For more details on PubNub Storage, please see the PubNub Storage & Playback Tutorial. Each of the PubNub SDK Docs has the full API details for the respective language.
Related
On Flutter Web, I have a stream from firestore which displays the current messages in a collection but when the internet is not available I can't have access to those messages from that stream.
I Decided to use a hive box to cache the messages and return them when no internet is available.
I cache the massages using a Hive Box but it's really challenging for me to leverage providers and return the cache data first and linking that up with the stream from firestore.
Tried convert the cached data from a Hive Box into broadcast stream and combine with the firestore stream using ZipStreams and did a mapping but doesn't still work.
Please I will need help on the best way to go about this.
Firestore has its own data persistence (read/write data when offline) and it handles all the hard work so you don't need Hive.
Works on web apps, android and iOS.
See:
https://firebase.google.com/docs/firestore/manage-data/enable-offline
How do i listen to data changes in Firebase Cloud Firestore with ESP8266? So far i have managed to connect ESP8266 with firestore to read and post data to Firestore using the REST API, but instead of constantly reading data from Firestore, I want to listen to an event when the data changes in Firestore.
In short, I want to have a stream open where i am listening for changes in Firestore.
This can be done with Firebase Real-time database, but i haven't found examples for Firestore.
Here is an example of what i am trying to do, but with real-time database: https://github.com/mobizt/Firebase-ESP8266/blob/master/examples/Stream/Stream.ino
I was asking around on some forums, and i found out that sadly this is not possible :(
The Cloud Firestore supports the REST API unless stream like feature are not available due to poor performance and Firebase team decided to remove this feature.
The only possible method that suitable for no Firebase SDK installation is the RPC (gRPC) which is not currently available in embedded device.
The other problem is database secret can't use in the Cloud Firestore, the auth or custom token is required and need the SSL/TLS library for key encryption and signing. This can be done in ESP32 with mbed TLS which can't do this in ESP8266 with BearSSL.
Then Cloud Firestore with realtime feature (using gRPC) is not possible in ESP8266.
From a issue on github#Firebase-ESP8266: https://github.com/mobizt/Firebase-ESP8266/issues/126
The workaround can be using a webserver and/or Firebase Functions, which sadly was the thing I was trying to avoid.
I need information on how to connect and send data to firestore from an Arduino Board and an ESP2866 module. I've only found tutorials using Firebase realtime, the ones I found using Firestore are using the NodeMCU board.
I have a Vue.js application reading some fields from a Firestore db, which should recieve information from the arduino with some attached sensors. From what I've seen my options are changing to firebase realtime or changing to NodeMCU( not possible ). I some direction to follow, on how to use firestore with arduino or just change the db.
One way to do it is to have an online server, after that it becomes very easy. Send your Arduino data to the server and then write the data to Cloud Firestore.
To find how to write data into Firestore, refer this documentation: https://firebase.google.com/docs/firestore/manage-data/add-data and chose the integration for your server. Firestore supports most of the popular server integrations like Node.js, GO, PHP, Python etc.
As answered by #doublejosh, refer to this documentation: firebase-extended
I had quick success using firebase-arduino for the real-time database rather than Firestore. Since Arduino projects are generally hobby, this should probably work well enough.
I want to send the acceleration data which is retrieved from Apple Watch to Cloud Storage for Firebase.
However, Firebase is not support watchOS.
Should I have sent the acceleration data to the storage via iPhone?
Please teach me a better method.
As a workaround you could send the data to the Firebase Realtime Database or Cloud Firestore using the REST Service. By implementing a Firebase node.js cloud function which triggers on Data Writes you could copy the data to Cloud Storage.
Anyway for your purpose it seems to be a better solution to work with the super fast Realtime Database instead of the slow storage.
Is there any tool to monitor the data transfer to my real time database in firebase? To see how many user connect at live time and how much data is transferred?
There's a usage tab in your Firebase Database console that has most of that information.
We also just released a tool that allows you to profile your database usage. See that tool's blog post and reference documentation.