May 28, 2013

SSH must-haves for Productivity

Filed under: Development,FOSS,Linux,Uncategorized — mifan @ 9:21 am

Devops work with many different remote systems at once. For the lazy bunch ( a.k.a the truly productive bunch who look for ways to make their work easy – a.k.a the really bright ones ) there are ways to make life easier.

So instead of typing

ssh whitewizard@

(or wait, was it, and then entering the password that no one can remember given to us by the sysadmin, I’d now say

ssh devserver

and voila.

The steps to get there are:

SSH Passwordless Entry

Step one is to get rid of those pesky passwords required each time you SSH into a host. This can be achieved by setting up an RSA (public/private key). And besides, who’d say no to added security?

To generate a SSH key if you don’t have one already, run

mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa

You will be prompted for a location to save the keys, and a passphrase for the keys. This passphrase will protect your private key while it’s stored on the system.

Generating public/private rsa key pair.
Enter file in which to save the key (/home/b/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/

Your public key is now available as .ssh/ in your home folder.

Next, the little bit of magic where you’d copy your key over to the remote/host machine. If you can SSH into the machine, then this should be no problem. Run

ssh-copy-id whitewizard@

Done. You can now login by saying

ssh whitewizard@

And the system shouldn't ask you for a password.

SSH Hostname Shortcuts

But wait – we want more (or less, actually). The next step is to shorten this further. For this create a file .ssh/config with the following entries:

Host [shortcut]     
 Hostname [full-hostname]    
 User [username]

I’d use

Host devserver
     User whitewizard

And voila, now running the following will log you into the system

SSH devserver

Of course, replace the above hostnames and usernames with you own – else you’d be login into Saruman’s own server!

May 2, 2013

Real time Complex Analytics for Football

Filed under: Development,WSO2 — mifan @ 6:54 pm
Tags: , ,

Srinath recently wrote about the use of WSO2 CEP for the ACM DEBS 2013 challenge on Real time Complex Analytics which was a real eye opener. The challenge, enabled by sensor networks on player’s shoes, the goalkeeper and the football, was to conduct real time analytics on a football game, and provide useful analytics and real-time reports to the managers.

The post describes the usage of WSO2’s Complex Event Processor (CEP) which was used to implement the use cases of the challenge – namely Running analysis of the players, Ball possession analysis, a heatmap of player locations at various times and shots on goal analysis. CEP is a high performance and scalable event processor that can read streams of ‘data’, extract meaningful events and process them real time in memory – this means the ability to process large amounts of events, fast! In this case, continuous steams of data and events would be fed into the system via the various sensors, at a rate of 15,000 position events per second, whilst the player sensors and the ball sensors output events at a rate of 200MHz and 2000MHz respectively. According the blog, WSO2 CEP processed 50,000 events per second, which is quite impressive.

Just imagine the possibilities such an implementation can provide to the game – I’m awaiting the day when the TV alerts me, possibly 2 seconds before the event, that Robin Van Persie’s shot would have a 99% chance of finding the back of the net beating Petr Cech – based on analytics of the kick (the curvature , wind speed, rotation) and analytics of the defense (the distance of the goalkeeper and probability of him reaching the ball based on historical data, the distance between defenders). Or based on Theo Walcott’s speedy run and Carzola’s immaculate pass, as well as the position of the defense and the keeper, Walcott would end up with the ball beyond the defense in an on-side goal scoring position in the next 3 seconds – the mini siren on the TV goes off, telling me to watch the screen for the next 5 seconds (of course, that is assuming my reaction times are good, let alone the goal keeper’s). And I can hear us hard-core fans of football saying – “who would take their eyes off a football game anyways?”, but what if!

Minority Report for football, anyone?

XKCD Future Comic

Future (Source: XKCD)

Blog at