Inspired by the blockchain system, the email system, and git versioning, Condensation's architecture is a unique solution to develop scalable and modern applications.
Compared to commonly centralized databases, Condensation writes and reads data directly on the user's device. No image of the data needs to be created to communicate with a data center.
Merkle trees are used to structure data allowing to retrieve or modify only part of the data once needed. The data is self organized depending on its size and its frequency of usage. A tree can be arbitrarily large, and may form a blockchain or other data structure. A basic tree consist of the following parts:
With Condensation raw data is written as a byte sequence into immutable objects which are created and processed on the client. Each object is unique and identified by a unique address or a hash which is generated from the object content. The complete picture of the data is represented using an address list pointing to other objects.
Condensation does not need to decrypt data to store it as it is the case for classic SQL and NoSQL databases. This eradicates the danger of data breaches. The data can circulate freely as objects are recognized by their address and not their content. The content stays encrypted until its received on the end user's device.
With Condensation, objects can be exchanged freely from one client to another, even without the need of a server. A direct communication is possible as the synchronization of data occurs on the client side. It allows to create fully distributed systems, where servers are only used to pass the information or to store it. Users can subscribe to different servers and still communicate with each other.
As the server never needs to decrypt the data to store it, the data is never exposed to breaches. Asymmetrical encryption is used to ensure only the intended receiver of the data can read it.
As objects can circulate and be stored freely, Condensation provides mechanics to reassemble and update the data when it arrives on the user's device.
When multiple versions of the data tree need to be synchronized, Condensation compares each object independently so that it can merge a version of the data with the relevant objects. It will keep the most recent ones, and the ones in common, so that no data is lost.
Objects can be created, encrypted and managed through API calls. A small piece of code needs to be written to match your application's needs. Anything can be build as Condensation is very flexible and made for generic use cases.
// Example of creating an encrypted object
var data = // Uint8Array
var object = cn.createObject(cn.emptyHeader, data);
var key = object.encryptInPlace();
var hash = object.calculateHash();
var reference = new cn.Reference(hash, key);