Over-reactor

This is Ezekial Ox’s new band.  I’ve gotta admit to exercising some caution before jumping into following a new band he fronts given that Mammal and Full Scale both imploded or exploded… but like a partner in a bad relationship, still want to give this a shot, and any gig with Ezekial Ox is fricken great, as much as I’d want to pretend thats not the case, it just is.

So Over-reactor is the new band site.  It contains a whole bunch of demos.  The first track off their demos, “Best of Worst” has a killer intro, a sort of stoner rock/QUOTSA feel.  Speaking of which, the whole Over-Reactor does have that ‘Mondo Generator’ feel to it, down to the name, and the sound.  I’ve only heard 3 tracks so far though and their is the demo monkier to consider, but it was more than what I was expecting, and it is a big enough of a departure from the Full Scale / Mammal stuff to be refreshing enough.  Watch that space.

An introduction to jQuery

Everybody loves jQuery – well except for me, I wasn’t much of a web person myself until recently – but recent teaching in Grails have shown how jQuery can up the ante on interactive elements in your webapps.  Its been around for a while now and I admit I’ve been late to the party here, but heres a great resource I found recently to get up to speed: http://www.ryanjeffords.com/blog/entry/jquery-a-crash-course-for-beginners-part-1-an-introduction-to-jquery

CouchDB

Much like Neo4J I blogged about recently, there is also CouchDB from Apache.  CouchDB is a document database which isn’t a graph database like Neo4J, but what that exactly means I’m not sure yet – the purpose seem to overlap a fair bit. Both are aimed at the goal of no need to map objects to a relational schema and both claim to support the direct mapping of OO code to a DB entity.  Additionally both have REST api’s.

At this early stage, I will probably say that the Graph DB (Neo4J) provides data about the relationships between nodes, whereas the document DB (CouchDB) is a collection of documents with an ID and named fields – ok that is not much different from Neo4J other than the associativity type, direction and properties aren’t specified and each record must have a unique ID in CouchDB)

Unlike Neo4J, CouchDB is licensed under Apache License V2 so uptake will probably be easier for a non-open source project to consider.

More info for CouchDB is available in their Intro and Overview pages on their site. 

There was a recent BerlinBuzzwords conference which got mentions for interesting CouchDB and Neo4J talks.  Many twitter peers who attended tweeted to the fact that the presentations were interesting though they arent yet up.  The intent is that slides and vids should be up shortly for these.  It also inspired the InfoQ article that suggested that Couch could be used as a Personal Database, something that SQLite prevoiusly gets top honours for.

If this is true, then CouchDB sounds like a suitable small database for development uses that can scale up quite easily to other types.  The most important thing for me right now is that there is a Grails plugin to allow me to try it out. 🙂

Hyperic HQU Monitoring

As a software dev who worked with an ISP, I learnt monitoring is a big thing.  Customers have availability metrics we need to meet, and more importantly customers are paying for a service.  When it goes down, they shouldnt have to be the ones to call it up to let you know, and they should also find out about an outage as early as possible.  Well before their bosses come knocking on their door.  And regardless of size, monitoring is still a big deal for any sized company and support team, and glad to say of interest at the company I work for now.

In the last 12 months I’ve been getting to know the Hyperic Monitoring Platform.  It has an open source community edition with an automatic free barrier to let small teams monitor what is important.  Additionally it is easily configurable via a web UI, which allows non-technical staff to add monitoring, setup alerts and that sort of thing.  Most importantly it is configurable via an api (or two).  There is the HQ API which is a REST api, and the Groovy API. 

I haven’t need to venture into the API at all to date but did recently get asked the question if HQ was able to export views and reports.  The good news after watching this vid is that you can.

The interview with Jon Travis reveals that the API is not only capable of exporting its information, but it also allows developers to add screens into their HQ installs. 

Go back to REST

I like REST.  It seemed to gel with me more than SOAP did.  I think the overall simplicity of it, reduced the barrier to entry.  Whilst I love well defined schemas and protocols, SOAP got some of my most respected and senior colleagues bewildered and frustrated, realising that the real SOAPy world that promised vendor neutral interoperability between OS and even XML framework level didnt materialise.  Too many times at my previous employer, we were stuck between a rock and a hard place when one supplier wanted to use one form of XML serialisation, but we already had another framework in our classpath do deal with another suppliers (competing supplier funnily enough) that clashed.

So if you want to spread the word of REST, these resources seem to be ok:

Addressing Doubts about REST from InfoQ Explores: REST

Stefan Tilkov Talks REST, Web Services and More

Edit: Good news, the Jersey JAX-RS (rest api for Java) implementation v1.2 was released recently.  Jersey 1.2 User Guide

Lambdas are not closures

A λ (lambda) is an anonymous function. In addition to Closures, Oracle are looking at including lambdas in JDK 7, which would bring more functional goodness to the feature stagnant Java. This InfoQ article sums up the situation nicely.  It talks about the difference between lambdas and closures – a closure is a function that doesn’t rely on any external arguments – it is a closed function.  However, a lamda is an open function. 

λx. x + y   (open function, depends on y)

λy. λx. x+y (closed function, the inner open lambda is satisfied by y being supplied in the external function)

The former reminds me of Groovy’s closure currying

The proposed syntax looks something like this

inc = #(int x) (x+1); // single expression
inc2 = #(int x) { return x+1; }; // block

The rest of the article talks about the proposed syntax for lambdas and the concerns with implementing in various code constructs that potentially conflict with existing Java language syntax and rules.

Graph Databases

A great article on the NoSQL movement, focusing on Graph Databases and the Neo4J implementation appeared on InfoQ.

Graph databases store a Node (aka vertex), that has properties (aka attributes), that is then linked to another node.  The relationship (aka edge) between the nodes also has properties and has a direction and a type.

The article demonstrates that syntactically these databases look easy to manipulate. In Ruby (and presumably Grails) they map directly to classes and with the use of metaclasses and operator overloading, to allow the domain objects to be quickly in a neatly expressive way.   For Groovy/Grails/Griffon, there is info on the Neo4j wiki

Because OO models are graphs, the need for ORM layer is removed.  They map directly to the classes we are trying to store.  Additionally the pain of upgrading the data in a class is reduced since adding a new column is less painful.  More benefits can be found on the Neo4J website.

Neo4J is free for open source projects and there is an unsupported free single instance Basic edition for startups, but is paid for everyone else.  There are 3 commercial editions, basic, advanced and enterprise priced at $588, $5,988 and $23,998 per annum (billed as monthly subscription).  The free Basic is a good move, small companies who may elect a free alternative such as MySQL, Postgres or even the Oracle Express Edition.  For the Basic & Advanced editions, you could argue that the development time saved would more than cover the fees charged. 

The basic edition lacks monitoring which in my opinion should be included, especially if you are only going to get 2 support incidents per year with that package.  However the advanced edition has that feature plus monitoring, a management console and allows hot backup and failover to a 2nd running node. It only differs itself from the high end one due to lack of high availability features and longer support response times.  If you were using it for a production enterprise system, you’d probably want the 24/7 support and I think this pricing is comparable to a support subscription for any of the larger RDBMS vendors and with no upfront capex fees to note, though keeping in mind that at the enterprise level you’d be paying for multiple running nodes costs may run up quickly —- there is always negotiation though in this space.