Skip to main content
===============================================
KairCS - Small File Cloud System over Riak KV
===============================================

This project allows to put mostly immutable files (written once,
updated mostly never) on a Riak KV store, that are read sequentially
(no random access to a file is supported).

This project is not meant to be a substitute of Riak CS:

- There's a single file space in KairCS. No butcket, no users. It's
almost a file-system you can write to, that expects your files don't
change much.

- No encryption of data.


Architecture
============

KairCS is split in two main components:

- The KairCS Very Simple Blob Store
- The KairCS Service


KairCS Very Simple Blob Store (VSBS)
------------------------------------

It's responsible to actually manage the storage of blobs. It DOES NOT
keep a notion of directories so there's no way to list all the blobs
in the store. In fact, this layer support only two operations:

- Write a blob
- Read a blob from begin to end

The `KiarCS Service`_ leverage these function to provide *some*
support for listing and deletion.

When storing a blob, you must provide a name which is used to create a
*master key* of the blob. The master key is actually a SHA256 of the
blob name.

The blob is divided in chunks of 1 MB. Each chunk is stored
individually under an automatically generated key composed by the
blob's *master key* and a counter.

The first chunk contains both metadata and data. The metadata record
is like this::

record metadata {

uint8 metadata_size;
# The size of the metadata including this byte. Currently this
# is 1 + 8 bytes.

uint64 size_of_the_blob;
}

The maximum size of the first chunk is thus 1 MB plus 9 bytes. Other
chunks are just data and the size of the chunk is the size of the
data.

To write a blob you need the name and the size. To read a blob you
just need the name.

VSBS store the chunks in Riak KV.



KiarCS Service
--------------

This is a high level component. It exposes a REST API over HTTP/1.1:

``GET /path/to/x``

Read the file or directory under the given path. It may return 404
if the file is not found.

.. todo:: If path is a directory, reply with a 300 Multiple Choices?


``PUT /path/to/a/file``

Create or replace the file under the given path.

If the given path exists and points to a directory, reply with a 400
Bad request.

This method creates the directories as needed.

Trying to upload large files may fail if the client does not support
chunked transfer.

The Content-Length header MUST be sent

.. todo:: Chunked response replies.


``DELETE /path/to/a/file``

Remove the file. Deleting a directory is not supported. If by
removing a file a directory becomes empty further requests for the
directory MAY get 404 responses.


Security
~~~~~~~~

RiakCS has no authentication mechanism. You must ensure that only
authoritative parties may reach the server. A common way to deploy it
is behind a nginx proxy


Configuration
-------------

When setting up a KiarCS cluster you must:

- Set up as many Riak KV nodes you need that match your space and RAM
requirement.

Join them in a cluster.

See the document `Configure Riak KV for KiarCS`.

- Set up Kiar CS nodes and connect them to the Riak KV nodes.
There're several possible configurations:

- 1 to 1.
- 1 to many.

See the document `KiarCS cluster layout`.


Copyright and license
=====================

Copyright (c) Merchise Autrement [~º/~] and Contributors.


This program is free software: you can redistribute it and/or modify
it under the terms of the :abbr:`GNU (GNU is Not Unix)` General Public
License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the:abbr:`GNU (GNU is Not Unix)` General Public License for more
details. You should have received a copy of the :abbr:`GNU (GNU is
Not Unix)` General Public License along with this program. If not,
see http://www.gnu.org/licenses/.

..
Local Variables:
fill-column: 70
End:


Release files for kaircs 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kaircs 0.4.0
File Size Uploaded
kaircs-0.4.0.tar.gz 119.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kaircs 0.4.0
File Interpreter ABI Platform
kaircs-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 283.6 kB

Release files / kaircs-0.4.0.tar.gz

Download URL kaircs-0.4.0.tar.gz
Size 119.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cfae6ef5717552ed4a2e7e92a92e1416dd305482044f90608c2f1109118f95d5
BLAKE2b-256 checksum
How to use checksums
ca5a01c3831a7edfffdd06057a479e6d436c7f71ecfe83824910d86268d82365
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.9.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/2.7.15rc1

Release files / kaircs-0.4.0-py2.py3-none-any.whl

Download URL kaircs-0.4.0-py2.py3-none-any.whl
Size 164.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ee6fff2abe7ea1d66a7f2be39b9b45cbff4e0f15b3ab05f3bf26d1d7717f1bd6
BLAKE2b-256 checksum
How to use checksums
6c5c1d7f90e81c0d3acbb8c199a8906a758f04deeaaf317fe0c6d2f665cfcbd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.9.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/2.7.15rc1

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page