Git Product home page Git Product logo

vibe-s3's Introduction

vibe-s3

this library is highly alpha and mostly untested. use at your own risk

see example dub projects for usage

to run the example you need to export your credentials:

export AWS_ACCESS_KEY_ID=XXX
export AWS_SECRET_KEY=XXX
export S3_EXAMPLE_BUCKET=myTestBucket
export S3_EXAMPLE_REGION=eu-west-1

Note for OS X: you need to force use Homebrews OpenSSL brew link --force openssl

vibe-s3's People

Contributors

9il avatar rix0rrr avatar yannick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vibe-s3's Issues

behaviour if streaming upload fails

there is a setting on when and wheter to auto delete partial uploads on s3 for multipart.

define the behaviour and exception on when the client uploads data but the old segments are deleted/cleaned by s3

uploading bigger file fails

uploading a 30mb lz4 file fails:
object.Exception occurred at ../../../vibe.d-master/source/vibe/core/drivers/libevent2_tcp.d:431 : Connection error while writing to TCPConnection.

range interface

create a range based interface to read/write data in a streaming way.

Compilation Error using dmd 2.073.0

Compiling examples produces:

source/app.d(105,18): Error: function vibe.aws.s3.S3.upload (string resource, RandomAccessStream input, string contentType = "application/octet-stream", StorageClass storageClass = "STANDARD", ulong chunkSize = 524288LU) is not callable using argument types (string, FileStream, string)

Although FileStream implements RandomAccessStream

Using the in another program produces the same error.
Any thoughts?

Error compiling on Ubuntu 14.04 x86, DMD32 D Compiler v2.072.1

I got this error

vibe-s3 0.0.6: building configuration "library"...
Enhanced memory security is enabled.
Memory debugger enabled
../../../../.dub/packages/vibe-s3-0.0.6/vibe-s3/source/vibe/aws/aws.d(333,13): Error: none of the overloads of 'maxBufferSize' are callable using argument types (ulong), candidates are:
../../../../.dub/packages/vibe-d-0.7.30/vibe-d/source/vibe/http/common.d(451,19):        vibe.http.common.ChunkedOutputStream.maxBufferSize()
../../../../.dub/packages/vibe-d-0.7.30/vibe-d/source/vibe/http/common.d(453,17):        vibe.http.common.ChunkedOutputStream.maxBufferSize(uint bytes)
../../../../.dub/packages/vibe-s3-0.0.6/vibe-s3/source/vibe/aws/s3.d(269,24): Error: cannot implicitly convert expression (input.leastSize()) of type ulong to uint
../../../../.dub/packages/vibe-s3-0.0.6/vibe-s3/source/vibe/aws/s3.d(280,25): Error: cannot implicitly convert expression (input.leastSize()) of type ulong to uint
dmd failed with exit code 1.

region as enum?

it might be a good idea to fix the aws regions within an enum.
they rarely change and are easy to upgrade.
this would prevent wrong region names

Making s3 endPoint configurable in s3.d

Code at line 160 in s3.d

super(bucket ~ ".s3-" ~ region ~ ".amazonaws.com", region, "s3", credsSource, config);

has hard-coded the s3 endPoint/bucket URL. You could make it configurable in ClientConfiguration such that it can be used for other services that support s3 API. Moreover, there are some local fake s3 servers for development which do not support the hard-coded URL.

Removing hardcoded https URLs from line 196 and 265 of s3.d

I know vibe-s3 was developed for s3 solely but using s3 for development online is mostly unreliable/difficult. There are several servers that emulate s3 API calls for local development so hard coded params does not make it easy to use vibe-s3 without changing code.

There are several implementation such as;

fakes3 - https://github.com/jubos/fake-s3
a Rackspace object storage API which emulates S3

There are also a number of enterprise solutions listed here with S3 API support http://www.s3-client.com/s3-compatible-storage-solutions.html

Very recent vibe-d dependency

I was just wondering.. do you really depend on features only present in vibe-d ver. 0.8.0-beta.5? Because of this high version it is not possible to use this dub configuration in projects that use older and more stable versions...

use requests

requests has a nicer API and also supports vibe.
it starts to become the de-facto standard for doing http requests in D.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.