Snap! Websites Journal

Introduction

In order to run tests against what looks like a real cluster of Cassandra nodes, one wants to create multiple nodes and run them in parallel and run their software against that cluster.

So, I decided to create two racks on two separate computers. Each computer runs 3 VMs each run one instance of Cassandra. The VMs are installed with the most basic Ubuntu server (i.e. do not add anything when offered to install LAMP and other systems), Java, and Cassandra.

Network

Local Network

It is possible to setup a VM to make use of the local network (LAN). VirtualBox will ...

Introduction

The following are instructions to get Cassandra installed on your servers.

You may also want to install Cassandra directly from a file distributed from the Cassandra website (if you want to work with a version on the edge.) In that case, the Java installation instructions still apply to you, however, the Cassandra installation then falls in your lap...

Table of Contents

Java

Cassandra uses Java so you want to install Java first. In order to get the latest version of Java directly from Oracle, you want to install the PPA update source as follow:

sudo vim ...

Just made a new addition to the project: snapwatchdog.

This is a daemon running in the background used to gather statistics about each server running in a Snap! cluster.

The statistics are saved in an XML file1 and already include the following information:

  • CPU usage
    • Average load for 1, 5, and 15 minutes
    • Total usage in User, System, Idle modes
    • Total count of Page Cached and Swap Cache
    • Time when the system was last rebooted
    • Total number of ...
  • 1. Ready to be processed by an XSLT stylesheet to present the results to the end user.

Snap! is being developed in a way which is quite different from many of the existing CMS.

One of the features is to move pages being deleted to a trashcan, in effect, not actually deleting the data from the Cassandra cluster, but keeping it in a different place.

Actually, the "move page" feature in Snap! does not move anything, it makes a copy of the existing data in the specified destination and marks the old data as hidden. It also links the old and new data together and time stamp them.

There are several reason for doing all of that work. First of all, the Cassandra cluster ...

There is yet another update of libtld. This time the effective_tld_names.dat file included many new gTLDs, even some that are not yet, but will very soon be official.

It also included many corrections to existing country domain names such as .uk which is now available as a first level domain name, and .ve which changed quite a bit too.

There are also a few domains that were removed (now marked deprecated) such as 4 .us and 2 .ru sub-domains.

As per the list from Mozilla, there are quite a few new sub-domains used as main domain names by various businesses such as a few amazonaws and a new ...

As you may know, ICANN decided to offer many new TLDs (top level domain names) and the available of those started in 2013. This is a second update of libtld with many new TLDs as of Sep 2014.

I added the following:

.accountants
.audio
.beer
.bio
.church
.claims
.credit
.digital
.direct
.global
.guide
.hamburg
.hiphop
.host
.juegos
.life
.loans
.place
.press
.productions
.reise
.surf
.website (we got snap.website, of course!)

I also added .loan in the proposed list. There are another 292 or so that have been proposed and that we could add to that ...

Cassandra is very light weight, contrary to a standard database, they coin the safety of your data on the fact that it gets replicated many times, not on the fact that it gets transported safely between you and its journal and the drive.

There is a huge impact to that light weight though. Once in a while, the tables, or more specifically, a node journal get mangled. When that happens, you can continue to use Cassandra for any data that appears before the mangled data. This gives you the impression that everything works, when in fact, something is awry in that node.

An interesting side effect ...

As the ICANN is adding new Global Top Level Domains (gTLD), we are updating our library.

Many of those names are already approaved, although many are not yet for sale. We added quite a few entries!

There are a few new professionals entries:

    .actor .builders .dental .plumbing .surgery

And they accepted a few language related TLDs:

    .cat .eus .gal

Also regions got their share:

    .aq .asia .berlin .cologne .eu .kiwi .london .miami .moscow .nagoya
    .nyc .okinawa .paris .quebec .ryukyu .saarland .tokyo .vegas .wien ...

When creating a dynamic website, the time it takes to create a page requires a proper (large enough) timeout or Apache will generate a 500 error even before the system has a chance to reply one byte.

Snap!, like many other content manager systems (CMS), will generate the entire page before sending anything back to the client. There are several reasons for doing this:

  1. The system is generating HTML which we want to compress before sending it to clients;
  2. The system likes to define the Content-Size header because it allows browsers to show clients how much of the data it already ...

As I work more and more with Cassandra, I bump in more and more side effects of how the system works.

Yesterday I noticed that I would always get new entries for a set of pages I create on Snap! websites. These pages had a parameter, a list of boxes, which could be empty because some theme do not allow any boxes at all.

Unfortunately, if I may say, Cassandra does not support empty data. That is, if a cell is set to an empty string (""), it is the same as deleting that cell. The problem with that is that the cell disappears completely. So the only way is to have at least one byte of ...

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

Contact Us Directly