[plugin] firebase

Post your completed addons to share with the community

Post » Sun Jan 11, 2015 7:37 am

Update

Add rex_parse_leaderboard plugin, leaderboard feature in parse server.

rex_firebase_leaderboard is good at showing top N ranks in real-time.
rex_parse_leaderboard is good at showing ranks in pages.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Tue Jan 20, 2015 9:23 am

Here is another demo.
- Lolgin with facebook account.
- User could try to create a new room by enter room name at right-down text box and click "create" button.
- Or user could join existed room by click the room name at right list.
- After join a room, drag a ball from right red/green/blue box. Click gray box to remove all balls. All users in the same room could see and drag these balls in the room.
- The room will be kept after all users had left, included balls.
- Input message at down text box and press enter to broadcast message.


The document of "rex_firebase_room" plugin had not be wrote yet.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Mon Feb 02, 2015 5:06 am

Another demo
- Enter display name at top text box, then click a character at bottom 5 characters to enter map.
- press arrow-key to move left/right/top/down, or dragging left/right/top/down to move.
- Online players will be shown at bottom with name and current position.

Document of related plugins-
rex_firebase_itemtable, rex_firebase_itemmonitor
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Tue Feb 03, 2015 3:15 am

@Kyatric

Please move this thread to "Completed Addons" section. You might rename it to rex_firebase" in the plugins list, because that there already had another firebase plugin.
I still trt to add new related plugins in to this thread.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Tue Feb 03, 2015 4:43 am

Moved and added.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Tue Feb 03, 2015 4:46 am

@Kyatric

Thanks a lot. Finally it could turn to "Completed Addons".
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Wed Feb 04, 2015 5:37 am

Update:

rex_firebase plugin, for duplicated action number. It will pop a error message in r196.2
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Fri Feb 06, 2015 9:54 pm

After looking at the differences between Firebase and Parse, it seems Parse offers a better package at the free level.

While Parse offers 30 calls per second, Firebase offers 50 simultaneous connections, both at the free level. Assuming they scale comparatively in their paid tiers, I believe Parse is best suited for making apps intended for "the masses," so long as the purpose of the app is not to synchronize every user at all times.

The benefit of Firebase, based on my impression so far, is to keep a small group of active users synchronized in real time. Scaling an app on this model to thousands of users or more would be expensive. While Firebase has the advantage of more 3rd party sign up options, the strength of Parse is the high bandwidth even at the free level, a big help for new apps and app developers.

However, In trying to take advantage of both worlds, how about using Parse as the cloud database (a $9 C2 plugin), and using C2's multiplayer plugin as a substitute for Firebase?

C2's multiplayer plugin has the advantage of allowing you to create "rooms" of users. If you're creating a chat app, for example, the size of the room could go up to as high as fifty. Once a size of 50 is reached, new users would be ushered into a new room, with a new host. The scalability of this approach has no real limit except for how fast C2's server can assign new rooms, and each additional room of 50 users is analogous to a new Firebase account. Since C2's MP plugin creates a direct connection between devices, there is no limit to the number of 50-user rooms C2's multiplayer server or the app can create.

This adds a little extra work upfront for a C2 app developer, but does not inherently risk their app from being overburdened with too many simultaneous users.

Subsequently, any data that is synced with Parse is contained to the app using it, but not limited to the room of 50 users that created the data. In this way, the database is not divided into different "accounts", as would be the case with multiple free Firebase accounts versus one very expensive account.

Simultaneously, Parse resources do not have to be pushed to the limits either. The designated host of the app using the multiplayer plugin can be set to be the only one syncing data with Parse, and sync as sparingly as is practical for the app. That way, more data can be sent per sync less frequently. Syncing non-host users with Parse while they are in the room may not be necessary, because they can sync with Parse at any other time, and their data will be waiting for them.

As a bonus to the app's developer (us), we will have gained not one but two extremely valuable skills: cloud storage (user to cloud data transfer); and multiplayer (user to user). The second skill alone will be a significant "player" in data security, because it will allow customers using our apps to connect directly with their peers if they are less trusting of "cloud" data management. The multiplayer plugin transfers data user-to-user directly. Having sensitive data not even pass through your app's "data server" (which the multiplayer plugin doesn't need), nor through Parse, would be a powerful selling feature of such an app. And what does this feature cost you to implement, scale AND maintain?

Almost nothing.
B
17
S
2
Posts: 88
Reputation: 1,503

Post » Sat Feb 07, 2015 12:38 am

@hmott

Yes, Firebase is good at real-time sync, parse is good at query data.
In my one test, I combined them to create a message board,
- using firebase to broadcast "new post",
- if user wants to read some older posts, using parse to display older posts by some conditions.

Official MP is another kind of multi-player plugin, it has lower response latency to be more real-time than firebase.
Since parse could not sync data, only firebase and official MP need to be compared.
Here is an example to show the different between firebase and official MP: firebase could send message to each user, or broadcast to some/all of users in real-time, but official MP could not (unless put all users in a room)
Another case, if there are 50 users in a room, they are all connect to a host using officail MP plugin.
1. all data will be broadcast through the host (user), and
2. room will be destroyed if the host (user) had left,

Firebase had different behaviors in these two points.
1. all users connect to firebase server, not one of user. So the scaling of using firebase is better then official MP in this case.
2. users could stay in the room in firebase server, even host user had left.... wait, there is no "host user" in this case. So the behavior of firebase will be more suitable for a mmo-like game.

To solve these problem in offical MP plugin, designer could make a big, always running host for all players. In this solution, the hardware cost might not be ignored since the big host needs put on a dedicated server. And any user will receive status of all other users, it will become another problem.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Sat Feb 07, 2015 8:36 am

@rexrainbow

Good points. I didn't mention before that substituting firebase for mp plugin would have strings attached. And there would have to be designs in place for handling the loss of the host if using mp instead of firebase.

It would ultimately come down to the app in question. If it requires fifty users to be in sync in real time with the highest reliability, then firebase is the optimum choice. It's what happens when user 51 tries to connect that first made me start to compare the costs and benefits of substituting firebase for mp.

As I understand it, using firebase would require the app owner to upgrade the plan and pay. Going with the mp plugin, however, would introduce the risks of latency and the host disconnecting. The advantage would then be that the user would eventually connect even if the connection is not as fast as firebase. But, if I'm right about this, they would not successfully connect to the app only because someone else has left.

Will I use firebase at all? With its faster speed I would consider it as a premium upgrade to cover the cost. If the app user is fine with that, then I am too.

Also, I would only be able to include firebase in my app because you made the plugin. So thank you for making it.
B
17
S
2
Posts: 88
Reputation: 1,503

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests