You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing an application that connects to several different Nix stores concurrently (with the number variable at runtime) is quite awkward. It would require either:
Create a monad transformer that can store a runtime-variable list of monads and allow the application to access an element by index
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.
The text was updated successfully, but these errors were encountered:
Do you have a proof of concept/example or just a signature of withConnection function?
Might be useful to have some draft to talk about, while current runStore is mostly just a reader monad wrapping underlying connection I haven't actually tried writing a multi-store client with dynamic number of stores (nor static!) so I have no idea tbh.
Writing an application that connects to several different Nix stores concurrently (with the number variable at runtime) is quite awkward. It would require either:
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.The text was updated successfully, but these errors were encountered: