cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Using cassandra a BLOB store / web cache.
Date Tue, 19 Jan 2016 21:23:37 GMT
I recently started noodling with this concept and built a working blob storage service using
node.js and C*.  I setup a basic web server using the express web server where you could POST
binary files to the server where they would get chunked and assigned to a user and bucket,
in the spirit of S3.  Then when you retrieved the file with a GET it would reassemble the
chunks and push it out.  What was really nice about node.js is I could retrieve all the chunks
in parallel asynchronously.  It was just for fun, but we have considered fleshing it out for
use in our organization.  Here is the schema I developed:

CREATE TABLE object.users (
    name text PRIMARY KEY,
    buckets set<text>,
    password text

CREATE TABLE object.objects (
    user text,
    bucket text,
    name text,
    chunks int,
    id uuid,
    size int,
    type text,
    PRIMARY KEY ((user, bucket), name)

CREATE TABLE object.chunks (
    file_id uuid,
    num int,
    data blob,
    PRIMARY KEY (file_id, num)

For your purposes you could modify the objects table to keep a revision id or timeuuid for
looking at previous versions.  If you want some insight into how the code worked give me a

View raw message