Skip to content

Workspace storage in a Durable Object #14

Description

@hammadmajid

Part of #3

Question

Prototype a Durable Object per workspace, with its SQLite storage as that workspace's database through Drizzle, and decide whether it is the storage model.

  • One object class, id derived from the workspace id, Drizzle schema and migrations applied at object start.
  • One table from the schema docs (project is a good first) written and read through the object, from a route on the server.
  • The object's shape leaves room for WebSocket hibernation later, without implementing it.
  • Integration tests inside the Vitest pool with real objects, meeting the speed bar.
  • If it holds: record the storage model as an ADR and note what changes in the db conventions. If it fails on Drizzle, limits, or test speed: fall back to one shared D1 with workspace_id, record that instead, and say what failed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions