Data Model Service (dms)
Description
Domain Data Model Service.
Works on the basis of the domain center entity class `classes` interpreting each instance as metadata of a new user/project collection of information objects.
Provides a CRUD API for the rest of the roles and services to manage instances of custom/project collections. Supports the `create`, `update`, `replace`, `read` collection, `read` collection item`, `clear` collection methods, `lookup`. Depending on the collection metadata, it supports in-memory dictionary, distributed object database, PostgreSQL server, KAFKA and columnar database operations Clickhouse. Supports single-threaded, parallel and asynchronous modes of working with collections. Can guarantee the integrity of modification/reading/notification, ensures that modifications in storage and notifications remain consistent. Allows you to use a temporary or permanent cache for collection items.
Works in conjunction with wssubscr to notify subscribers of changes (event class/type `modelevents.data_changed`). Supports subscriptions with filters and masking. Notifies with filter-adjusted commands (e.g., create instead of update). Selecting data from a collection supports complex filtering, masking, sorting, aggregation, offsetting, and limiting.
Access via HTTP(s) REST API `/rest/v1/model/…`, where further is the name (or path) of the class. Management is also possible via Websocket-API both with authorization under user session and via token.
Access to collections and methods is determined by webserver rautes. By default, all paths and methods are available to the administrator, and the rest is determined by the roles (roles class) assigned to the user (user.opts.roles) or integration channel (integration_point.opts.roles).
Supports attachment file binding to entities that have `attachment` type properties of single or list form.
Attachments are hosted on the storage specified in the class, connections to which are configured using entities of class storage with file storage related types.
Divided into microservices by domain.
Reserved in Active-Passive mode. Scaled by domain tree partitioning.
Code |
|
Mode of operation |
|
Backup mode |
|
Types of sites |
|
Layer |
|
Placement |
|
Saving and restoring state on reboot |
|
appendix |
|
Own storage |
|
Limitations
-
Available through the information and communications platform 'incoplax'.
-
The speed of operation depends on the selected collection storage type. A collection performance speed of up to 10 thousand requests per second is achievable.
-
Data between sites is not synchronized by the role. Merging via external storage is possible with the correction for possible integrity issues and the need to disable cache.
Parameters
Name | Type | Default | Description |
---|---|---|---|
|
|
required |
Name. May consist of Latin letters and numbers, must begin with a letter. |
|
|
required |
Role Type. Possible values: |
|
|
required |
The alias of the server network interface on which the roles will interact internally with each other. |
|
|
empty |
Additional role options. Contains a json object or list. |
|
|
empty |
Role activity flag. When set to false, the role does not participate in validation and is not started. |
|
required |
Connection strings to the PostgreSQL DB domain server farm, where domain databases with product model entity store are created. Each domain uses a pool of 10 connections to each database (unique connection string). A new connection is created only when busy. There are no connections to the database in the quiet mode. Connection string format: Listing multiple connection strings in the list provides redundant access to the database server farm - if the connection through the first string fails, the connection through the second string is made, and so on. At the central site where the MDC role is located, in the absence of this parameter, the connection strings specified in the role parameters are applied for classes with the 'auto' mode mdc. |
|
|
required |
Group Number. |
|
|
required |
The order of a role instance within a group. |
|
|
empty |
A list of domain names served by this group. |
|
|
undefined |
The number of the domain tree service group. |
|
|
2 |
Limit the number of domains that can be loaded at the same time. |
|
|
1 |
Limit the number of concurrently loaded classes within a single domain. |
|
|
300 |
Temporary cache clearing interval for classes with the corresponding caching mode. |
|
|
10 |
The number of processes serving read operations in parallel within a single class, if parallel reading is allowed by the class mode. This is the default value for those classes where the value of opts.worker_r_count = 0. |
|
|
4 |
The number of processes serving parallel write operations within a single class, if parallel reading is allowed by the class mode. This is the default value for those classes where the value of opts.worker_w_count = 0. |
|
|
true |
Minute-by-minute statistics logging switch for classes for which the level of minute-by-minute statistics logging is not individually set. |
|
|
10 |
The default number of threads in the connection pool to the postgresql server. There is a separate pool for running server services and a pool for running client connections. Each of them is maximally expandable up to the specified number of connections. |
|
|
4 |
Number of processes serving dmsquery operations in parallel on the server. |
|
|
A list of sections in which the instance participates. |
||
|
|
|
for which the storage operation mode is not set individually. |
|
|
in RAM with saving to disk on all instances of the group. |
|
|
|
|
but saves the RAM)." |
Configuration example
The configuration is managed in an application available to master domain administrators. The application hides the full content of the configuration, but it is nevertheless accessible via the API.
The configuration contains a section to describe all instances of all roles. Parameters are defined for each specific role instance.
{
"name": "dms1",
"roletype": "dms",
"iface": "eth0",
"group": 11310,
"order": 1
}
See also
-
Websocket API for CRUD operations through the integration channel
-
Websocket API subscriptions to changes of class entities through the integration channel
-
Websocket API for CRUD operations via connection with user authorization
-
Websocket API subscriptions to changes of class entities via connection with user authorization