• @adam-tegen signed up for this forum just to reply to this post. I'm also interested. I started working on a basic forum powered by firebase services.

    Got me thinking, what if I could write an adapter or fork nodebb to work with firebase and firestore to handle authentication and storage. https://github.com/NazimHAli/firebase-forum

  • GNU/Linux Admin

    @justmeow If Firestore is document-based like Mongo, it is definitely possible. We even have a Postgres adapter which goes to show that even SQL databases can be used with NodeBB.

    Best of luck on your project! Although personally I'd always make the argument that a Firestore adapter for NodeBB would be more helpful than building out an entire forum on your own 😬


  • @julian yup, I definitely agree! It's why I started searching for a way to integrate NodeBB with Firestore. I bought a domain + server last night and deployed NodeBB so I can learn and play around with it. Based on the example DB adapter PR posted above, I think it's doable.


  • Started a draft PR in case anyone else can/wants to help work on it https://github.com/NodeBB/NodeBB/pull/10051


  • @justmeow one thing I've learned recently about Firestore read/writes count - they're liberally counting everything as an operation, even if it's implicit.

    I've been creating data bundles to help mitigate some of this, but I don't know anymore. Not feeling confident about wanting to continue using Firebase in general.

    Did some research and noticed others are running into similar situations while using other Firebase functionality: https://www.reddit.com/r/Firebase/comments/p0rweb/how_is_my_storage_usage_so_high/

    Personal experience: while developing locally and only using Firebase Firestore + Authentication, I hit the 50% free quota quickly. So I switched to the emulator for local development, but the compound calculations for using their services is concerning.

    Edit for more context, here's a DB request count for a forum that has zero users which I'm setting up and have been experimenting with for a few days:

    • Number of Requests 186,922
  • GNU/Linux Admin

    @justmeow wow! Those are some surprising numbers.

    I suppose when you develop with the mindset that you have unlimited access to a local database, you don't really think of things like quotas on operations.

    What about the first paid tier... Would running a forum on firestore be completely out of the question?


  • @julian sorry for the late response, I didn't think to check this again. Firestore offers ways to reduce the cost and total number of operations, but there are a few caveats. Here's their recommended optimization solution https://firebase.googleblog.com/2021/04/firestore-supports-data-bundles.html

    Data bundles just means exporting data to a json format, store it in a cache, and serve the data from the cache. This does reduce the number of operations, but defeats the purpose of firestore.

    You'll have to handle the authentication process and can imagine the problem. I'd much rather pay for a database, FYI already did.

    Firestore offers other methods to optimize usage like subscriptions, compound queries...etc. After taking all of this into account, firestore became extremely unattractive.

    To your question about the next tier, I'll need to take a look, but my gut feeling tells me that this isn't sustainable for large scale.

  • GNU/Linux Admin

    @justmeow Yeah I guess that's the new thing, isn't it... use these fantastic dev-friendly services that get you from 0 to 💯 in no time flat, and then when you launch, you get hit with the bill 😬


  • Just reviving this thread, because I'm curious about what aspect of the Firestore pricing/costs makes it non-viable for hosting nodeBB ??

    Given that IO requests are priced at around 10 cents (avg) per 100,000 requests - is it because nodeBB requires thousands of datastore IO requests per page view? Why is that? Is it fairly, datastore heavy in terms of how it builds a page for each user?

  • GNU/Linux Admin

    @gslender I didn't play around with Firestore myself, but the bulk of @justmeow's reasoning was in this post


Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.