Download the PHP package limen/fileflake without Composer
On this page you can find all versions of the php package limen/fileflake. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package fileflake
Fileflake
A distributed file server utilizes mongodb(not mongo GridFS) as the storage backend for Larevel.
Features
- supported operations: upload, download, delete
- distributed storage nodes
- storage nodes load balance
- easy to scale out (add more storage nodes on the fly)
- file stream stored in mongodb
- file stream is divided into chunks and the chunk size is configurable
- file chunks could be iterated without making a local copy
- files have same checksum would only store one copy
Getting start
Installation
Recommend to install via composer.
Usage
System diagram
Concepts
File meta
Every file has a meta record.
The reference is similar to soft link in Linux file system.
A file is "source file" when it doesn't have a reference. On the contrary, the files which have reference are "soft links".
File's reference count (default 1) shows how many file(s) (including itself) are referring to it.
The system would only store the first one of the files which have same checksum and the others' references point to the first file.
When a soft link file is removed, its meta data would be deleted and the reference count of its source file would decrement by 1.
When a source file is removed, its reference count would decrement by 1.
When a source file's reference count decrement to 0, its meta data would be deleted and its chunks would be deleted from storage node.
meta fields
- file id
- file name
- file checksum
- file reference count
- file reference
- store node id
- chunk ids
- extension
- mime type
Storage node
The nodes store source file's chunks.
fields
- chunk id
- chunk content
Node meta
Store the nodes meta data that would be used to load balance
fields
- node id
- file count
- file volume
License
MIT
All versions of fileflake with dependencies
laravel/lumen-framework Version 5.2.*
mongodb/mongodb Version ^1.0.0
jenssegers/mongodb Version ^3.0
limen/redmodel Version >=0.1.3