Monday, August 24, 2009

Using BackgrounDRb

Since I'm having so many issues with BackgrounDRb, I thought I should write down how I'm solving issues - I expect some other people are also experiencing! ;)
I'm assuming that you have already installed it, but if not I wrote up some basic notes here.

Monitoring the task queue


# script/console
# MiddleMan.all_worker_info

This will show you what workers are available, and what if they are currently running.


From Code


#!/usr/bin/env ruby

RAILS_ROOT = '.'

#load required rails and backgroundrb files
require File.dirname(__FILE__) + '/../config/boot'
require File.dirname(__FILE__) + '/../config/environment'
require 'erb'
$LOAD_PATH << "#{RAILS_ROOT}/vendor/plugins/backgroundrb/lib" require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/lib/backgroundrb.rb" class BackgroundMonitor def test begin puts "Raw data:" puts MiddleMan.all_worker_info puts puts "Individual:" puts MiddleMan.all_worker_info.values.flatten.select { |w| puts w[:worker] puts " key = #{w[:worker_key]}" puts " status = #{w[:status]}" } rescue puts "Some kind of problem occurred..." end end end monitor = BackgroundMonitor.new monitor.test

Nybbl

Nybbl is an interesting product of the recent RailsRumble. Although still in its infancy it looks like it could be an interesting way of sharing knowledge about specific topics - some free, some not.

Access is currently through your twitter account, but once in you can have your nybbls' delivered through your iPhone, SMS, or twitter. I wish it worked for me, but at the moment I just get errors. Hopefully that will be fixed soon though!

Web 4.0 = Sentimental Web?

An article on the NY Times asks if the web is becoming sentimental, and can thus have "feelings". Personally I'm not sure, but if we're not careful then Johnny 5 will certainly be alive!

Looks like companies such as ScoutLabs are mining the entire social media landscape in order to provide services for their clients. These services seem to be geared to identifying the "mood" of customers, which presumably the companies then use to tweak their product offerings.

Interesting stuff.

RethinkDB

Came across RethinkDB which claims to be a new kind of database built upon MySQL and designed specifically for solid state drives. The benchmarks on their site look quite impressive.

Jeremy Zawodny of Linux Magazine has an article on it too in which he interviews one of the founders. It's interesting to note that they are essentially "lying" to the MySQL query engine in order to get it to perform on the solid state drives.

RuSh - The Ruby Shell

Do we need yet another shell? Well, apparently so as here come RUSH - the ruby shell. There's some quite neat things in that it fully understands ruby syntax, and the examples shown on the page look quite interesting. Will I be using it? No. I like the flexibility of bash, plus I like to choose what language I do my scripting in (right tool for the job and all that jazz).

I'd be interested to hear other peoples experiences though.

Cloud Computing Without errr the Cloud

Tonido is a cloud system for your home PC. Essentially it seems to provide a framework for remote working as long as you are willing to let your machine run 24x7. Nothing new there I think. Move along, move along...

(have I missed something here?)

Sunday, August 23, 2009

Installing BackgrounDRb

BackgrounDRb is a job scheduling library for the ruby programming language.

I had a right old ding dong with it when trying to install it into a rails app I'm working on, what with the documentation being a little out of date (I think) plus there being a load of confusing page on the net. In the end what worked for me was:

# sudo gem install chronic packet
# cd rails_app
# script/plugin install http://svn.devjavu.com/backgroundrb/trunk
# rake backgroundrb:setup
# rake db:migrate

So far this has worked for me...

The Demise of Social Micropayments

So, TipJoy have announced that they are shutting down citing the lack of support from the services that they are piggybacking onto (i.e. Twitter, Facebook, etc). Sad. I wonder how many open-source projects, charities, and such like will be impacted by this...

Multicore madness

According to an article on the register all of the major chip vendors are going to be releasing details of their new behemoths at the IEEE's annual Hot Chips conference next week. AMD will have 12 core offerings while Intel will talk about their 8 core models. Do we really really need all this power? Shouldn't we just trying to be more with less?

Modern coders and systems designers are just spoilt. They can just write the clunkiest code with no concern for memory usage and when the client complains they can simply say "buy more RAM". All the traditional skills required for coding (and doing it well) are going out the window, simply go out and buy "Learn xxx in 21 days" and that's all that is needed. Sheesh!

Also, given that there still aren't very many decent tools or languages for even leveraging the capabilities of the multicore processors they're simply a waste of heat and electricity (in general). So, c'mon Intel/AMD/others get them brains working around these problems too!

Unmanned Aircraft Being Touted. Again.

In an article on The Guardians website, they are once again starting the rumor of unmanned aircraft being the only option going forward. Haven't these people seen 'Stealth'!

Personally I can't see this happening anytime soon, especially not in the US where pilots are such revered people (TopGun any0ne!). I do agree that more and more unmanned drones, stand-off weapons, and loitering weapons will be circling overhead, but the military is still very much obsessed with the human-in-the-loop who has to be the one to press the trigger. After all, if an unmanned vehicle (of any kind) kills someone, who is responsible?

Saturday, August 22, 2009

Validating OpenCalais Output

It's possible to verify the JSON output returned by your OpenCalais queries by pasting it into the form on this page. Although it's interesting to note that it doesn't seem to be able to parse the example JSON output shown on this page. grrrrrr.

Debugging JSON

If you're not sure if your JSON output is correct, simply paste it into the JSON Lint page and it will tell you if it's valid or not. Sure beats trying to work out if your problem is rails or javascript, or something else!

Web Development with Firefox

As I am trying to do webby things with my Semantix project I needed some web based tools to help me debug my rather poor web coding skills. So for firefox (well, portable firefox really) I am using:

  • FireBug which allows you to debug css, html, javascript and the like.

  • JSONViewer which allows you to display JSON output nicely.

Friday, August 21, 2009

OpenCalais

OpenCalais is a semantic tagging toolkit that allows you to submit text to it for semantic querying. The toolkit allows you to extract meaning from webpages and content.

To use the public web service, post the URL-encoded license, content, and parameters to http://api.opencalais.com/enlighten/rest/. If successful, the response is an RDF/XML file. You can parse the file directly or import it into an RDF store.

Zombie Attack!

According to a post on the BBC news site some weird academics in Canada have researched how best to survive a zombie attack in your city. Summary: kill them quickly!

The research struck me as a little hokey to start with (but cool nonetheless), however there's no reason why this can't also be applied to "regular" epidemiology research. It's also a potential outlet for the nature inspired research work in which I have been engaged...

The paper itself can be found on the authors homepage.

Information Scraps

Came across the Information Scraps concept over at the JourKnow site @ MIT. I like the way they think and it seems to make a lot of sense based on how I think I create my own notes and organise my life. Certainly something to consider for my semantix project.