Synchronisation Channel

screen_shot_2024-12-20_at_15.16.00.png
A sync channel is a set of instructions to synchronise some files between a hub and one of its connected storage, in one direction, using rsync. It is made of:

Multiple channels can be defined per storage. They are processed sequentially (not at the same time) one after the other by a sync agent. A sync agent is an independent process, dedicated to a storage, ran in parallel, one for each storage. This way, we achieve a multi-directional, asynchronous synchronisation experience, hot-plugging storages, and fault-tolerant (a storage becoming offline don't interfere with the others storages).

Note

The hub, storages and channels can be represented as a tree:

hub/
├── storage1/
│    ├── chan
│    ├── chan
│    └── chan
├── storage2/
│    ├── chan
│    ├── chan
│    └── chan
└── storage3/
     ├── chan
     ├── chan
     └── chan

The navigation bar lets you navigate between the elements using a clickable hierarchy-like path:

channel path bar screenshot

The navigation bar is composed of these elements:

Channel Main Panel

channel main panel screenshot

You can control many aspects of the file transfer using rsync options and filter rules.

Options

The options specified on a channel affect only this channel. In this example the --delete option is defined to clean the destination from unwanted files.

# The option: rsync --delete is set (see the
# eraser icon) to have an identical copy at
# destination (local file deletion and
# renaming at source are passed on
# destination)

Read the rsync options section for more details about the available options.

Rules

The rules are written using the rsync syntax to include or skip files and folders:

# The producer sends the software for the
# pipeline in continuous integration (CI):

+ /tools/
+ /tools/**

Read the dedicated rsync filters section for details about the syntax and how they work in SyncPlanet.

Channel Parameters

link parameters screenshot

Name

Note

A name, at your convenience, without character restriction, to name the element in the interface instead of naming it with its _id

Tip

Example: tools

Identifier

Note

An automatically generated string to identify the link of the form: lnk_# where # is a Universally Unique Lexicographically Sortable Identifier .

Tip

Example lnk_01G0J7XSPSE6C93H1B9RRFE9S7

Write Permissions Table

SyncPlanet is multi-user: only the users specified as authors can write and update an object.

Note

If a user is not proposed in the table, it means that you first have to connect him/her to the project

Note

Developers can access the permissions table under the author key which can have a single user string value or have multiple user names in an array of username strings.

Status

The status is a bunch of information on links, to know when was the last run, the duration, and showing the possible errors encountered in the process.

Channel Programming Interface

A channel and its properties can be accessed as a JSON object:

{
"_id": "lnk_01G0J7XSPSE6C93H1B9RRFE9S7",
"author": "support",
"enable": true,
"include": "# The producer sends the software for the\n# pipeline in continuous integration (CI):\n\n+ /tools/\n+ /tools/**\n\n# The option: rsync --delete is set (see the\n# eraser icon) to have an identical copy at\n# destination (local file deletion and\n# renaming at source are passed on\n# destination)",
"name": "tools",
"rsync_args": "--delete",
"src_id": "vol_01FWEWD03P3J2H98TQ0Y4AXF3H",
"tgt_id": "hub_01FX33ZYB78E9F5FTZMKC96A4P",
"time": 1649879738073,
"timeBegin": "2023-12-15 11:16:09+00:00",
"timeEnd": "2023-12-15 11:18:24+00:00",
"timeRead": "2023-12-15 11:16:09+00:00"
}

Please read Environment-Setup and API for details about how to setup a client programming environment.

Next

You might continue reading: