Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add utilities for examining views #21

Open
ShapeOfMatter opened this issue Apr 26, 2024 · 4 comments
Open

Add utilities for examining views #21

ShapeOfMatter opened this issue Apr 26, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ShapeOfMatter
Copy link
Owner

In various contexts, including some of our (planned) examples, we care about the transcripts (views) of various parties. We should write handlers to gather them explicitly.

@ShapeOfMatter
Copy link
Owner Author

should contribute toward #20.

@psilospore psilospore changed the title Add untilites for examining views Add utilities for examining views May 6, 2024
@psilospore
Copy link
Collaborator

Would whatever is in https://github.com/ShapeOfMatter/HasChorPlus/blob/main/src/Choreography/Network/Local.hs already store the messages sent by different parties?

-- | Each location is associated with a message buffer which stores messages sent
-- from other locations.
type MsgBuf = HashMap LocTm (Chan String)

newtype LocalConfig = LocalConfig
  { locToBuf :: HashMap LocTm MsgBuf
  }

@ShapeOfMatter
Copy link
Owner Author

No, I don't think so. It's using Chans, which "store" the messages only until the relevant process consumes them.

I'm sure we could shim this to do what we want, and I'm not opposed to that, but it'd be smelly. We shouldn't need concurrency for this; something that works like Choreography.Choreo.runChoreo, but with the side-effect of accumulating everyone's views as state, would seem like the "right" way to do it.

@psilospore
Copy link
Collaborator

Ah ok thanks for the clarification. I think it should be fairly easy to port this over to state.

@ShapeOfMatter ShapeOfMatter added the enhancement New feature or request label May 10, 2024
@ShapeOfMatter ShapeOfMatter added this to the Submittable milestone May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants