Nucleoid is a runtime environment that is designed for declarative programming so that it executes statements based on formal logic in syntax of ES6 (JavaScript). This enables the runtime to provide logical integrity and store statements so that it doesn’t require external database.
The runtime accepts statements any time without requiring compile or restart.
Here is the simplest form:
> a = 1
> b = a + 2
> a = 2
> a
2
> b
4
Unlike in imperative language, when b = a + 2
is defined, Nucleoid creates data graph with connections among statements, so when a
is changed, b
is updated by the runtime.
This concept can be applied to objects as well:
> class User {}
> user1 = new User()
> user1.email = user1.username + "@domain.com"
> user1.username = "first-user"
> user1.email
"first-user@domain.com"
this is class level declaration of sample example, so this statement applies to all users:
> User.email = User.username + "@domain.com"
> user1.email
"first-user@domain.com"
Nucleoid runtime accepts all statements of ES6 and builds graph accordingly:
> m = false
> n = false
> if( m == true ) {
n = m && true
}
> n
false
> m = true
> n
true
Runtime as a database
Nucleoid runtime creates state of variable or object in memory, builds data graph and stores statement cumulatively on the disk, so that it doesn’t require external database, but it supports all database functions at the same time.
Install
Ubuntu:
sudo apt-add-repository ppa:nucleoid/nucleoid
sudo apt install nucleoid
Docker:
docker run -d -p 80:80 nucleoid/nucleoid
Once installed, open the terminal on browser:
See for more details at nucleoid.org/get-started
See the project at gitlab.com/nucleoid/nucleoid
Top comments (0)