Skip to content

Infrastructure

Adam Chao edited this page May 31, 2021 · 4 revisions

Overview

okmeme will need a database of some sort, a way to authenticate users, and content delivery.

Database

Draft: preferably some sort of relational database.

Proposed strategies:

  • Not sure - needs key-value but also support relations between objects - eg. posts by user, posts to tag, posts visible to x tier, etc.
  • Supabase? Free tier is pretty good for use

Authentication

Draft: needs to authenticate with standard providers but also keep track of which users are at which tier for displaying posts

Proposed strategies:

  • Firebase auth?

Content delivery

Draft: Content delivery consists of two parts: the actual data, and the viewport

Data API

Draft: Data should be served from an API that can be authenticated against and return values for display in your specified View (web browser, others)

Proposed strategies:

  • Unsure, but JSON would be a good format for output

Viewport

Draft: View can either be web based (React frontend) or mobile (Native/React Native) or other (client parses raw API) but should query the data API and display content as requested

Proposed strategies:

  • React (for web)
  • React Native (for mobile)

Scaling

Draft: Need to account for any number of users while keeping cost down. Utilize some sort of caching mechanism to help with this.

Proposed strategies:

  • CDN cache for unauthenticated users, less aggressive cache for authenticated users (reason: the number of authenticated users should be much lower than the public)

Wishlist

  • Address any unsure items
  • Bandwidth considerations: lots of read/writes are going to rack up in costs. Is there a way to reduce this? Consider that authentication and actual data can live in different places, and have different read/write rates.