Skip to content

Commit 0aa7d57

Browse files
committed
feat(chrono): add README.md
1 parent 593e671 commit 0aa7d57

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

packages/chrono/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Chrono File versioning
2+
3+
Chrono is a project for file versioning focus on large files and optimize storage usage.
4+
5+
It is designed based on [Git](https://git-scm.com/) structure, but with changes to handle our specific needs.
6+
7+
## Optimization storage usage
8+
9+
One of the main goals of Chrono is to optimize storage usage and be able to remove unused versions of files when needed but still keep the history of the file.
10+
11+
Also it should should be able to restore the file contents from a remote server, like AWS S3 or a custom server.
12+
13+
To achieve this goal, Chrono uses a strategy to have 2 databases:
14+
15+
One is the **blobs database**, that are simple copies of a files using a **hash** as the file name, this hash is a SHA1 based on the file contents which makes it unique for each file.
16+
17+
The other one is the **objects database**, that are simple text files with metadata that points to the blobs, or other objects to form a tree, they also use a **hash** as the file name.
18+
19+
This strategy makes that the the only heavy files to be stored in the blobs database, and the objects database will be just text files with a few bytes.
20+
21+
This enables us to remove unused blobs to free up space when needed, but still keeps relevant versioning data in the objects database.
22+
23+
Also this enables the ability to restore a blob from a remote server using the information stored in the objects database.
24+
25+
Of course, this strategy has some drawbacks, like the need to have 2 databases, and that without right entry in the blobs database a file cannot be restored even if the objects database has the right entries, but this is a tradeoff that we are willing to take.
26+
27+
## Programmatic API
28+
29+
Chrono is a javascript lib and is designed to be used programmatically, so it can be used in any project that needs file versioning.

0 commit comments

Comments
 (0)