Snap! Websites Journal

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

As I was working with libQtCassandra for the Snap! project, I notices a problem in one of my queries. That's actually the only one where I used the reverse flag. This flag is used to ask Cassandra to return its data in reverse order. That works perfectly, on Cassandra's side, but not so well in libQtCassandra...

In order to allow the C++ array operator (i.e. the square brackets ([]) are overloaded!) in the libQtCassandra, I decided to make use of QMap to be able to quickly access the data. This means you can create a Cassandra context and then access data like this:

value = ...

As we are using Cassandra in our development process, we are encountering problems with it. Contrary to an SQL database, Cassandra is very light weight and can at times fail to the point where you cannot use a node anymore.

When that happens on a development system, we can simply delete everything and restart fresh. Fine.

However, in a production system, you're going to run into some problems if you lose a node and... that's the only node you have. In that case, you'd need a backup. However, the idea of Cassandra is to run many nodes to have automatic backups. If one node causes ...

As I'm working on Snap! C++, I have many places were I want to record a list of something.

Many times that list includes a reference to another column. Within the content table I use the links plugin to create references / connections.

So... Today I was enhancing the use of attachments to posts you make on a website. The actual files get saved in a table named files and I wanted to know who saved that file so I have a reference back to the content page. This will be useful when I want to file all the pages because, for example, the file is proven to be a virus.

If you're an SQL ...

Syndicate content

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

Contact Us Directly