Snap! Manager

Introduction

WARNING: We are in the process of replacing this tool with snapmanager.cgi and snapmanagerdaemon which together allow an administrator to manage his cluster of computers. We already installed a 12 computer cluster with these two tools. At this time, the snapmanager is still necessary to setup the domains and websites tables, but that too will be converted to an interface accessible through snapmanager.cgi.

The Snap! Manager graphical tool was created in order to setup the basics in the database. This is important because without those basics snapcgi and snapserver do not know ...

Introduction

Advanced getopt, the C++ libraryThis project is an advanced getopt() class to use with your C++ projects. It handles most everything that GNU-like tools offer as far as command line options go.

The main idea is for you to have as little to do as possible parsing your command line arguments and configuration files. The library expects a table of available options with a short and long version of the options, and whether they accept arguments (i.e. -f <filename>).

In your C++ program you can the just check whether a parameter is defined or not with the is_defined() function and get the value as a ...

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

Browsers sends us a string called the User Agent designation. A server can use that User Agent string to determine what browser is used to access the site, including the version and different features that it supports or not.

Using the User Agent information, we can define the name of the browser (Internet Explorer, FireFox, SeaMonkey, Chrome, Safari, Opera, various smart phones, etc.) and the version of the browser used. This information can in turn be used to determine which files to send to the browser to make it work better.

For JavaScript and CSS files we can use that information to ...

As I upgraded my computer to 13.10, I got errors from Cassandra which seemed strange. That is, Java was failing saying that Cassandra wanted more heap that was made available to it.

I was rather surprised since I had not changed anything in Cassandra. However, thinking about it, the heap offered to Java to run Cassandra is defined as the total amount of RAM available divided by 2. And since I'm running a new kernel, I would imagine that this new kernel uses more RAM. Notice that since the math used is:

Amount of Mb available / 2

If your kernel makes use of another 100Mb to run, you ...

As you use Cassandra, once in a while some of the tables they handle will get corrupted. In most cases, I think that happens when I restart my computer without first killing Cassandra. One problem with Cassandra is that it may take seconds between the kill command and Cassandra actually exiting. If you shutdown your computer, the kill sent to command waits something like 1 second before sending a -9 (i.e. actual KILL signal instead of just TERM.)

The result is that it may leave some files (tables) in an unknown state. These files can be deleted though, but you have to be careful. Make sure ...

As we work on the implementation of Snap! we have many entries in our reference that are directly in link with making the website perfect in terms of search engine optimization.

For example, supporting as many meta tags (see Meta Tags and Links supported by Core) as possible allows you to properly and fully define your content and making it easier for search engines to quickly index your page as you would expect.

See also: Meta Tags and Links supported by Core

See also: Contents Statistics feature (including 3rd parties such as Google Page Rank)

See also: Express Support for Firefox Reader addon (what a search engine is likely to see)

 

The following is an ...

Facebook sharing

The Facebook sharing is made preferably using the og namespace tags. That works best because that way the Facebook scraper can find the information you want to have them used to share your documents. Snap! will allow you to choose the image, description, title, etc. that you want to show on Facebook (although by default this is fully automated with proper defaults.)

The documentation available on Facebook is actually very good in regard to the og namespace. There is also a full website about og and all its extensions. They have two important nodes under "bad practices":

  • Do ...

C-like Expressions

The snapwebsites library includes a parser (yacc like tool) which can be used to generate grammars and thus support different mini-languages that are used internally by the Snap! system to enhance the capabilities by letting end users enter really advanced expressions or definitions.

For example, the domain and website definitions make use of a mini language that allows for a set of domains, a set of websites and each include a set of parameters with optional data.

One extension that is part of the library is support for advanced C-like expressions that are linked to the Cassandra database. ...

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

Contact Us Directly