Sal <
sanket....@gmail.com> writes:
> Not sure why Ben's post isn't visible in this group yet though it was sent
> to the mailing list - here is what he wrote:
>
Ahh, indeed it looks like I sent it from the wrong email address.
> -----------
> Have a look at my recently-uploaded pipes-s3 package [1].
>
> Cheers,
>
> - Ben
>
> [1]
https://hackage.haskell.org/package/pipes-s3
> -----------
>
> This looks very useful. One question though - shouldn't HTTP manager be
> created only once, instead of being recreated for every request in
> `fromS3'` request wrapper?
>
Hmmm, perhaps, although in my previous use-cases the objects being
read/written were rather large so the cost of bringing up a new HTTP
manager is relatively quite small.
If it would help I could expose another variant of the interface
allowing one to provide a Manager to use. For instance,
fromS3' :: MonadSafe m
=> Manager -> Aws.Configuration -> Bucket -> Object
-> (Response (Producer BS.ByteString m ()) -> Producer BS.ByteString m a)
-> Producer BS.ByteString m a
My only hesistation in doing so is that this is a rather type-unsafe
interface since AWS requires TLS yet there is nothing in the type to
suggest this.
Cheers,
- Ben