WebSocket tutorial with Java server (Jetty) and JavaScript client

WebSocket is a web technology providing full-duplex communications channels over a single TCP connection. WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. In this tutorial we will use a Java server and a JavaScript client. We start with the Java […]

Visualizing Puppet manifest resources and relationships

Puppet allows you to generate .dot files that show the resources and relationships present in the manifest files that you have. To generate these .dot files without actually applying the manifest files, perform the following command: puppet apply /path/to/manifest.pp –noop –graph This will place three .dot files in the output directory for graphs, by default […]

Installing latest version of Puppet on Ubuntu

The latest version of Puppet can be installed on Ubuntu by adding the Puppetlabs repository and then installing the official Puppet package: sudo wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb sudo dpkg -i puppetlabs-release-precise.deb sudo apt-get update sudo apt-get install puppet This will install the latest official version of Puppet. Check the version by issuing this command: puppet –version At […]

Installing latest version of Puppet on CentOS

The latest version of Puppet can be installed on CentOS by adding the Puppetlabs repository and then installing the official Puppet package: rpm -Uvh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm yum install puppet This will install the latest official version of Puppet. Check the version by issuing this command: puppet –version At the time of writing, the latest version was […]

Setting Ubuntu hostname as offered by DHCP server

A DHCP server might be setup in such a way that it offers a hostname to its clients. By default, the Ubuntu hostname is set during installation and it disregards the one in the DHCP lease, but we can change this behaviour. Create a file in the /etc/dhcp/dhclient-exit-hooks.d/ directory, for example /etc/dhcp/dhclient-exit-hooks.d/sethostname and give it […]

Rebooting a stuck VM on XenServer

Sometimes a VM on XenServer gets stuck. Trying to reboot it from XenCenter results in the error message “Another operation involving the object is currently in progress“. There are some steps that can be taken to reboot the VM from the command line on the XenServer host itself. We start with the UUID of the […]

Analysis Cloud – Running Sensor Data Analysis Programs on a Cloud Computing Infrastructure

I presented a paper called Analysis Cloud –┬áRunning Sensor Data Analysis Programs on a Cloud Computing Infrastructure at the 3rd International Conference on Cloud Computing and Services Science (CLOSER 2013). Sensors have been used for many years to gather information about their environment. The number of sensors connected to the internet is increasing, which has […]

Running dynamic Java code

Using a Java library called Javassist it is possible to create class files on the fly and use them in the same program that created them. Sounds funky, and it is… First download the jar file from the JBoss download website. Then write a sample class file that will be edited by the Javassist library […]

Installing a Storm cluster on CentOS hosts

Storm is a distributed, realtime computation system to reliably process unbounded streams of data. The following picture shows how data is processed in Storm: This tutorial will show you how to install Storm on a cluster of CentOS hosts. A Storm cluster contains the following components: Nimbus is the name for the master node. Nimbus […]