Package: kaircs
===============================================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'salmost a file-system you can write to, that expects your files don'tchange much.- No encryption of data.Architecture============KairCS is split in two main components:- The KairCS Very Simple Blob Store- The KairCS ServiceKairCS Very Simple Blob Store (VSBS)------------------------------------It's responsible to actually manage the storage of blobs.  It DOES NOTkeep a notion of directories so there's no way to list all the blobsin the store.  In fact, this layer support only two operations:- Write a blob- Read a blob from begin to endThe `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 theblob name.The blob is divided in chunks of 1 MB.  Each chunk is storedindividually under an automatically generated key composed by theblob's *master key* and a counter.The first chunk contains both metadata and data.  The metadata recordis 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. Otherchunks are just data and the size of the chunk is the size of thedata.To write a blob you need the name and the size. To read a blob youjust 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 404if 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 400Bad request.This method creates the directories as needed.Trying to upload large files may fail if the client does not supportchunked 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 byremoving a file a directory becomes empty further requests for thedirectory MAY get 404 responses.Security~~~~~~~~RiakCS has no authentication mechanism.  You must ensure that onlyauthoritative parties may reach the server.  A common way to deploy itis behind a nginx proxyConfiguration-------------When setting up a KiarCS cluster you must:- Set up as many Riak KV nodes you need that match your space and RAMrequirement.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 modifyit under the terms of the :abbr:`GNU (GNU is Not Unix)` General PublicLicense as published by the Free Software Foundation, either version 3of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  Seethe:abbr:`GNU (GNU is Not Unix)` General Public License for moredetails.  You should have received a copy of the :abbr:`GNU (GNU isNot Unix)` General Public License along with this program.  If not,see http://www.gnu.org/licenses/...Local Variables:fill-column: 70End: