Firebase Leaves Beta Today
firebase.com
firebase.com
I've been good friends with these guys for a while, and I'm impressed with how well they've done, how much people seem to love the service, and just the general quality they instill in what they do. Congratulations guys, it's been awesome watching you get to here.
Can't wait!
Personally, I have been trying to determine if I should buy or build a new mobile game backend that has an average of 50-250K iPhone app downloads/month. I'm adding online multiplayer to an otherwise single-player game.
I've looked at Firebase and a number of other offerings include Exit Games' Photon Cloud. Firebase had seemed to be expensive for my use case of ~ 400K MAU. However, Firebase's experience of 1 CCU = ~ 1400 MAU [1] would be easily supported under the "Candle" or "Bonfire" tiers which are not expensive.
Exit Games' has a different experience [2] but I'm probably comparing apples to oranges a bit. Games vs Big Brother. Well, there is Roll20 so maybe it's at least comparable experiences.
1 CCU = 1400 MAU vs 1 CCU = 20 MAU
That's a big difference. Am I thinking about this strangely?
[1] "In our experience, 1 concurrent corresponds to roughly 1,400 monthly visits." https://www.firebase.com/pricing.html#pricing-faq
[2] "To calculate monthly active users (MAU) we assume a CCU to translate into 10 daily active users (DAU) and each of these into 20 MAU" https://cloud.exitgames.com/Pricing
Source: Been using Firebase beta as a developer for 2 months
For example, World of warcraft peaked at ~10% of their users online at any one point recently: http://venturebeat.com/2012/11/07/wow-pandaria-1-million-con...
Also note that we bill at the 95th percentile, not peak usage, so you can spike well above those numbers without consequence.
If you want to know how many concurrent users you'll need, sign up, drop in our script, and have your clients connect to Firebase (but do nothing). You'll be able to see concurrent user counts under Analytics in Forge.
I like your idea of just adding Firebase and testing the waters. Alas, the next version of my app is a rewrite to Unity3D and there is no Firebase client for Unity3D (yet?) so this amounts to just feeling things out.
Something as simple as preventing people from just manually setting their own score on a leaderboard seems to be impossible. I would be very happy to be proven wrong though.
There's a screencast on our website that explains how this works here: https://www.firebase.com/docs/security-quickstart.html
It turns out this is an issue with any game that runs on the client though -- regardless of if you're using Firebase or not. Preventing cheating is tough because at some step in the process here you're relying on the client to tell the server the truth. Since the game runs on the client, you can't ensure that the code hasn't been tampered with, or that an AI isn't playing the game, or that the user hasn't cheated is some other way.
With Firebase security rules, you can enforce that only that user can set the score, and you can enforce that the score is of a valid format, but fundamentally there's no way to ensure that the score is "real".
afaict (would loved to be proven wrong here) Firebase gives you basic protection but any script kiddie will still be able to defeat it.
Edit: grammar
Ie most multiplayer games ship the same physics code on client and server, but the server is the authority.
That kind of game is clearly impossible with Firebase, but depending on the expressiveness of the validations, there might be ways to prevent cheating.
allow update of y_pos IF jump.pressed
AND not jump.wasPressed
AND new.y_pos - old.y_pos < 3
AND old.was_on_top_of geospatial( world_geometry, entities)
AND new.not_inside geospatial( world_geometry, entities)Apparently you can get the actual data being used when writing the rules expression by using the `val` function[0] on the `data` variable[1]. However, your docs called the rules expression "Javascript-like"[2] which makes me wonder what limitations exist on the expression syntax. Since I can call `val` to get the primitive value, can I use Javascript functions/properties on those primitives like `length` on arrays?
Here's a use case, given an object that looks like
{ name: "Adam", family: { spouse: "Eve", children: [...]}}
Will the following expression work to limit changing the name of the spouse if there are more than 1 element in the children collection: "$spouse": {.write: data.child("family").val().children.length < 2}
Not quite sure if you can write a rule for a property within an object but if the above works, then the rules system is pretty damn awesome :)[0] https://www.firebase.com/docs/security/rulesdatasnapshot/val...
[1] https://www.firebase.com/docs/security-quickstart.html Ctrl+F "We use the "data variable"
[2] https://www.firebase.com/docs/security-quickstart.html Ctrl+F "We use the "Javascript-like"
Without much/any javascript/web experience I was able to take their existing twitter-clone implementation and transform it into a flood relief application http://highriver.abfloods.ca/
It never really got the traffic that I had hoped, but the whole development process went very well and I got the support from them that I needed. Thank you! I'm looking forward to their upcoming developments.
(Or if anyone has links to similar discussions around scaling strategies in a messaging-heavy distributed architecture, that would be great as well!)
The only feature I wish that firebase would have is the ability to detect when the last person has left the connection. Currently, the only way to accomplish this is with their nodeJS module.
We're working hard in regards to adding more powerful query support to Firebase though and would love your feedback so we can improve the API (just email support@firebase.com).
1. How does it work with non-only web stuff such as background workers, C, Python software, etc.
2. What about the hosting for html/css/js?
Here's a real world example:
I've got a python software that scrape an uploaded PDF for patients data and then create a kind of todo list for doctors/nurses/students. That todo list is accessible from the web - more specifically from a mobile browser. The front-end was hacked using html/css/js (angular).
I really wanted to use Firebase but struggled about the 1) and 2). It seems that the solution is to use a VPS to host a node.js back-end, but rather than using mongo it should use the firebase database through their node API, amicorrect?
For some reasons, when I thought about using firebase, I expected it to host the html/css/js files and provide the background jobs. Why can't I just have a some_task.js and call it from my js code using firebase API? I.e.
Firebase.async('some_background_function', function (result) { .. } );
Same for hosting.. I thought of firebase more like a one-stop shop.As you can see, I might be a bit lost so please feel free to point where I'm wrong!! : )
This tale of internet surveillance is not an abstract stories with bad and good guys, it has happened through the sum of all our own practices, the way in which we have built web services, and the dependencies we construct. Lets take that into account into our daily lives as developers ( /rant )
They are synchronizing your data so it's all going through their servers.
I think it's a great idea, unfortunately I won't be using it.
I really don't understand why anyone would be willing to use something like this for anything beyond a toy website. I would be very wary of using a closed source commercial database for any core infrastructure, I can't imagine a scenario where I would be willing to use any kind of 'highly proprietary database as a service'. It's vendor lock of the worst kind.
Firebase makes it possible to make a fully-featured and complex website with pure HTML/CSS/JS and no big backend crap (looks at PHP/MySQL)
However, if you are doing anything serious or valuable or even moderately complex, locking into a single vendor like this is a bad decision. You can go along fine, but sooner or later you will need to do something that is just not possible inside of the proprietary system. At that point, you are either going to have to jump ship and reimplement features (introducing regressions and wasting development time), or try to convince the vendor to make changes to enable you, or give up. You are handing over a lot of power to someone and in exchange paying them a lot of money. I'm not saying it's never a good decision, I'm saying if there were something my company depended on to function, I would think very hard before I chose a solution that permanently locked me into a single vendor.
I think this is a great product - if I am building a site, I want to concentrate on building features for that without first building technical bleeding-edge interaction from the ground up.
Sooner or later I may want to do something with this that isn't possible in the proprietary system, yes (although that's not guaranteed at the starting point).
If I get to that point with traction and money to invest, I probably would do exactly what you suggest, i.e. build a bespoke solution.
And, in that case, since the Firebase system acts as a modular component, refactoring this solution might even be a better option than refactoring a messy roll-your-own solution.
If you're worried about lock-in, I'd first try Firebase along with our AngularJS[1] or Backbone[2] bindings. You don't have to change the way you write your app and can switch Firebase our for another backend easily. We recognize that we're only going to win a developer's trust by building a reliable service with the best tools and fair pricing -- so this is what we're going to do
I'd love to dispel any concerns, please feel free to email me anytime (james at firebase)
I can at least tell you what would dispel my concerns:
1. Some kind of death-rattle clause. If your company doesn't make it or shuts down this service, all the code necessary to set up the service would be released under a permissive license, something like that.
2. The ability, even if it had a high cost ($100k a year or something crazy), to license the source to the engine that powers Firebase and deploy a modified version (obviously just for our own use).
I think those two things would mean that if I were making decisions on the technical direction of a company or large project, I wouldn't feel like Firebase might suddenly cause a major disruption in the future. At least if there were a major incident or insurmountable problem with the service, we could bring it in house and proceed without having to go back and re-engineer all the previous work.
Anyway, I'm intrigued about the idea around Firefbase for allowing people to quickly start executing on their ideas and focus on what seems to matter a lot these days, the front-end.
I'm also appreciative of the AngularJS bindings....will definitely make me check this out...
To answer your questions:
1. We put our code in escrow for very large customers. We are thinking about the best way to address the concerns of everyone else. Stay tuned.
2. This is coming. It'll be a little while.
Thanks again for your comments. Criticism helps us figure out where we need to improve.
Such a shitty attitude. I give the guy from firebase who replied to you credit for not being snarky when your comment started with that ignorance.
If not, then it is arbitrary, and acting like it is a milestone is purely a PR move, an attempt to make noise and create interest without any substantive event which would justify calling renewed attention to the thing, all for personal financial gain.
In other words, it is an attempt to manipulate people for money.
I'm all for manipulating people to make money, but I hardly think you can fault me for pointing it out.