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

AWS Monad Transformer #30

Open
aristidb opened this issue Aug 15, 2012 · 1 comment
Open

AWS Monad Transformer #30

aristidb opened this issue Aug 15, 2012 · 1 comment
Labels

Comments

@aristidb
Copy link
Owner

When I started working on aws a while ago, I wanted to put everything in a monad. This plan was scrapped fairly quickly, however now I have plans to have another go, albeit with different motivations. Two things first:

  1. This will be optional: I have no plans at all to make people put their programs in an AWS monad. The plan is that complex functionality that spans multiple REST request yet is logically one AWS "call" uses this, for the most part.
  2. This will be based on FreeT (http://hackage.haskell.org/package/free or http://hackage.haskell.org/package/transformers-free) or something similar, in order to allow different "run" functions.

So why do I want this?

Originally, I just wanted to avoid giving the configuration / service configuration / HTTP manager parameters every time. But that isn't really a good reason IMHO.

I have recently started adding the first "complex" functionality to aws, inspired by @larskuhtz, specifically the IteratedTransaction functions awsIteratedSource and awsIteratedList. They just hammer out the HTTP requests and that's that. But what if we want to do things like:

Or perhaps fancier things that I haven't thought of yet.

I think there might be two components to this:

  1. A reader-like part where the configuration / HTTP Manager is stored. This part could be omitted, if somebody thinks it's a bad idea.
  2. A FreeT-like part for the actions.

It would also have to be a transformer so there can be actions in some underlying monad.

And of course it would have pluggable interpreters, which can then implement request retry / rate limiting / ....

@aristidb
Copy link
Owner Author

Random thought of the day: Allow people to use their existing MonadReader instances, with a helper class to extract AWS environment information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant