Skip to content

Import and export #79

@dman-os

Description

@dman-os

I have need of a separate batch sync system and I'd like to wire this over samod. Samod doesn't currently provide means of importing a document with a pre-existing id or being able to export/.save() a doc without needing to spin up an actor.

At first glance, they both seem easy enough. Just add an optional field in the CreateDocument path for import and do handle.with_document(|doc| doc.save()) for export.

But there are some concerns:

  • Bulk export using with_document is very very slow. Essentially 30 docs per second.
  • Doc actors are multipurpose. I don't have numbers here but I'm worried how much unneeded work these throwaway actors would do if there are any peers online.
  • What should be the behavior if two peers import completely different histories for the same id?

There's a vibe coded PR that implements import and lays the groundwork for more improvements at dman-os#2. If it looks good to you, I can move the PR to this repo.

Another one for exports and existence checks at dman-os#4.

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