Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service connecting to Firebase a bad idea?

I am building an Android app that requires real time updates. My server is Firebase. Firebase is meant to receive its updated data when the user is connected to the server. I am very impressed with Firebase so far, however my concern is receiving the new data when the app is not active. I really do not want to try these ideas to find out they are a bad idea, for I am short on time. I am looking for suggestions and advice.

  • A service (example). Worried about battery consumption and going over my connection limit if users are always connected.
  • An AlarmManager to run a sync every X hours. Worried about not getting updates quickly enough.
  • Using GCM push notification to send a tickle. Worried about paying for another service.

Any other suggestions or possible issues I missed? Thanks for your time!

Edit

I found this thread. Still unsure. Maybe a service is not a bad idea, per James Tamplin (Suspect he is Firebase dev)

like image 631
Chad Bingham Avatar asked Nov 08 '14 17:11

Chad Bingham


People also ask

What are the downsides of Firebase?

The cons of Firebase One of the main problems with it, is limited querying capabilities. Realtime database provides no way to filter capabilities, because the whole DB is a huge JSON file, which makes it pretty difficult to make complex queries.

Do professionals use Firebase?

Google Firebase is one of the most popular frameworks employed by professional developers and companies to build high-quality applications. Many companies and developers rely on it because of its seamless database management, cloud storage, and testing services.

Should I use Firebase as a backend?

If you need to achieve a proof of concept with minimal resources, then Firebase is a good choice because it's free for a number of users and is preferable for the beginning. You may control the system and make changes while adapting the market, and later it may be easily converted into a customized backend.

Should you use Firebase?

Firebase is a good choice if you want to deploy a working product on the cloud rapidly. Plus, as mentioned, you might want to try it out if you need a backend but don't have a backend development background.


1 Answers

You probably want to use GCM in these situations.

Firebase works fine from a background service, but it leaves a socket open, so it's going to use quite a bit of power. This power usage is fine when a user is actively engaged with your app (the screen probably uses a lot more), but when it's running in the background, it's going to be hard on battery life.

In most cases, when your user isn't actively engaged, they're willing to accept slower response times, and push services like GCM are a better value in watts per user happiness.

Also, Firebase is working on adding triggers, as demonstrated in this video from Google Cloud Platform Live, that will make it a lot easier to integrate with push services like GCM in the future.

And I guess you could say James is a Firebase dev. He's one of the co-founders :)

like image 187
mimming Avatar answered Oct 14 '22 13:10

mimming