3 ms·
> Server-less doesn't mean pricing-less Well of course not, although that would be wonderful. > Your can't perform operations to get active users Something l
by welanes 10y ago
> Server-less doesn't mean pricing-less
Well of course not, although that would be wonderful.
> Your can't perform operations to get active users
Something like this would do it, right:
var refUserOnline= db.ref('/.info/connected');
refUserOnline.on('value', function(snapshot) {
if (snapshot.val()) {
var sessionRef = refUserSessions.push();
sessionRef.child('began').set(firebase.database.ServerValue.TIMESTAMP); // set UUID too
sessionRef.child('began').onDisconnect().remove();
}
});
> Paying 100$ per month for something you can do on a 5$ DigitalOcean server is something that make you thinking twice about server-less magic-less.
I pay Firebase a handful of dollars every month and they handle user auth, hosting, CDN and data. Three or four overheads I no longer need to worry about. Having used Digitalocean and Stormpath (yikes) in the past, I'm happy to have my eggs in one rather than multiple baskets.
Yeah it cost me a few hours on Stackoverflow after bumping into some of the problems you describe but the path from idea to working app is so short with Firebase - and the cognitive load typically inherent with managing multiple services, so small - that it's worth learning the 'Firebase way' of dealing with data (which is mostly just the NoSQL way).
Crisp is sweet btw, I use it daily. Good job.
- azinman2 10y agoNot to mention security, backups, upgrading all the software used, supporting new technologies as they're made avail, sdks across many platforms, etc. the $5/mo hides the true costs of development and ops
- baptistejamin 10y agoThe example about active users was more about KPIs, and not connected users. You can't perform a map/reduce operation.