Current Project

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

Introduction

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.

Introduction

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 greatly ...

Snap! Catch2

The Catch2 logo from the catch2 project.

Many of our C++ test make use of catch.hpp which is a standalone C++ header allowing us to very quickly develop unit tests against our code.

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

Introduction

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.

Download

The source is available on github in our project git.

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

Zipios

Zipios Logo

Introduction

We maintain the Zipios library. This is a C++ library one can use to read or create 32 bit zip files. The advantage of this library is that it offers standard C++ streams to copy the data. The main stream gives you information about each file and you can create a sub-stream for each one of those files. The input is automatically compressed and the output automatically decompressed.

snaplock

Lamport Algorithm in my book about "Distributed Systems: an algorithm approach" -- click to check out  the book on Amazon.com

Chapter 7. Mutal Exclusion — Lamport's solution, also called the Bakery Algorithm (p. 130)

Introduction

The snaplock project is part of the snapwebsites environment. It is a daemon written in C++ allowing you to lock various resources on an entire cluster of computers for a small amount of time. A resource has a URL which is what we use to create the lock (we call it the Object Name.) The URL can be global to the whole cluster, specific to a website, or even specific to one special variable in a specific page of a specific website (in other words, very small granularity is ...

snaprfs is a daemon used to replicate files between computers on your Snap! cluster.

This is somewhat similar to what Hadoop is expected to do.

There are several capabilities as described below.

Synchronize Directory

Keep a directory synchronized by copying the newest version of a file to all the other computers that do not already have it.

This is used by the snapdbproxy to manage the directory holding all the tables.xml files describing the Cassandra database tables (with table name, usage, and column definitions.)

snaprfs keeps the files meta data in place (i.e. stat() information, ...

Introduction

libaddr is an easy to use C++ library that parses IP addresses to C structures and C++ objects. This includes parsing one or more IPv4 and IPv6 addresses, with a port or a CIDR mask.

The library also includes functions to list interfaces (i.e. "eth0", "eth1", etc.) and your route tables (see route(8).) The library actually includes a tool, ipv4_routes, one can use to list routes as the libaddr sees them.

CSS Preprocessor Logocsspp

CSS Preprocessor (csspp) is a scripting language that transforms advanced (extended) CSS code into a script that browsers can read.

The input to csspp can be the same as standard CSS, or it can use extensions as described below such as using basic math, embedding rules in other rules (cascading by nesting) and many other things.

The project offers a C++ library that can readily be used in your own C++ project and a command line tool.

Syndicate content Syndicate content

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

Contact Us Directly