📜 ⬆️ ⬇️

GlobalsDB is a universal NoSQL database. Part 1

From translator
In my opinion on Habré, there is little information about the free GlobalsDB NoSQL database. The original article was written in August 2011 and is still relevant. Here is the first part. In the second part, it will be described how to use GlobalsDB to model various types of NoSQL-bases.

(Rob Tweed) Introduction

GlobalsDB is a free database that uses the Global Persistent Variables mechanism for storing data. variable values ​​which are automatically stored on the hard disk. They are an abstraction over binary trees (B-trees) and can be used to store large amounts of data represented as multi-dimensional sparse arrays.
')
With the help of Global Permanent Variables (usually called “globals”, which is why the base is called GlobalsDB), you can expressly and efficiently solve all the usual tasks for which it is customary today to use various NoSQL databases.

The heart of GlobalsDB is the same engine used in the Caché database .

The key advantage for developing on GlobalsDB is that GlobalsDB is based on an adult, proven and tested technology with repeatedly proven scalability and extremely high performance in such important and responsible areas of business as healthcare and financial services.

Unlike Caché, GlobalsDB is free to use, develop and distribute without any restrictions, which makes this platform very attractive (however, this is not an Open Source product).

This article explains how GlobalsDB can be used to model and store data of various types of NoSQL databases:


And how, as a result, get the maximum benefits: NoSQL-capabilities, coupled with performance, reliability and maturity, which are needed for critical business applications.

GlobalsDB can be accessed through a high-performance in-process API that is available for Node.JS (Javascript), .NET, and Java.

Commands to GlobalsDB are not transmitted via ports and sockets, which would slow down the work with the database, but directly by accessing the program code GlobalsDB from the application process. For maximum performance, the GlobalsDB process is authenticated to the application process.

Access from other languages ​​will apparently be implemented in the future.

In this article, we will use the Javascript interface from Node.JS to access the GlobalsDB.

Note: The globals in this article are not variables with a global scope. In terms of GlobalsDB, globals are structures for storing data.

A brief introduction to NoSQL.

The term NoSQL is just a few years old. It was coined to indicate storage technologies that meet the stringent requirements of a Web or Internet scale.

Simply put, here are three features of Web-scale:


Relational databases that have dominated since the 80s of the last century, when applied on a web-scale, began to show their weakness in these three areas. Therefore, the developers began to look for alternatives.

Demand creates supply: NoSQL database started to appear. Despite the variety of NoSQL database types, they all have the following common features:


All the most successful and best-known NoSQL databases have been developed from scratch over the past few years. Strange. It looks so that no one has looked for existing, well-implemented database technologies that could provide a solid foundation for working with Web-scale.

This article aims to demonstrate to you that GlobalsDB can be an excellent basis for creating NoSQL databases using existing, proven and tested technology.

GlobalsDB combined with extremely high performance Node.JS provides an ideal, powerful high-performance industrial platform for implementing NoSQL databases.

Global overview

Let me remind you again that by globala we understand structures for data storage, and by GlobalsDB a database built on globala.

Globals:


You may think that these are auto-conserved associative arrays and you will get far from the truth.

Some examples of globals:

myTable["101-22-2238", "Chicago", 2] = "Some information" account["New York", "026002561", 35120218433001] = 123456.45 

Each global has a name (like arrays have names). This is followed by several indices, the values ​​of which can be numeric or string. You can have any number of indexes. There is a restriction only on their total length, which is quite large.

Each element of the global (which is defined by the name of the global and a combination of indices) stores a text string. Blank lines are allowed.

You can create or delete global elements whenever you want. Everything happens dynamically and does not require any declarations or data schema definitions.

All high-level abstractions and data schemes are in the developer’s head, and the database is physically stored in globals.

Globals do not provide secondary indexes, therefore, to ensure high-speed search and queries, the developer must create and maintain additional elements in globals that will play the role of secondary indexes.

Globals are extremely versatile and can easily be used to simulate all 4 types of NoSQL databases with comparable or in many cases significantly superior performance:


The second part will show detailed examples of how to do this.

Performance like bases in RAM, integrity like bases on disk.

One of the main reasons for the extremely high performance of GlobalsDB is the intelligent caching mechanism that has been improved and optimized over the years in Caché, from which GlobalsDB inherited the database engine.

As a result, in most cases, global elements to which access is required are already in RAM.

Most NoSQL databases still have immature relationships between working with data stored in memory (for speed) and data placed on disk (for persistent storage and integrity) and vulnerable to cases where a node or shard server suddenly shuts down .

For comparison, in similar situations, Caché and, as a result, GlobalsDB behave much more reliably.

For decades, the Caché core has been developed and exploited in demanding areas such as healthcare, banking and finance. In these areas, performance, integrity and availability in a non-stop mode are fundamental.

The result of long-term development, debugging and testing has become the speed similar to the databases placed in the RAM and the data integrity inherent to the databases working with the disk.

The goals that defined and drove the development of the engine database inside GlobalsDB almost completely coincide with the goals of the NoSQL movement.

NoSQL database features

In 2010, TechRepublic published the post “10 Things You Should Know about NoSQL Databases” .

It contains 5 advantages and 5 weak points characteristic of NoSQL databases.

If we consider GlobalsDB from the point of view of this post, then all 5 advantages are inherent in it, together with the fact that it is more interesting, 4 out of 5 drawbacks do not apply to it, which other NoSQL databases cannot boast.

Let's go over these criteria.

5 advantages :


5 weak points :


Consider each advantage in turn:


As for the weak points:


By the sum of all characteristics, the free GlobalsDB database is an ideal candidate for businesses that need NoSQL technology, but it requires an adult, fast and reliable product.

A simple way to upgrade to a commercial Caché product gives you access to additional features and high-tech NoSQL functionality.

Simulation of various types of NoSQL databases.

Continued. Part 2.

Source: https://habr.com/ru/post/184882/


All Articles