Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am considering using firebase as a way to brodcast data messages to many connected users on mobile phone native apps running actively in the foreground.
In a "channel" (presumably a node in the database) there might be a new 1kb message every second or so and potentially thousands of users listening in.
The ideal latency should be less than a second.
Is Firebase realtime json database ideal for this use case?
What are the limitations on number of users, number of messages and latency?
How does it compare to "Google Cloud Messaging", native push notifications, or other frameworks, for the same purpose?
Firebase is a real time json data base and it would work absolutely fine for what you are requesting.
There is no limitation to the number of users you can have but there is a limitation to the number of active connected users you can have. The free pricing tier allows 100 active connections at one time. The more expensive tiers allow for unlimited active connected users. There is no limitation on number of messages. Latency is very low. Changes are displayed almost instantly.
I haven't personally worked with Google cloud messaging or any other real time frameworks so I can't answer that. But firebase has great documentation and is very easy to set up and implement. The only downside is that firebase do not currently provide push notifications. However they can easily be implemented with a push notification service such as Batch
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Let's say I'm ingesting real-time data and want the end users who are viewing the data in real time to be able to group the information in different ways and quickly get views that represent the new groupings.
So if the data was for example, all the transactions on an e-commerce web site, and the user was viewing a live grid(e.g. in a Kibana-like website, with live data delivered via websocket) of transactions and wanted to group by country and view the top 10 countries by notional price of their transactions, the UI would send that command down to the servers and the servers would do all the necessary calculations to feed the user the aggregated notionals of the top countries, and constantly update that stream as new data was processed.
I know there are frameworks (e.g. Flink,Storm, Kafka Streams) that let you define such calculations in code, but is there any framework that lets the user pick different aggregations and set those up in real-time?
I'll answer for Flink:
Apache Zeppelin has a good integration with Flink. It lets users set up dynamic Flink queries. These are on-demand (user-defined), and off course you'll need a Flink cluster to attach to. These also refresh the Zeppelin UI.
I'm speculating, but I think that the backend will received Flink's updates, and the UI will fetch for new data at a fixed interval. While this is not done reactively, I believed this is as good as it can get currently.
Here is a Flink blog article on it: https://flink.apache.org/news/2020/06/15/flink-on-zeppelin-part1.html
Flink can do this out of the box, using Flink SQL with the SQL client. You can interactively create dynamic, continuously updating queries that stream their results into Elasticsearch (for example).
This talk is a good intro that shows off what's possible. It includes a bunch of example queries, and uses Grafana on top of MySQL for dashboarding. You can do the same with Elasticsearch/Kibana, if you prefer.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am making an account system with firebase.
I have the auth part ready.
I also want to store data for every user.
Which database should I use? Firebase Firestore or the real-time database?
Thank you!
I suggest using Firebase Firestore for storing user's data.
You could use Firebase Firestore instead of Real Time Database. As the name suggests, the Real Time database is useful for realtime data sharing. Eg: Sharing Score of one participants to another participants realtime.
Cloud Firestore support indexed queries with compound sorting and filtering. Unlike Realtime Database, Cloud Firestore allows chaining the filters and combining filter and sort on a property in a single query
Realtime Database supports deep queries with limited sorting and filtering functionality. In a single query, you can either sort or filter, not both, on a property
While the Realtime Database is just a giant JSON tree, Cloud Firestore is a little more structured
You can expect to find new query types, more robust security rules, and improved performance with some other advanced features planned for Cloud Firestore
You can set up listeners in Cloud Firestore to stream in changes in real-time
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
It's considered good practice to remove listeners from Firebase databases (whether that be Cloud Firestore or Realtime Database) when the listening components are unmounted.
In a lot of applications, mine included (React Native app), this might not happen very often.
For example, when my user is authenticated (signed in), they are subscribed to a number of listeners on both RTDB and CFS. Things like notifications and messages and other "realtime" updates i want them to see app-wide - think notification "badges" for example or "unread messages".
Developers of Native applications will know that apps can remain "backgrounded" for long periods of time. And with auth refreshing, users will rarely log out of my application. This means that those components are never (or rarely) unmounted and thus, remain subscribed to updates - i think.
Should i be adding logic that removes those subscribers to realtime data when a user backgrounds the application, only to re-instate them when they foreground again?
What you're asking is primarily a matter of opinion, which is off-topic for Stack Overflow. That said, you should probably take some time to understand the ramifications of leaving listeners added indefinitely.
A listener that's not removed when the user isn't looking at your app still incurs the cost of downloading updates to the documents it's listening to. Whether or not that's acceptable is entirely up to you.
The host OS will likely throttle the network access of app that can't be seen by the user after some time. This is for the benefit of the user, so poorly implemented apps don't consume excess network and battery. You can't depend on these listeners to work properly when this happens. If you want listeners to stay active while the app isn't visible, you will need to tell the host OS what you want using whatever APIs it provides. Even then, you don't have any guarantees, as the OS may simply kill an invisible app in order to reclaims resources.
You will have to decide for yourself when it makes sense add and remove listeners, after you understand the behavior apps on the given OS.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am developing android and IOS app with web backend admin support for an organisation oriented employee, tasks and issue management system. issues and the task will be posted by any public people and issue will be addressed and solved by the organization people.
my app will have dynamic keyword filtering over the new issue posting and an algorithm will keep running to identify the issue categories dynamically from the issues being posted.
my app or the search result and filters should be fast in retrieving the data and it should not affect my application performance. I didn't know which one is good to use for a case like this.
I use the Realtime database for an large iOS app that contains users, jobs for users, favourites, messages etc. So I need the database to show results in realtime as well as being reliable.
The best features for a big app like the one I have built are the
offline capabilities
If the user goes offline, the database is still responsive and persists data to the disk which resynchronises when connection is established.
Data synchronization
All of my users on the app can see changes happening instantly such as notifications and messages, job updates etc. It's reliable and stops any overlapping potential risk.
https://firebase.google.com/docs/database/
Additionally, it sounds like you will benefit from the easy JSON structure that Firebase Realtime database offers to build categories etc.
I use a lot of filters in my iOS app and the calls to the database return results almost instantly given a connection is established; its very flexible.
In terms of reliability
Cloud Firestore is currently in beta. Stability in a beta product is not always the same as that of a fully launched product, where as Realtime Database is a mature product.
Use Fire-Base Realtime database if your apps are not going to serve more than 1000 people.
Because Fire-base Realtime doesn't perform much complex and fast queries like Fire-Base FireStore. And you can not upgrade your app if your app is based on RealTime database.
FireStore has more features that Realtime database.
You can go and check the difference between both of them:-
https://firebase.google.com/docs/database/rtdb-vs-firestore
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there any FCM usage rate list for commercial apps created for revenue?
Or is FCM completely free for commercial apps too?
Is there any page on Firebase documentation which tells all the usage limits and their prices if the limits are crossed?
Limits we are looking to know are:
No. of devices can be added to device group
No. of messages can be sent per day
Max No. of topics can be created
Any other limits except 4 KB message size, max collapsible key.
Thanks.
Firebase Cloud Messaging is completely free. The only limitations you'll encounter is pretty much related to the Lifetime of the Message and as you already know, the message size limit (4KB for data and 2KB for notification payload).
There is the Official Firebase Pricings Page where you can see the Cloud Messaging is included free for all their plans (Free and Premium) services, an estimated costs calculator, and the FAQs. But most of the limits are for the Database, Storage, etc.
No. of Devices that can be added to a Device Group is 20.
No. of messages that can be sent per day is unlimited, AFAIK. (See the lifetime of a message for the restrictions related to the message)
There is no limit to the number of topics that can be created.