Getting Started

What is piladb?

piladb is a database engine, which means that it's a tool that provides mechanisms to store data in a certain way. In the case of piladb, this way is by piling Elements in Stacks, so you only have access to the Element on top, keeping the rest of them underneath.

Basic Concepts

An Element is a piece of data that can be pushed into a Stack, and has a JSON compatible format. This means that you can handle in piladb the following data types:

  • Number: 42, 3.14, .333, 3.7E-5.
  • String: foo, PilaDB, \thello\nworld, , 💾.
  • Boolean: true, false.
  • Array: ["🍎","🍊","🍋"], [{"foo":false}, true, 3, "bar"].
  • Object: {}, {"key": "Value"}, {"bob":{"age":32,"married":false,"comments":{}}}.
  • null.

A Stack represents a linear data structure that contains Elements, based on the LIFO (Last in, First out) principle, and in which only these operations are allowed:

  • PUSH: Introduces an Element into the Stack.
  • POP: Removes the topmost Element of the Stack.
  • PEEK: Returns the topmost Element of the Stack, but this is not modified.
  • SIZE: Returns the size of the Stack.
  • FLUSH: Delete all Elements of the Stack, leaving it empty.

Every Stack has a name and an unique identifier.

A Database is an entity that contains Stacks. So every Stack belongs to a Database.

We'll know as Pila the super object that will contain and handle all Databases, Stacks and Elements, as well as memory management, session handling and concurrent operations requests.

pilad is the daemon program, or server, that will initialize the Pila, exposing to external users an Interface to iterate with it: create Databases, create Stacks, PUSH or POP Elements, etc.

Database Model

As of now, piladb writes into memory only, and runs as a single server. This means that it doesn't persist data on disk and is not able to replicate its content to other piladb instances. If the server is shutdown, all data is flushed and it would require a fresh restart.

Every operation applied to a Stack has a O(1) complexity, and will block further incoming or concurrent operations, which ensures consistent responses within a reasonable amount of time.

results matching ""

    No results matching ""