# Architecture

### Macula Professional

Macula Professional is suitable for single VMS server systems. Each server can accept data streams from cameras and other sources, record, and then send these streams further to clients: Macula Monitor (thick client), Macula Mobile (iOS, Android, and thin client for macOS), Web browsers, and the management application – Macula Console. Each Macula Professional server can serve a virtually unlimited number of remote and local clients.

Apart from device connections, Macula Professional server can be also paired with external software: the so-called external services (API connections) and native integrations (implemented by our software development team). The latter include generic protocols like serial data or OPC, access control software integrations, analytics suites and others.

### Macula Enterprise

Macula Enterprise systems are more complicated: these consist of many servers having different roles.

* Macula Enterprise server: **central management server**, exactly one (1) per system
* **recording** servers for data recording and stream re-distribution
* **failover** nodes: standby recording servers
* **mirror**: central server redundancy, one mirror per system

For the **Macula Enterprise** server, there is a special installation package with the corresponding name. You only need to use it once per system - for the central management server. It is a machine dedicated to the management routines; it is the place where you apply the Macula Enterprise license. The management server should not have any device configuration - although, its core does have the recording capabilities. One may say that the Macula Enterprise server is similar to Macula Professional. Thus, if you use a Macula Enterprise server without any Macula Recording Server connections, you will have a Macula Professional system with extra features like video walls.

Apart from the system-defined server roles, you may wish to dedicate certain recording servers to specific tasks in order to optimize hardware resource usage. Examples:

* **replication** servers for automated backup: channel copies are recorded instead of live channels (or combined with other live channels)
* **analytics** servers: fewer channels with configured software VA
* FR or LPR server: a few channels dedicated to FR/LPR + external service software running on the same machine

Each of these function servers uses the Macula Recording Server installation. Recording servers do not require a license to operate but they also cannot be managed directly: each recording server must be connected to the Macula Enterprise server to receive its configuration. To achieve centralized management:

* use your Macula Console application to connect to the Macula Enterprise server,
* pair Macula Enterprise server with all Macula Recording Server servers,
* choose server roles (recording, failover, mirror) and assign configuration to each one.

Some of the features are provided by Macula Enterprise server only (e.g., maps, user buttons); other resources can be assigned to specific recording servers (devices, video walls, etc). After receiving the configuration, recording servers can further operate independently (without connection to Macula Enterprise server) for up to two weeks.

After 14 days, the connection must be restored briefly for the license check and audit information exchange. Note that centralized functionality (failover, maps, etc) will be unavailable for isolated recording servers. If the connection is not restored and the license check fails, the recording server will continue to record but it will refuse all incoming client connections.

{% hint style="danger" %}
Recording servers can operate independently (without the central server connection) for up to 2 weeks, after 14 days of no connection, the recording server will terminate all incoming connections, but will continue to record.
{% endhint %}

Data Flow

Streams from the cameras and other sources are requested by servers where they are configured. From each device, the following data streams may be received for further use (excluding communication):

* video: main stream/substream
* recorded video (edge)
* audio
* video analytics
* DI/DO events
* GPS data
* HTTP contents
* serial text

These streams are recorded by servers, and then further provided to connected clients, which may be thick, thin, mobile, and Web applications. Streams go directly from recording servers to the clients. If a channel is replicated, the archived stream (and not live) from the recording server is sent to the target replication server.

The recording servers report to the central management server (Macula Global): they exchange management information, receive configuration changes, and send back audit information, as well as communicate license data.

Clients also communicate with the central management server: in background, they receive secondary server addresses, channel status, license information. The Macula Global server also ensures the link between clients and external services.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FiUenOCvzqi4HAVlzXLQo%2Fimage.png?alt=media&#x26;token=b6aaf44d-bdc7-423e-94a1-bbc8ca8cade5" alt=""><figcaption></figcaption></figure>
