This section will cover the advantages of Rell and its position within the Chromia platform.
Release notes for Rell can be found here.
Most dapp blockchain platforms use virtual machines of various kinds. But a traditional virtual machine architecture does not work very well with the Chromia relational data model, as we need a way to encode queries as well as operations. For this reason, we are taking a more language-centric approach: a new developed language called Rell (Relational language) is used for dapp programming. This language allows programmers to describe the data model/schema, queries and procedural application code.
Rell code is compiled to an intermediate binary format which can be understood as code for a specialized virtual machine. Chromia nodes will then translate queries contained in this code into SQL (while making sure this translation is safe) and execute code as needed using an interpreter or compiler.
Rell has the following features:
- Type safety / static type checks. It's very important to catch programming errors at the compilation stage to prevent financial losses. Rell is much more type-safe than SQL, and it makes sure that types returned by queries match types used in procedural code.
- Safety-optimized. Arithmetic operations are safe right out of the box, programmers do not need to worry about overflows. Authorization checks are explicitly required.
- Concise, expressive and convenient. Many developers dislike SQL because it is highly verbose. Rell doesn't bother developers with details which can be derived automatically. As a data definition language, Rell is up to 7x more compact than SQL.
- Allows meta-programming. We do not want application developers to implement the basics from scratch for every dapp. Rell will allow functionality to be bundled as templates.
Our research indicated that no existing language or environment has this feature set, and thus development of a new language was absolutely necessary. We designed Rell in such a way that it is easy to learn for programmers:
- Programmers can use relational programming idioms they are already familiar with. However, they don't have to go out of their way to express everything through relational algebra: Rell can seamlessly merge relational constructs with procedural programming.
As mentioned, Rell is a language designed for relational blockchain programming. The structure of a decentralized application built in Rell will look something like this:
The end user will be communicating with our client side, which in turn will send transactions to Rell using a postchain client.