Introduction Installation Projects Tables Inserts Searches Updates Deletes Production Installation Conclusion

Flaarum Tutorials Introduction

Why Flaarum?

  1. Autoscaling

    Autoscaling here refers to machine resizing during production to make room for more requests and to reduce costs when there is not much requests.

    Note that the method of autoscaling in use here would put off the machine, resize the machine and then start the machine. And also autoscaling is not supported for disks.

  2. Autoindexing

    Indexes are small pieces of answers to common searches. This makes any database avoid searching through every row of a table to find the information the search intents.

    One could explicitly declare an field 'nindex' to mean that it would not be indexed.

    The text type is also indexed but differently. Text is saved first and the control is returned to the user program. Then the flaarum.tindexer program picks up the text and starts indexing it for full text searches. It does not support exact searches.

  3. Table Expansion

    In most structured databases, joins are used when there is a relationship between tables (a store of information). This joins could be very complex especially if you want to join more than three tables.

    To illustrate table expansion, assume a table called aperson has the following fields: name, email, dob. And it used as three foreign keys in another table called family which has the following fields: father, mother and child.

    So with table expansion, a search that enables table expansion on the table family would yield the following fields:,, father.dob,,, mother.dob,,, child.dob

    Note some of the fields are excluded in this example

  4. Seamless Table Definition Update

    In most structured databases, especially when there is already data in a table; some table definitions would be rejected. This presents a problem during prototyping stage, and only uncomfortable solutions presents itself.

    To solve this problem, any table definition (or structure) mutation is stored in the database and is given a version number. This version number is stored in every row of the table. When there is a mutation, the version number increases and leads to new rows being stored with the version number.

    Then in your application, you could check if the row is in the most recent version. And if it is not you could inform the user that he/she needs to update his data.

    Table definition update besides changing table_type is allowed.


Flaarum only supports the Go programming language. Therefore the audience of this book is golang programmers.

Next >