Skip to content

Edge-db usecase #133

@tarasglek

Description

@tarasglek

I was thinking about databases suitable for edge runtimes like Deno, cloudflare workers. The biggest problem there is any sort of database access completely negates benefits of edge compute.

Projects like turso offer in-memory replication, but that doesn't work with short duration of edge handlers.

I think append-only parquet in style of edge-db is actually the best solution because:

  1. Can use webcache or other cache apis to bring relevant subsets of data to worker https://deno.com/blog/deploy-cache-api
  2. icedb log avoids s3 list operations
  3. icedb log can also be cached locally if one uses something like nats to publish writes, then broadcast log changes

So even though columnar isn't the best format for small reads like (is user logged in), the fact that it can run in-memory in-process on local data, completely makes up for it. One also gets mad read scalability, cost, etc.

The only way to get higher performance is to use a proper read-replica OLAP type architecture, which is gonna be operationally way more complex.

One can push this notion of edge all the way down the webpage JS(and web cache api there) to provide a competitive solution to dexie-style react hooks via https://github.com/danthegoodman1/frontlink type stuff.

I think one merely needs to integrate icedb s3-proxy with nats-sub directly into a duckdb extension to enable this.

PS. been following icedb for a while, awesome work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions