Current Project

Cluster Lock (cluck)

The cluck project is our an implementation of a cluster wide lock mechanism one can use to obtain a lock and run code synchronously in a whole cluster.

Git repository:

Communicator Daemon

The Communicator Daemon is a service used to communicate between any number of nodes in any number of clusters, local (same LAN) and remote. The network connection can be plain text (LAN, fast) or encrypted (remote, safe).

The Communicator service supports a text message which has its own compact format. You may also use JSON if it makes it easier with your systems (such as a browser).

The daemon supports a basic set of system messages such as QUIT and CONNECT. It comes with a library that other services are expected to use to connect and manage their connection with the Communicator ...



Sitter -- tools to closely watch your serversThe sitter project is a daemon, plugins, and tools that can be used to watch a computer to make sure that it runs smoothly.

It has the ability to verify that a process is running. A service responds to a ping. That the memory is not maxed out. Ensure the disk drive is not close to being full. Etc.



The snapdev project includes a set of base classes and functions that are header only (a.k.a. inline). A form of std library, if you you wish, but mostly geared toward helper functions we use all over the place.

The following are the features available at time of writing. It is not unlikely to grow every now and then.


If possible, change the current user to the root user. Once done, RAII kicks in and switches back to what was the current user earlier.

This class can also be used to switch to other users. It uses RAII so it is expected to be used within a block of code, not as ...



Snap! Database — a diverse database system for the Snap! CMSThe Snap! C++ Content Management System makes use of a distributed database system called Prinbee.

The Prinbee system automatically duplicates the data saved in it, allowing for distribution of the data as well as automatic backup. It works within one data center, separate clusters, and large computers for backing up the data.

The database supports a JavaScript like language (see the as2js project) used for two main purposes:

  1. Verify that the data is valid for the column
  2. Generate a key used by indexes to sort rows as required by your application

Event Dispatcher

The Event Dispatcher LogoIntroduction

The Event Dispatcher library is a low level C++ library used to communicate between local and remote services.

For communication, the library supports TCP, UDP (direct and broadcast), Unix pipes.

The event part also supports events from Unix signals and the File System.

Each one of these objects can also be given a timeout date or an elapse time to generate ticks.

Most of the components of the Event Dispatcher library were developed in the libsnapwebsites library. It was detached from that library so we could make use of its powerful features in other projects.

C++ Thread


The C++ Thread project is the snap_thread.cpp/.h moved in its own project.

We also will include any multi-thread related code to this project as we find it in our other libraries.

The project allows for easy thread manipulation and communication which makes it really easy to add multitasking to your projects. It also includes a thread pool with workers which we want to ameliorate to allow for concurrent programming rather than parallel programming, very much based on the Go environment.


libexcept library logo

The Snap! C++ project makes use of exceptions whenever it bumps in a problem which can't be resolved at the time it is detected.

This model means that exceptions are usually fairly rare (once in a while we have a problem and generate problematic exceptions, but we tend to fix those quickly.) In other words, our exceptions are pretty exceptional. For example, a file can't be opened when it should, we are likely to throw a Run Time Exception.

As a result, it is possible for us to do something rather slow in our exceptions:

Collect a Stack Trace

This helps us ...

Snap! Catch2

The Catch2 logo from the catch2 project.

All of our C++ tests make use of Catch2, which is a  C++ framwork allowing us to very quickly develop unit tests against our code.

We have our own extensions1 in the snapcatch2.hpp file so we can very quickly create new tests with our standard set of command line extensions, verbose sections, etc.

  • 1. Some of which are now in Catch2 itself, such as comparing floating points for near equality instead of exact equality.


libutf8 to seamlessly handle UTF-8 in C++This project is a C++ library used to seamlessly handle UTF-8 strings. It offers very easy to use functions to convert characters and strings between UTF-32 and UTF-8.

The library also includes a string iterator to go through a UTF-8 string without having to first convert it to a UTF-32 string (which saves you a malloc() and free() and up to 4x the space the original string in memory saving.)

Later we intend to add support for UTF-16.


The source is available on github in our project git.

On Ubuntu, you may want to install it from our Snap! C++ Launchpad PPA. ...

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly