Blogs

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

I cannot comment?!

Actually, you can comment on newer blog posts when they occur (i.e. infrequently!)

But we otherwise turned off the comment feature because 99.9% is not constructive (yes, spam.) So there is no point for us to support such. Plus SourceForge.net has a better feature with their tickets which (1) rarely transmit spam (actually I don't recall receiving any in a long while!) and (2) we can track the conversations as separate threads.

So this website automatically closes the comments on pages that are a few months old. After that, no more comments. In other words, pretty much all of the ...

The libQtCassandra library has had a bug that would create a cell when testing for its existance. This has been very annoying because I had to use a different mechanism to check whether a cell exists instead of calling the simple and effective QCassandraRow::exists() function.

The function would call the table function necessary to read the content of a cell in the Cassandra cluster. The function returns true or false. If false, the data was not retrieved and thus the cell does not exist. However, the row function was not testing the result and a couple lines below it would do a setValue() ...

With version 1.4.0 of the libtld we bring to you one additional feature in Internet identifier verification: check that a list of email addresses is indeed valid.

If you search for a way to verify an email address then the libtld is your solution. It will not only check that the email address is valid (only include characters that are acceptable as per RFC 5322,) it will also look at the domain name TLD and verify that the specified domain is indeed valid.

Along the way we also worked on getting the library to compile with Visual Studio 10+ and Cygwin so you can make use of it under ...

The libtld was finally updated to include the newest world wide top-level domain names added in the last 12 months or so.

The library also better supports exceptions such as .uk and includes a few corrections.

Along those corrections came some additions to the documentation as we now support a C++ class which will really ease the use of the library for C++ programmers since it uses std::strings instead of char *. Although at this time it only supports UTF-8 strings.

The library also includes the necessary code to support a PHP extension so the power of the tld() function is now painlessly ...

As I was working on the Lock implementation in our C++ Cassandra library, I ran in a rather weird problem. The test would fail as many processes would not obtain the lock in time.

Looking at what was happening, even though I use QUORUM as the access consistency level, I could see that some of the test processes would attempt a read of the table and get nothing (0 columns returned!) even though the other 6 or 7 processes already wrote their information in the database.

After looking for a while, I finally found out that the problem was not Cassandra per se, nor the JavaSDK, nor the Cassandra ...

WARNING: This implementation of an inter-process, inter-computer lock works with Cassandra only if you know that you are directly dealing with a single Cassandra node at a time. The Cassandra C++ driver (probably all the drivers) makes use of a set of threads to connect to several Cassandra nodes and if the load of the current thread/node pair becomes too large, it will automatically switch to another thread/node pair. This means your messages may not be received in the order you sent them to the database cluster. As a result, the lock mechanism described below will not function as ...

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

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

Contact Us Directly