Skip to content

Drop firebase in favor of always alive postgres instance + some sort of middleware for querying #20

@evamaxfield

Description

@evamaxfield

Idea / Feature

Replace Firebase Cloud Firestore with a Postgres instance. (and Firebase Storage with just a Google Storage bucket)

Use Case / User Story

  1. Firebase has given us a ton of problems in automated deployment / cookiecutter deploy, replacing it with something else that we can entirely control and manage would be easier.
  2. Document Storage has generally worse query performance than Relational storage and there is no join functionality. This affects our query performance drastically.
  3. Directly from data user: document storage is just not what I think about when I think of a dataset.

Solution

In general, switch to some Relation storage database (Postgres preferred just because of how tested and trusted it is). File storage can be done using a basic google bucket.

I have seen promise with supabase: https://github.com/supabase/supabase
it is entirely open source, it has a beautiful API for access data, and bills itself as a the relational database equivalent of firebase but ya know. everything in it's tech stack is open.

it is even open enough that we can just use their docker images and self host: https://supabase.io/docs/guides/hosting/overview

Alternatives

much like the problems with firebase, I am not sure how customizable supabase is. or if we should even use it.

an alternative is just to run everything ourselves. but it seems like all of the docker images and tools that supabase has decided to use make a lot of sense.

Stakeholders

@isaacna @tohuynh

Major Components

these are rough steps

  • experiment with different frameworks, libraries, etc.
  • decide on frameworks, libraries, etc. as team
  • show example working API in Python + JS and storage components (with setup in infra-as-code)
    • make build should setup some container somewhere on GCP with database and ports are exposed and public read set for example
    • make add-test-data should simply add some fake values to the newly created infra
    • show in Python + JS that we can easily fetch data
  • come up with rollout and migration strategy
  • migrate

Dependencies

Other Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureBuild, upgrade, or remove, a piece of infrastructure or core utilityproposalA detailed proposal / spec for a CDP feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions