Android Question Firebase?

techknight

Well-Known Member
Licensed User
Longtime User
I am looking into firebase as a way to keep real time data streaming because its a CDN as well as a database.

Problem is, I cant find anything out there that supports it for B4A or B4I.

There is a java library, and an ios obj-C library for firebase, but unsure as to how to make it work on B4X?

any ideas?
 

techknight

Well-Known Member
Licensed User
Longtime User
live scoring. and the userbase down the road could be massive. multiple scorekeepers, multiple viewers. Text data.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
The man in the middle approach wont work as required with RDC. Your tutorial requires a "PC" running a server program that creates the link if I understand it correctly. This is unfortunate because I could have up to 1000 devices in the field and each and every person would have to run a server? And if I setup a server that allows 1000 devices to connect to it, well, itll probably choke out. And if I had to do that, I would end up using my own database instead of firebase anyway. The whole point of me using firebase, its backed by google, has tons of bandwidth and power, and its a real-time CDN by allowing node.js connections. I personally dont have any experience with firebase, but I know people who do and from what I saw with my own eyes, its awesome!

I am trying to create a world-wide live score sports broadcasting network that supports our scoreboards. I know there are products out there that already do this so it sounds like I am re-inventing the wheel here, and in some ways I am. However my implementation is going to be slightly different than the other apps on the Play/App store.

The official firebase API library for java is out there. But it would be awesome if someone created a library/wrapper for it. I was reading the thread on wrapper-less java libraries but alot of it went over my head.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

KMatle

Expert
Licensed User
Longtime User
I have running GCM solution. Will port it to Firebase the next weeks -> be patient, it's summer :) and post a tutorial. Like everytime I prefer php instead of RDC.

The solution could be:

- device/user has to choose the scores/teams he's interested in
- the chosen content is handled in a database (like in FB someone is "following" a person or here a thread)
- if new content is created which the device/user follows, via Firebase the device gets a message
- to get the content
- display the message (like "Real Madrid scored against Bayern München 2:1")
- a simple httpjob is started to get the content (like a new scoreboard)



Benefits:

- you can use Google servers for the messages an another to do the db stuff
- all devices just register and wait for messages (Google - for free)
- no messages = no database/server load :)
- you can handle it (like 100 devices get messages per second)
- so the server/db will not crash
- you can use b4j to handle it (if you are able to run it on the server - otherwise just use php)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top