Skip to content

Add withConnection function to hnix-store-remote #280

Open
@squalus

Description

Writing an application that connects to several different Nix stores concurrently (with the number variable at runtime) is quite awkward. It would require either:

  1. Create a monad transformer that can store a runtime-variable list of monads and allow the application to access an element by index
  2. Put each RemoteStore monad in a different thread and communicate to it over STM.

It seems that monadic sequencing is not strictly necessary to model the remote store functions. It could be accomplished with a withConnection function, and that would make it much easier to write the application that I described. I'm open to other suggestions. Perhaps there's an alternative I haven't thought of.

Metadata

Assignees

No one assigned

    Labels

    remote`hnix-store-remote` related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions