April 23, 2019

Ask IH: Do you have a BaaS in your SaaS?

Do you have any app in production and are you using BaaS? Would you do it again? Why / Why not?

(BaaS = back-end as a service)

  1. 6

    Indie Hackers uses Firebase, which handles authentication among other things. We also use Render, which lets us write cron jobs in the cloud.

    Why? Because it's easy! Less time spent coding basics means more time doing things that matter.

    1. 2

      Thanks for your answer! Would you do it again? I mean yes you save time, but the indiehackers website is kind of slow. Did you need to find a lot of workarounds with firebase? Were technical things not possible. I have the fear, that if I use firebase, i won't have a "clean" architecture.

      1. 2

        Using BaaS isn't why sites are slow, or at least it's not why IH is slow. It's slow because I'm a solo developer who built a site for a tiny niche of people that's become hundreds of times bigger than I ever imagined, and I rarely have the time to go through and fix all the performance inefficiencies. But there's nothing particularly different between Firebase and, say, a PostgreSQL database. You can make any website fast or slow.

        1. 2

          Are there any tools to help alleviate the inherent slowness introduced by the intermediate steps of a BaaS? Unless a page request returns the direct html representation of the post and its comments, it has to be inherently slower. When you have to deliver js files, run the code, request data from Firebase's servers, and finally render it, it explains why it takes about 2-3 seconds to see any hint of the intended content. I imagine that such slowness damages Google's ranking of the site quite nicely.

          But anyways, thank you for giving us IndieHackers, even if it's not the utmost best it could be :)

          1. 0

            That's not due to using a BaaS like Firebase. I could, if I wanted, set up an Express/Rails/Django/Laravel/etc app that plugs into Firebase for auth and the database on the back-end, but sends an HTML response with the final rendered page.

            Rather, it's due to IH being a single-page app using Ember.js. The downside is that the initial page load is slow, but the upside is that subsequent page loads are fast. Gmail is similar, as is Facebook, Asana, Trello, etc.

            I could speed up the initial page load in numerous ways. Authenticating with Firebase is actually pretty quick. The slow part is loading data from Firebase. For example, if you visit the about page in your browser, it loads pretty quickly, because it doesn't need to ping Firebase for very much. The homepage, on the other hand, has to load a ton of data from Firebase. But that doesn't mean it has to be slow. I need to improve the efficiency of those queries, which is actually something I'm working on right now. If they were more efficient, the homepage could load much faster.

            1. 1

              the upside is that subsequent page loads are fast

              But they're not. I still get that long slow loading page, even just when clicking to a profile page.

              Edit: and I just got the slow load + random quote both when clicking your link to the about page and again when hitting the back button to return and edit this comment.

        2. 2

          Have you considered open-sourcing it so that we can help fix and improve it?

          1. 1

            That would take a lot of work, unfortunately. DEV.to did this recently and I think it took their team 6 months or something just to open source things, plus dedicate staff moving forward to review pull requests and manage the open-source community.

            1. 2

              Why does it take that long and so many resources? Is there any other thing to do other than push the code to public repo?

        3. 1

          Okay, thank you very much for your time!

    2. 1

      Likewise at tinyteams

    3. 1

      This comment was deleted 6 months ago.

      1. 1

        No, that's likely just a bunch of inefficient queries running + a ton of JS and CSS being downloaded.

  2. 1

    I m moving to AWS Gateway, Cognito, DynamoDB, Lambda which I think you can call a type of modular BaaS, FaaS, from currently using EC2 (IaaS).

  3. 1

    I personally haven't tried it. But it seems to work well for those who use it. @dinuka uses Firebase a lot afaik

  4. 1

    DesignerRecon uses Firebase!