Home > Help center > AppCell > Appcell Storage

Appcell Storage

Depending on the business needs and preferences, some AppCell plugins may require their own data storage. This is done through ETCD storage.

Plugins, such as cPanel and Plesk do require the use of having their own storage, as they include data such as their location, IDs, DNS, ID security, login information, etc. Most often the Plugin must write/update its data. Having security in mind, it is best not to allow the plugin access to the main database (Billia). Rather, an alternative mechanism is offered as a recommendation to use for storage - the ETCD storage.

What is ETCD storage

ETCD is a type of a distributed key-value storage, which provides a reliable way to store data. It can then be accessed by a distributed system or a cluster of machines. Applications of any complexity can read data from and write data into ETCD.

ETCD also includes a vast library for the more popular programming languages - JavaScript, Python, Java, C++, Swift, SQL, Ruby, etc.

Why use ETCD storage

Using ETCD is a more simplified process for storage than most. Other options may include more complicated methods for storage and data distribution, such as e.g. using relational databases with a complex structure. The ETCD storage, on the other hand, works with predefined credentials used to access a personal “sent box” in the storage space, where the data for the specific plugin is kept.

Moreover, each plugin that is being installed, would be provided with its own separate ETCD sent box. These ETCD sent boxes also have security, where one Cell cannot access or read the data of another Cell. This way passwords, login and server information cannot be accessed or taken without authorization.

One Cell can access its own storage and read its own data only. But AppCell is the only software able to access and read all Cells’ data.

How it works

When a Cell is in the process of being installed, the four Appcell installation files are used: Appcell.json, Plugins.json, Resources.json and Settings.json.

In the installation file AppCell.json, "etcd": ">=3.0" can be specified, which means that during that installation process an ETCD storage is automatically created, with the dedicated database, username, Cell name, and password. It will provide the ETCD host name, password and available access.

Example:

{
“appcell“: {
        “etcd“: {
            “username“: “examplecell“,
            “password“: “L8bw8BS7jcpkmF1t“,
            “access“: “/examplecell/*“
        }
    }
}

Inside this storage is where the application can be configured and where it can read and write its data when changes occur.

In the case ETCD is not requested in the AppCell.json installation file, no such will be created.

Development

Two methods of work are present in regards to assigning/creating an ETCD storage.

  1. Either a personal ETCD storage will be automatically created during the installation of the Cell, or;

  2. A specified API, called AppCellSentboxStorage, can be used instead, which will generate pre-set testing storage boxes. These boxes are available for the application while it’s being developed. During that time, data can still be written in it and when it’s time - it can be easily erased.