This article was originally published in DZone.
Modex Blockchain Database (BCDB) is a software product designed to empower businesses by enabling them to develop and deploy blockchain software solutions. Modex BCDB falls into the middleware category, as it positions itself between the client’s software application server and their database. What sets Modex BCDB apart from its competitors is its approach to handling data. From the start, the brains behind this new innovative take on blockchain technology decided to employ a minimally invasive approach, in the sense that companies and enterprises keep their database system intact. Their proposed solution which later took shape in Modex BCDB modifies a set of connectors in order to link the database to a blockchain network, thus significantly enhancing storage capabilities.
What is Modex BCDB
Modex BCDB is the first middleware solution which manages to be both database and blockchain agnostic. Currently, other solutions present on the market are either blockchain or database agnostic, but not both at the same time. Modex BCDB doesn’t aim to replace the existing database but to improve it by adding a blockchain layer. By situating ourselves between the database component and the client’s software, we ensure a higher degree of security and trust, while giving access to a mechanism through which clients can create their own infrastructure. By adopting a modular design, Modex BCDB becomes truly agnostic in the sense that it to any type of database and blockchain. To push the envelope even further, can connect to different databases at the same time, as a result, clients are not obliged to change their database provider. Through Modex BCDB it becomes possible to build a distributed database network with different database engines. Distributed databases exist for some time, but our system allows developers to combine different databases and distribute them across different database engines. Another unique feature is how the system performs encryption through the master and the user key, as well as the fact that encryption can be performed selectively, at the field level.
Modex has adopted a plug-and-play approach, in the sense that any technical operations required to facilitate the transition to the BCDB framework are performed by the Modex development team. This approach means that all the heavy lifting is done by Modex dev team,, which means that clients need only to get familiarized with our interface.
Blockchain and Database Agnostic
The versatility of Modex BCDB stems from the agnostic design of the framework. On a deeper level, it can be observed that each node in the network can host a distinct database. As a result, one node can hold a NoSQL database such as MongoDB, while another node from the same network can host a SQL database. This layer of flexibility can prove to be invaluable to a consortium network, where multiple companies can synchronize their databases, without requiring to change their database providers.
As a result, the system becomes database agnostic, which implies that Oracle, IBM, Mongo DB, Microsoft SQL databases can synchronize with each other. Modex BCDB positions itself between the client’s application and database without altering data entries to facilitate communication with different types of databases. The entire application model is written in our middleware by our team of experts who will implement all the necessary changes.
Partial and full nodes
Another interesting feature which has its roots in blockchain technology is the existence of partial and full nodes which play a crucial role in data storage. The distributed nature of the framework and the partial and full node structures means that clients are not required to hold the entire copy of the database on their infrastructure.
The data can be copied to a single full node and distributed over multiple partial nodes across the network. Again, a consortium network with mixed databases can benefit greatly from this type of data organization. Partial nodes hold only a portion of the data which overall decreases the workload and storage requirements of the machine. While partial nodes hold only data from a company, full nodes store a copy of the entire database. A company can store all their database on a partial node and distribute it to other members of the network to ensure full data recovery in case of a breach. The blockchain network is responsible for live synchronization and real-time backup of data introduced in the network.
Algorithm for data integrity
Modex team has devised and implemented its own algorithm which automatically checks and validates data integrity. If a malicious user accesses the database and tampers with the data, admins will see in the blockchain that the digital signature does not match the signature from the database. In this scenario, the data is restored from nodes which match the previous states of the network.
Any type of data storage
From a storage standpoint, Modex BCDB enables any type of data storage, including file storage. With respect to this issue, the system displays a high degree of flexibility, as it allows the use of GRID file systems and easy upload on the blockchain of the digital signatures.
Record versioning mechanism
Another key-element which ensures data integrity and immutability is the record versioning mechanism. Every data record is stored together with their historical versions since their creation time. Read operation can be performed with a version parameter attached, which instructs the system which record version to retrieve to its caller. Record deletion takes place only at the database level, the actual record references and record hashes are permanently stored on the blockchain. Delete operations are also marked in the blockchain trail of historical versions, indicating exactly when and who deleted the record. The data storing mechanism is purposely designed to ensure GDPR and HIPAA compliance.
Data accessing mechanisms
When designing the system architecture, Modex team decided to build two separate networks: an authorization and a data network. As the name implies, the authorization network contains passwords and decryption keys. Since security represents a core value of Modex BCDB, the authorization network isn’t composed of a central server which stores passwords, but a separate blockchain network. Also, Modex BCDB employs a master key system where data is encrypted with two keys: the user’s key and the master key. The master key is designed as a safety net and it’s used only in extreme cases to decrypt data when a user loses their key. The authorization network can be configured to store only public keys and transform a user’s private key into a hardware token. To access the system, users need to use the hardware key, which can take the shape of a token or key-card. The master key acts as a fail-safe mechanism which allows admins to unlock the data if the private key is lost. The ingenuity behind this system is that to not give power only to one admin. Modex BCDB will never restrict a client’s software application to connect directly with the database.
Built-in OAuth2 server
When it comes to authorization mechanisms, the system comes with an built-in OAuth2 server, which is an authentication method similar to Google and Facebook. Developers can create a blockchain network with an OAuth2 server, and if their platform is widely known, they can implement login like Google, Facebook. In short, they can use their database users to authenticate to other applications. By default, OAuth requires permissions to read user data, but the Modex team has implemented a different route. We provide an OAuth2 mechanism through which we ensure that a user exists in the database, you receive a token, but you will never be able to access data from the system. This can only be achieved through our permissions API.
Nodes will only be started and accepted by the network if the system beneficiary licenses them. From the admin interface, licenses can be issued for each new node which is going to be added to the network. Modex BCDB offers clients the possibility to create new networks by granting licenses. The user who starts the network is also the owner, and they have the ability to expand the network by granting licenses to other nodes, for a determined or undetermined period of time. Through the license, the owner of the network is able to control the invited nodes, in the sense that they can disable and remove invited nodes.
Modex BCDB Subscription
Modex BCDB subscription was designed to function on a pay as you use model and comes in two types of packages, registered and unregistered. When the middleware is installed for the first time, the product is unregistered. This strategy is aimed at developers who wish to interact with and explore how the product functions. The first tier comes with allows for 25 000 transactions before requiring to register, the second tier is between 25 000 and 100 000, and the last tier, aimed at enterprises covers over 100 000 transactions. The number of transactions is related only to the data network, not the authorization network. Transactions represent every operation performed within the blockchain network which can be everything from table creation, modification, data insertions and so on. The third tier which specifically targets enterprises includes besides large volume transactions, consultancy and support from our team of experts.