Project

blobby

0.0
No commit activity in last 3 years
No release in over 3 years
Various ways of storing BLOBs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Blobby

Build Status

This gem provides a standard interface for storing big chunks of data.

Usage

It supports popular BLOB operations such as reading:

store["key"].read

writing:

store["key"].write("some content")
store["key"].write(File.open("kitty.png"))

checking for existance:

store["key"].exists?

and even deleting:

store["key"].delete

This gem provides several "store" implementations:

# on disk
Blobby::FilesystemStore.new("/big/data")

# in memory
Blobby::InMemoryStore.new

# generic HTTP
Blobby::HttpStore.new("http://attachment-store/objects")

# fake success
Blobby::FakeSuccessStore.new

Other gems provide additional implementations:

Blobby.store provides a convenient way to construct an appropriate implementation, given a URI (or psuedo-URI):

Blobby.store("file:///tmp")
# => #<Blobby::FilesystemStore ...>

Blobby.store("mem:")
# => #<Blobby::InMemoryStore ...>

Blobby.store("http://storage.com/mystuff/")
# => #<Blobby::HttpStore ...>