Snap! Websites Journal

As I got a 3 node Cassandra system, I can test in an environment that is much more realistic than my one local node. As I tried writing a new test, I got an error saying that a table wasn't ready. Looking at how the Cassandra-CLI does it, I now understand why it waits after creating a table. It actually synchronizes the schema on all the available nodes in your current ring. If the schema differs on any one node, then the CLI waits and tries again.

The fact is that you can run any number of Create, Update, and Drop functions in a raw as you'd like (as long as they are not against the ...

When starting cassandra, it starts in the background, if it crashes or fails in some way, it may write the information on your screen, and it may not. If you setup the logs properly, it will be in the logs. However, until you get all those things right, you may have trouble starting Cassandra.

First of all, you can use the -f flag to start cassandra in the foreground, like this:

.../bin/cassandra -f

That way you should get the error information on your screen. From there you should understand what's wrong.

In my case, I had a first problem which was a crash. This was due to a stack ...

As I am working on an advanced Drupal website I found out that running heavy backend work on that site was quite a feat (i.e. the cron.php feature.) The fact is that some tasks require you to be an administrator. For example, if you want the system to automatically delete a page (called "node" under Drupal) then you need to be a user that can delete pages, otherwise it will fail (i.e. not enough rights.)

One simple way to palliate is to load a user with enough rights, proceed with the deletion, and then restore the anonymous user.

<?php
  [...]
  global $user;
  ...

I added some support for composite columns to libQtCassandra 0.4.3.

This allows one to read and write columns with composite names. This just means a way to read a column with optimized comparisons (i.e. if you include a 32 bit number, it uses 4 bytes in the table, whereas, using a name with a 32 bit number converted to hexadecimal would be 8 bytes, not counting posssible separators and potential for the separators to not allow easy constant sorting.)

Contrary to belief, the different part of a composite column name are not separated by colons. This is only in the CLI and many 4th generation ...

I'm working on an update of libQtCassandra so it works with 1.1.0 of Cassandra (and 0.8.0 of Thrift.) The update will also include additional tests and hopefully enhance the interface to support super-columns and columns with multiple names (a:b:c...) If time allows, I may even add counters.

Thirft

The compilation of the Cassandra interface with Thrift 0.8.0 did not compile as is. I had to make many fixes so that g++ compiled the output and changes to the libQtCassandra library too. It seems that Thrift removed a certain number of headers. It is also possible that the newer version ...

As I was checking some code, I though that I should write a note about good and bad practices.

When you create a table entry and want to use a form of status (or whatever other type of multi-state entry with a fairly small selection such as the sex of a person) you often think of using an enumeration or at least an integer. For a status, you could use 0 meaning off and 1 meaning on. Maybe you have a third status: 2, meaning it is on and shows a form to the user.

In general, this works as a great optimization. If you use a string such as "on", "off", "with-form", ...

My GPR (underlined)Today I finally released the Google Page Rank project (a Qt library extension and command line tool) as well as the iplock firewall tool.

I also created a page for the new project: libQtSerialization which is an XML serialization of data available in classes in a "compressed" way.

Google Page Rank

This library is written in C++ and works with the Qt framework. It captures the rank of your website pages and returns the result (or -1 if the page is not indexed by Google.)

The project includes a command line tool as an example of usage. That tool uses the library in a synchronous ...

The Snap! system is to make use of a lexx & yacc like capability so we can include fields that accept very complex expressions. For example, we want to support fields in HTML forms where you can enter sqrt(sin(20) * 3) and get the expected result.

At this point though, it is used for the domain names and website names. These are complex enough to justify the grammar. I'm to finish up the grammar of the domain and website implementations, but the grammar itself works. I have a test that checks that in detail enough to prove that it is now in place.

At this point, the domain grammar ...

Feeling like I need to write a note about the progress on the project.

If you have been around a little bit, you may have noticed that we added Projects on the website. The tarballs are actually available from SourceForget.net (which offers much bigger pipes for download!)

As we are moving forward, we are nearing a point were our basic installation will be available. We'll offer Snap! v0.1 once we get a full set of source packages that install properly in our Debian environment (we're actually using Ubuntu.)

At this point, we can receive requests from Apache and spit out a page, but ...

Syndicate content

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

Contact Us Directly