Skip to content

360/handle calls with stbx protocol #362

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

Merged
merged 26 commits into from
Mar 5, 2020

Conversation

marcosh
Copy link
Contributor

@marcosh marcosh commented Feb 27, 2020

this uses the protocol to process requests in the http service

Copy link
Member

@epost epost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool Marco! Green checkmarks all around. I'll now post some things I noticed at first glance here, and then Imma poke around in various bits of the code and push some minor, non-controversial things like we discussed. We can address more intricate stuff in a collab session as needed.

import Statebox.Protocol.Store (StoreActions, StoreActionF(..))
import Statebox.Store (Actions, get, put)

data MultipleStoresActionF a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a single store, sort of, but 'many-sorted'.


type ExecutionStateDictionary = Map TxId ExecutionStateDictionaryValue

type AppState = Tuple (Ref TransactionDictionary) (Ref ExecutionStateDictionary)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a (wrapped?) record might be nicer and clearer here than a Tuple, unless there's a specific reason for the latter. I guess with records, especially unwrapped ones, the Applicative wouldn't work anymore... What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, initially I had a record here and then I changed it to a Tuple when worked on the Embeddable stuff. I could try to change it back again

@epost epost merged commit df858d7 into development Mar 5, 2020
@epost
Copy link
Member

epost commented Mar 5, 2020

Thanks Marco, great work! 👍

@epost epost deleted the 360/handle-calls-with-stbx-protocol branch March 6, 2020 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants