Firebase

Firebase is Google's suite of tools for building realtime application. We use it for data storage, file storage, API hosting, some webpage hosting, and auth

Proxy Flow

Certs

First install mkcert

# MacOS
brew install mkcert
# Windows
scoop install mkcert

Then install it on your browser (run this on the Windows side for a wsl setup)

mkcert -install

Then generate certs, which get installed and ready for your browser to use

mkcert localhost

Move them to illust-marketplace/certificates/localhost.pem and illust-marketplace/certificates/localhost-key.pem

Batch processing

Firestore has a Batch class that lets you do multiple updates in a single batch, and have those transactions fail together if one fails. However, it has a hard limit of 500 transactions per batch. If you need to process more that 500 items in a batch (for instance in a data migration), you can use the MultiBatch class (there's also one for the frontend). MulitBatch has the same API as Batch, but will submit as many transactions as you want in batches of 500.

Note though that if a transaction in the second batch fails, the first batch will still have gone through.

Last updated