# NewSQL Databases Assessment: CockroachDB, MariaDB Xpand, and VoltDB
## 4 NewSQL Databases: CockroachDB, MariaDB Xpand, and VoltDB
### MariaDB Xpand  
MariaDB Xpand is a new product from MariaDB that focus on scaling SQL without sacrificing the relational data model and ACID transactions. It was formerly known as ClustrixDB before being acquired in 2018 by MariaDB Corporation. It is no longer a separate solution but is now included as part of MariaDB Enterprise Server as a plugin. MariaDB Xpand, shortly defined as Xpand, was developed to handle large volumes of data and scales the database more efficiently [33]. This means that scaling out the cluster is executed easily and automatically by Xpand itself. Xpand excels at reading and writing scaling data applications with absolute availability in the case of multiple zone failures. Additionally, Xpand offers columnar indexes to enable ad hoc operations, and personal analytics on transactional data [34]. On the other hand, Xpand manages data with multiple copies shared between nodes. In case one node fails, the other nodes will use the copied data from the faulty node, without external intervention, maintaining availability. Furthermore, it provides strong consistency of records, guaranteeing ACID properties of OLTP transactions. According to documentation, MariaDB Xpand is based on Xpand Performance Topology [35]. The Xpand Performance Topology consists of one or more MaxScale nodes and three or more Xpand nodes since the minimum number of nodes is three [36]. In Figure 3, we can see an example of Xpand Performance Topology.  
The MaxScale nodes monitor the health and availability of each node and accept clients and application connections. The Xpand nodes receive queries from MaxScale nodes, store data in a distributed manner, and execute queries using parallel streaming. Figure 4 shows an example of the MariaDB Xpand user interface.  
The main advantages of MariaDB Xpand are the following [37]:  
* It provides distributed SQL capabilities and is ACID-compliant;
* It is highly available due to maintaining replicas of each slice (logical representation of data that are saved in a partition of a disk, which contains pieces of user database and tables), allowing to recover from a node failure without losing data;
* It can maintain multiple replicas of each slice and is zone-aware, allowing to recover from multi-node failures or zone failures without losing data;
* Its rebalancer maintains data distribution, meaning that a node or zone failure causes the creation of new replicas for each slice, and the rebalance then redistributes the data;
* Performs operations in parallel through the nodes to have the latest data;  
Figure 3: Xpand Performance Topology.  
* It scales out because each node can read and write, plus reads are lockless. Writes do not block reads, and additional nodes can be added to increase capacity. However, MariaDB Xpand also has the following limitations [37]:
* Difficulty with migrations with modern software;
* Recovery of crash from data replication takes too long;
* No option to export stored procedures' query results. Overall, MariaDB Xpand is a SQL distributed database that allows scaling out without much difficulty, with the ability to access data through computers around the world. On the other hand, it has limitations in analyzing query performance and in the ability to migrate data with modern applications.