Code Monkey home page Code Monkey logo

odilon-server's Introduction

spring-gaede65182_1280

Odilon Object Storage

Lightweight and scalable

Odilon is a scalable and lightweight Open Source Object Storage that runs on standard hardware (Odilon project website).

It is an infrastructure software designed to be used by applications that need to store terabytes of medium to large size objects (like photos, pdfs, audio, video) securely and safely through encryption, replication and redundancy. A typical installation would by 100M pdfs 20KB-30MB each.

It has a simple single-level folder structure similar to the Bucket / Object model of Amazon S3. It is small and easy to integrate, offers encryption, data protection and fault tolerance (software RAID and Erasure Codes) and detection of silent data degradation. Odilon also supports version control and master - standby replication over the Internet.

Main features

  • Scalable Object Storage on commodity disks
  • Single binary, does not neet Database or other external service
  • Developed in Java, the server requires Java 17+ (uses Spring Boot, OkHttp, Jackson, Caffeine, Metrics, among others)
  • Runs on Linux and Windows
  • Single dependency-free binary, does not neet Database or other external service
  • SDK Java 11+ for client applications
  • HTTP/S for client server communication
  • License Open Source Apache 2. It can be used for Open Source and commercial projects
  • Encryption at rest (AES 256)
  • Integration with Key Management Server Hashicorp Vault
  • Simple operation. Adding new disks requires one line in the config file, and an async process sets up disks and replicata data in background
  • Data replication using Erasure Coding and software RAID
  • Data immutability. Odilon supports two storage modes that protect data from deletion, whether accidental or intentional: Read Only and WORM (Write Once Read Many)
  • Master - Standby architecture with async replication over the web, for disaster recovery, high availability, archival, ransomware recovery
  • Version Control
  • Tolerates full disk failures
  • Disk monitoring for silent and slow data degradation detection (bit rot detection)

Security

Odilon keeps objects encrypted (Encryption at Rest) using modern algorithms such as AES-256. Each object has a unique encryption key. In turn, the encryption key of the object can be generated by Odilon or, which is recommended for greater security, by a Key Management Server (KMS)

A KMS is software for generating, distributing, and managing cryptographic keys. It includes back-end functionality for key generation, distribution, and replacement, as well as client-side functionality for injecting keys, storing, and managing keys on devices. Moving key management to KMS prevents application reverse engineering attacks, simplifies operational maintenance, and compliance with security policies and regulations.

Odilon integrates with the KMS Open Source Hashicorp Vault.

Communication from source to storage is via HTTPS, which uses encryption to increase the security of data transfers (this functionality requires Java 17. v2 05/2024).

Data Replication

Odilon can be configured to use software RAID for data replication. The supported configurations are

  • RAID 0. Two or more disks are combined to form a volume, which appears as a single virtual drive. It is not a configuration with data replication, its function is to provide greater storage and performance by allowing access to the disks in parallel.

  • RAID 1.For each object, 1 or more exact copies (or mirrors) are created on two or more disks. This provides redundancy in case of disk failure. At least 2 disks are required, Odilon also supports 3 or more for greater redundancy.

  • RAID 6 / Erasure Coding. It is a method of encoding data into blocks that can be distributed across multiple disks or nodes and then reconstructed from a subset of those blocks. It has great flexibility since you can adjust the number and size of the blocks and the minimum required for recovery. It uses less disk space than RAID 1 and can withstand multiple full disk failures. Odilon implements this architecture using Reed Solomon error-correction codes. The configurations are:

    3 disks (2 data 1 parity, supports 1 full disk failure),
    6 disks (4 data 2 parity, supports up to 2 full disks failures)
    12 disks (8 data 4 parity, supports up to 4 full disks failures)

Master Standby Architecture

Odilon supports Master - Standby Architecture for disaster recovery, high availability, archival, and anti-ransomware protection. Data replication is done asynchronously using HTTP/S over the local network or the Internet. Setting up a standby server is simple, just add the URL and credentials to the master configuration file and restart. Odilon will propagate each operation to the standby server. It will also run a replication process in background for data existing before connecting the standby server.



โ€‹

odilon-master-standby





What Odilon is not

    Odilon is not S3 compatible
    Odilon API is simpler than S3. The only thing it has in common with AWS S3 it that uses the bucket/object methafor to organize the object space.

  • Odilon is not a Distributed Storage like Cassandra, Hadoop etc.
    Odilon supports master-standby architecture for archival, backup and data protection, but it is not a Distributed Storage and it does not support active-active replication.

  • Odilon is not a File System like GlusterFS, Ceph, ext4, etc.
    It uses the underlying file system to stores objects as encrypted files, or in some configurations to break objects into chunks.

  • Odilon is not a NoSQL database like MongoDB, CouchDB, etc.
    It does not use a database engine, Odilon uses its own journaling agent for Transaction Management and only supports very simple queries, ie. to retrieve an object and to list the objects of a bucket filtered by objectname's prefix.

  • Odilon is not optimized for a very large number of small files
    Odilon does not have optimization for lots of small files. The files are simply stored encrypted and compressed to local disks. Plus the extra meta file and shards for erasure coding.

Using Odilon

A Java client program that interacts with the Odilon server must include the Odilon SDK jar in the classpath. A typical architecture for a Web Application is



web-app-odilon-en



Example to upload 2 pdf files:

String endpoint = "http://localhost"; 

/** default port */
int port = 9234; 

/** default credentials */
String accessKey = "odilon";
String secretKey = "odilon";
			
String bucketName  = "demo_bucket";
String objectName1 = "demo_object1";
String objectName2 = "demo_object2";
			
File file1 = new File("test1.pdf");
File file2 = new File("test2.pdf");
			
/* put two objects in the bucket,
the bucket must exist before sending the object,
and object names must be unique for that bucket */
			
OdilonClient client = new ODClient(endpoint, port, accessKey, secretKey);

client.putObject(bucketName, objectName1, file1);
client.putObject(bucketName, objectName2, file2);

More info in Odilon's website
Java Application Development with Odilon

Download

Resources

Videos

SDK Source Code

odilon-server's People

Contributors

atolomei avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.