Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo instance hit Firebase quota #68

Open
zezic opened this issue Jan 21, 2018 · 7 comments
Open

Demo instance hit Firebase quota #68

zezic opened this issue Jan 21, 2018 · 7 comments
Labels

Comments

@zezic
Copy link

zezic commented Jan 21, 2018

Sadly, I see messages about Firebase quota on http://jspaint.ml instance. Can we have any workaround features for keep multiuser working? Maybe, feature to enter own Firebase credentials for small session with friends? Or RTCDataChannel solution?

@1j01
Copy link
Owner

1j01 commented Jan 22, 2018

Yeah, so RTCDataChannel would be an interesting way to do things, but it would basically be a full rewrite of the multi-user code. (Not necessarily a bad thing, but not high priority, for sure.)

Entering credentials to an arbitrary Firebase instance sounds like a good short term solution.
It might be a little awkward, since Firebase is normally set up once early on, but it should be doable.
Should make sure it's not against the TOS tho. (...doesn't look like it)

I would say, the most pertinent thing is to get some error handling in there for the case of hitting the quota limits. Although the console only logs a warning, which is worrying - hopefully there's a way to handle it!
(...there's storage/quota_exceeded listed as an error code in their docs. maybe I'm just not handling an error.. or.. if I recall, their API kinda doesn't encourage you to do error handling at all)
(...nope, that was the wrong page. that was for Storage, not the Database - confusing! and the search gives no similar page for handling errors for the Database.)

@1j01
Copy link
Owner

1j01 commented Jan 22, 2018

It looks like they added error handling in a later version, but also the later version makes this particular use case uglier - "awkward" as I was saying. Apparently jspaint is on an older version of the API, (which makes sense; it's an old project), in which it wouldn't be so ugly. So in other words, it would be less ugly in the current, older version, but there's no error handling support. Tisk, tisk. Best to get it over with though, rather than creating a reason not to upgrade.
I didn't notice I was using a wrapper. Fooled by my own abstraction.

@1j01
Copy link
Owner

1j01 commented Jan 22, 2018

Any issue is more interesting with an image :)

"Your database has been disabled due to exceeding your downloads limit — upgrade to ensure there is no service disruption"; 404.9 GB / 10 GB

"404.9 GB / 10 GB"

@1j01
Copy link
Owner

1j01 commented Jan 22, 2018

Added a visible message at least, in 1ca9cc3
I can't seem to find any docs on error handling though, so it's just displayed regardless 😣

@Mycah
Copy link

Mycah commented Jan 23, 2018

Can you split off the firebase config to a config file, so we don't have to branch or merge when changes occur?

@1j01
Copy link
Owner

1j01 commented Jan 23, 2018

@Mycah As far as I know, not without switching away from GitHub Pages (assuming you mean keeping it outside of version control)

But I could do what @zezic suggested and allow you to enter your own Firebase credentials at runtime,
and we could even persist them. We'd just have to hope Google/Firebase doesn't go "hey, what's going on here? what's with all these apps pointing to the same domain?"

..well, I guess if you're cloning it locally, we could have the default Firebase config, and then a separate one that overrides it that you create, and then you can set up Firebase for running on localhost
..so yeah, we could do something like that

keep in mind though, that the multi-user support was pretty garbage

@1j01
Copy link
Owner

1j01 commented Feb 3, 2018

Oh hey... *psst* there's more quota now (start of the month)

@1j01 1j01 added the question label Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants