Koa Seeks to answers some of Nodejs challenges

The fervent apostles Nodejs have been very loud promoting server-side JavaScript. And indeed it is light weight, and fast/responsive by avoiding thread blocking by having callbacks passed as the last argument.

However beyond demos when writing 'real' applications you quickly end up indented off the right hand margin. In a sane light there is a huge challenge in readability and maintainability of nodejs applications.

There is also an incredibly active community, including Koa is an expressive middleware for node.js using generators to make web applications and APIs more enjoyable to write and read.

An example: the app.callback method returns a handler that is compatible with Node’s http.createServer method, and uses co:

app.callback = function(){
  var mw = [respond].concat(this.middleware);
  var gen = compose(mw);
  var fn = co(gen);
  var self = this;
  return function(req, res){
    var ctx = self.createContext(req, res);
    onSocketError(ctx, ctx.onerror);
    fn.call(ctx, ctx.onerror);

This example is from Koa’s source, and allows the following to work:

var koa = require('koa');
var app = koa();
// Equivalent: http.createServer(app.callback()).listen(3000);
2014/01/22 01:23 · Richard Donovan

Up in Arms for Lower Power Services

Boston Limited experts in lower powered servers unveiled the latest release of Viridis Microserver range. Powered by ARM Cortex A15 quad-core processor. Based on six EnergyCore ECX-2000 cards, the Boston Viridis 2.0 hosts two four-core SoC’s (Server-on-Chip) running at 1.8GHz and consuming as little as 6 Watts of power.

The ARM Cortex A15 quad-core processor, ECX-2000 delivers twice the performance, three times the memory bandwidth, and four times the memory capacity of the earlier ground-breaking ECX-1000.

It is highly scalable thanks to the integrated 80GB Fleet Fabric switch. The embedded Fleet Engine simultaneously provides out-of-band control and intelligence for autonomic operation and power optimization.

2013/11/29 00:43 · Richard Donovan

Details of Cassandra 2.0 Revealed ..

Cassandra has been the wildly popular key value (nosql) database due to it's performance and scalability. The announcements for Cassandra 2.0 claim offer more traditional database features as well as means to integrate with large event processing engines.

These features include:

  • Lightweight transactions allow ensuring operation “linearizability” similar to the serializable isolation level offered by relational databases which prevents conflicts during concurrent requests.
  • Triggers which enable pushing performance-critical code close to the data it deals with, and simplify integration with event-driven frameworks like Storm
  • CQL (Cassandra Query Language) enhancements such as cursors and improved index support
  • Improved compaction, keeping read performance from deteriorating under heavy write load
  • Eager retries to avoid query timeouts by sending redundant requests to other replicas if too much time elapses on the original request
  • Custom Thrift server implementation based on LMAX Disruptor, a high-performance inter-thread messaging library that achieves lower message processing latencies and better throughput with flexible buffer allocation strategies
2013/09/05 01:23 · Richard Donovan

Kickstarter $99 Super Computer Beings Shipping

Adapteva announced that the first “beta” units of the 16 core 'super computer' are being shipped to the early kicstarter 'developer' backers. Other backers are said to receive their boards by summer's end “after some final refinements.” parallella_beowulf_crop.jpg

Also Adapteva has now opened up general pre-orders for the 16-core version on its website. While all Kickstarter-bought boards will bear a Zynq-7020 SoC, new pre-orders are configured with a 7010 as standard,

However, newcomers will receive “Gen-1” boards, which will offer slight improvements over earlier versions, such as reduced power consumption and an added serial port three-pin header.

The basic 16-core board going for $99 on the online store , with an expected October delivery date. The company tells us the 64-core version will also be available for public consumption, with pre-orders beginning in Q4 this year.

Disrupting the distrupters, migrating from MongoDB to Cassandra

In Sun Tzu terms tech is like fighting in a marsh, where you have to keep moving or sink.

It wasn't that long that MongoDb was the disruptive technology. Now a blizzard of noSql db's are disrupting the disrupters. Google's Sergio Bossa the reasoning for moving from MongoDB to Cassandra:

  • the JVM, and we have lots of in-house experience on it.
  • It scales in terms of processing and storage capacity.
  • Its column-based data model gives us some advanced capabilities
  • Its tunable consistency levels provide greater control over high availability and consistency requirements.

As regards what made them look into a different solution:

  • We need higher resiliency to faults: MongoDB provides replica sets, but we’re experiencing lots of problems with replication lags and during replica synchronization.
  • For scalability: MongoDB global lock and huge memory requirements aren't already going to cope well with our growing data set.


For good measure he is not a big fan of Scala either http://thegeektalk.com/interviews/sergio-bossa/

2013/06/04 05:36 · Richard Donovan

Older entries >>