SQLedge uses Postgres logical replication to stream the changes in a source Postgres database to a SQLite database that can run on the edge. SQLedge serves reads from its local SQLite database, and forwards writes to the upstream Postgres server that it’s replicating from.

This lets you run your apps on the edge, and have local, fast, and eventually consistent access to your data.

Should be much faster for reads than hitting the full PSQL DB, but lacks features like aggregation and triggers. Wonder if this could be incorporated into Lemmy for any benefit.

  • dark_stang@beehaw.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    11 months ago

    Sqlite can be super useful for client side caching, searching and filtering. But this would require having you’re postgres database exposed to your end users. That would be a huge security mistake unless your users are all internal and trustworthy. Definitely retrieve data over an API instead.