Sunny is a multi-cloud datastore client for Node.js. Sunny aims for an efficient, event-based common interface to various cloud stores to enable cloud-agnostic programming that retains flexibility and speed.
- Sunny.js Documentation: Guides and API documentation.
- Sunny.js GitHub Page: Source repository and issue tracker.
- Abstracts cloud provider differences. Focus on writing your application, not juggling "x-amz-" vs. "x-goog-" headers.
- Fully configurable headers, cloud headers, cloud metadata.
- Sensible and cloud-agnostic error handling.
- "One-shot" requests whenever possible.
- SSL support.
- Blob GET/PUT operations implement Node Readable and Writable Stream interfaces.
Sunny has full blob support for:
Future support is planned for:
- Rackspace Cloud Files: Rackspace Cloud Files
- OpenStack Storage: OpenStack Storage
- (Maybe) local file system as a dummy cloud provider.
Install Sunny directly from npm:
$ npm install sunny
or the GitHub repository:
$ git clone firstname.lastname@example.org:ryan-roemer/node-sunny.git $ npm install ./node-sunny
Please read the docs (in source at "docs/") and review the "live" tests (in source at "test/live") that perform the entire range of Sunny operations against real cloud datastores.
The cloud providers that Sunny supports (or will support) provide similar, but not quite equivalent interfaces. Amazon S3 and Google Storage share a nearly identical interface, as well as Rackspace Cloud Files and OpenStack Storage. However, there are some subtle differences, particularly with naming, errors, status codes, etc.
Notwithstanding the goal for a common API, Sunny aims to provide access to as much of the internals of a given cloud datastore as possible. In the current development phase, that means exposing as many of the query / header / metadata features and functionality in the underlying store as won't make maintaining a common interface unpalatable.
Most cloud operations can be performed with a single HTTP request. However, many cloud client libraries add in extra HTTP calls along the way for say a blob file GET request (perhaps first requesting an authorization URL, checking the container path for existence, etc.).
Sunny aims to perform the minimum amount of calls possible by default. That said, sometimes it is good to have a few sanity check intermediate operations, so Sunny can make calls with validation (e.g., checking a bucket exists first).
Sunny currently supports the following cloud operations:
- List containers:
- PUT / DELETE container:
- List blobs in a container:
- PUT / HEAD / GET / DELETE blob:
Sunny is under rapid development. Some areas for enhancements:
- Copy blob.
- Update blob metadata without PUT.
- Set blob / container ACL, policies, etc.