"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." (Robert A. Heinlein)

Tuesday, 5 August 2014

Neo4j and Java: demos with an embedded Ne04j graph


After my first experience in installing Neo4j graph database I decided to continue my experiments by writing a little Java demo program. The scope of my program just to learn how to connect to a Neo4j embedded graph, to generate ,connect and query some hundreds of nodes. Neo4j site and the downloaded manual provide plenty of documentation about interfacing with Java, and the other supported languages.

Project set-up

Setting up a Java project is quit simple: just matter of including all Neo4j libraries jars, available in the 'lib' folder, in the project class-path. To make easier future projects set-up I prepared, in Netbeans, a custom library configuration.


Wednesday, 2 July 2014

Test Drive: Linux Mint 17 “Qiana” on the EEEPC 900


Some time after Ubuntu release also Linux Mint has came out with its latest version: number 17 codenamed “Qiana”. Even if a little late since the release date I decided to give Mint Qiana a quick look by running it live on the EEEPC. I've been a Mint user for a while, what mostly interest me is to observe evolution of Mint desktop: Cinnamon. The EEEPC 900 is getting old and, even if it's still functional, Gnome Shell is getting less responsive every update. I was so thinking about switching to a lighter window manager.

First impressions

Here is how Linux Mint 17 looks like:

Saturday, 24 May 2014

Now something completely different: Neo4j


I've been interested in the variegated world of “NOSQL” databases since a while but I was mostly undecided which one start experimenting with. Most of NOSQL databases give their best in high data volumes, high availability, high scalability, “high everything” use cases. Going to test such databases in a realistic way is not an easy task. Testing them on a EEEPC while traveling by train is definitively impossible. I so concentrated my interest on “Graph Databases”: a kind of NOSQL databases designed to represent data tied by complex and deep relationships, hard to be described by the classic table form.

Neo4j

Among the many, Java based, graph databases the one that got my attention has been Neo4j. Two things made me decide for testing Neo4J: first Neo4J is embeddable in your Java project, the second is the huge amount of documentation and examples available at Neo4j site.

Installation

Installing Neo4j has been quite simple just matter of extracting the downloaded archive into a folder in my home directory (I have a “Projects” folder for this)
tar xv neo4j-community-2.0.3-unix.tar.gz
this is more than enough for a test installation or if you are going to use it only embedded in anoter Java project. Installing a Neo4j server would be a little more more tricky.
Neo4j service can be started by shell using the “neo4j” script provided in the bin directory:
cd Projects/neo4j-community-2.0.3/bin/
./neo4j start
at start it gives a warning about not running it in a Oracle Java JVM but during my tests it worked fine even with OpenJDK JVM. Of course fro a more intense use it'd better follow the suggestion and use the right JVM.
The same script can be used to stop Neo4j service:
./neo4j stop
User interface

Neo4j offers a web based user interface on the “http://localhost:7474” address. The web interface provide an easy way to send commands to Neo4j with the help of a good variety of saved scripts and examples available with one mouse click.

Saturday, 3 May 2014

Upgraded to Ubuntu 14.04 … (one way or another)

Ubuntu spring update has arrived, this year coinciding with Easter. As soon I had time I proceeded with upgrading my two computers. The upgrade process has not been as smooth as I'd liked but at the end I managed to have both computer up-to-date.
 

Acer Veriton S661

I started the upgrade process on my desktop computer and, after answering the usual initial “agree” and “confirm”, I left the computer unattended for the long file download part of the upgrade process. When I returned the computer had the screen locked and I couldn't manage to unlock it anymore. After many attempts I decided for the most drastic solution: forcing the computer to restart. The result has been the most drastic too: the computer refused to boot.
I've been so forced to download a Ubuntu disk image and proceed with a full installation. The installation procedure recognized, fortunately, the incomplete Ubuntu set-up and offered a “Reinstall Ubuntu 14.04” option. Re-installation from disk proceeded flawlessly and eventually I got my system mostly restored apart from some custom system files which have been overwritten.
Must be said that, since, I'm not new to similar problems, I have my home folder mounted on a separate partition. So, even if I need to format the boot disk, I have no fear for my data.

EEEPC 900

After the experience of upgrading the desktop computer I disabled the screen-lock on the EEEPC before starting the upgrade application. The upgrade process proceeded without any problems.
The EEEPC works fine with the new Ubuntu-Gnome release but it shows some odd error message during boot I never noticed before:
Sometimes, just after GRUB menu, it gives a worrying message about a malformed file, in addition it shows this message later during the boot process.
[drm:i915_stolen_to_physical] *ERROR* conflict detected with stolen region: [0x7f800000 – 0x80000000]
I'll check soon on the 'net for possible causes of these problems but I could also decide for a fresh install of the whole system.

Saturday, 19 April 2014