NetKernel News Volume 3 Issue 27

June 15th 2012

What's new this week?

Catch up on last week's news here

Repository Updates

The following updates are available in the NKEE and NKSE repositories...

  • http-server-2.19.1
    • Enhancement to RESTOverlay verb translation - SINK of httpRequest:/body now preserves metadata. Inside the target endpoint this can be accessed by using sourcePrimaryForResponse()
  • kernel-1.24.1
    • Fixed an XML escaping bug when a request contained prohibited XML characters (such as &)
  • lang-dpml-1.19.1
    • Added support for declarative request headers (see below)
  • layer0-1.87.1
    • Adds support for request headers to the declarative request (see below)
    • New interface added to INKFRequestReadOnly: List<String> getArgumentValues(String aName)
  • nkse-doc-content
    • Docs updated to reflect decl req changes

Layer0 Updates

Some enhancement tweaks to Layer0 were made this week...

Declarative Request Headers

We closed a loose end in the symmetry between the NKF API and the Declarative Request. You can add headers to a request - for example to influence cache behaviour - but to date you needed to use the INKFRequest API to do this. Tony has implemented headers on the declarative request, so you can now add them like this...

<header name="myHeader" sticky="true">
  <literal type="string">My Value</literal>

This capability extends to anywhere you might use Declarative Requests - for example in the mapper, DPML, xrl, trl, hrl etc etc.

The detailed reference docs are available here.

NKF API Enhancement

The INKFRequestReadOnly interface was enhanced with a utility method. When you have more than one argument with the same name you can now conveniently obtain an ordered List of all the associated argument values with...

/** Return a list of values of given argument
 * @param aName name of the argument
public List<String> getArgumentValues(String aName);

This change does not have any affect on existing NKF use. It is a convenience that combines what used to require use and filtering of argument by existing methods.


There's a patch in the kernel to prevent a potential exception when the XML serialization of a Resolution Failure is generated. This might have occurred if the unresolved request contained reserved XML characters.

Thanks to Jenna Pederson and Nick Spilman at BestBuy for reporting this.

O'Reilly "ROC with NetKernel" Representation Reified

Earlier this week, in an office in London, a small cardboard box was opened by a man wearing chinos, and the world changed...

Author Tom Geudens moments after receiving a physical copy of his ROC-with-NetKernel book

Well done Tom - great stuff! Retaining the "movie rights" was a masterstroke.

RDBMS Driver Modules

Two database driver modules have been added into for MySQL and PostgreSQL. These contain the current latest stable versions of the JDBC drivers.

These can be found on github at:

Prebuilt packages are available in the netkernelroc apposite repository which you can add to your system by following the process outlined at:

Intray Transport

The following article is likely to provide a significant enhancement to your career path, for, what follows is the secret of executive management...

No doubt, you all have, or have had, a boss? Did you know that you can tell when a boss is not merely a "boss" but is an "executive". How? Well they will have an intray on their desk, and, more often than not, to justify the intray, they will also have an admin assistant (aka secretary) to fill it with important documents.

The executive (nee boss) will take items from the intray, apply important thoughts to them - perhaps if they are really important write a note on the document or even create a new document. When the task is completed they will place the result in an out-tray for the secretary to deal with.

This is the daily operation of an executive.

A creative secretary - not wishing to be over-burdened with tasks and wanting to keep the executive fully occupied for the sake of the corporation's productivity might cleverly arrange to move the contents of the out-tray back to the intray...

This allows us to define the: Coefficient of Executive Quality or CEQ, as follows:

CEQ = 1 / number of days before executive realises output is coupled to input

Any CEQ > 1 and the person is destined for the boardroom. The median CEQ = 0.25

The CEQ is an important heuristic of corporate efficiency and replaces the now defunct and derided CEE (Co-efficient of Executive Efficiency), which you will recall simply measured the ratio:

CEE = outbox size / (inbox size + 1)

The CEE has been abandoned by all forward thinking management consultants ever since widespread executive social networking propagated the idea that their performance ranking could be easily manipulated by simply routinely moving their intray contents to their out-tray.

Surprisingly, in corporations where the adoption of this "short-cut" practice was prolific it has been statistically correlated with a fall in P/E and net increase in value of the company. Many economists are now questioning the entire validity of their methodologies.

Old Pattern but still useful

OK lets kill the whimsy and get down to useful ROC related information. The above description is an ancient pattern that any old Unix lag will know. Set a process monitoring a directory for new files, when one arrives process it and place the output in an output directory.

Although this sounds trivially simple, its actually a very flexible architectural pattern and the package intray-transport in Apposite is provided so that you can create systems like this...

When configured, an IntrayTransport will monitor a directory, when a file arrives it issues a ROC-request into its host address space. The request is configured as a declarative request in the IntrayTransport's configuration parameter. The request should be constructed to provide the file's URI as an argument. The space should be configured to resolve the request and so initiate some ROC-domain process with the file as the initial state. Eventually when a response is returned to the IntrayTransport, it SINKs the response to a file in the out-tray directory and DELETEs the file in the intray.

The documentation for the configuration is provided here.

The reason this came up is this pattern was required by Irena Muchnik at Zynx Health, but the docs don't provide a working demo of the configured solution. So to put that right here is a module that provides a very simple example to play with...

In a couple of lines of code this provides a fully complete "executive engine" that simply upperCases every *.txt file dropped into the target intray. It should be pretty simple to adapt to your own needs.

You'll notice that my file URIs to the in/out directories are quite simple (cos I use Linux), on windows you'll need to use something that looks like file:///C:/path/path/path/intraydirectory/ (notice triple slash at the beginning and also note the trailing slash at the end is significant since the URI is to a directory).

In setting up this demo I found a corner case in the implementation of the Transport that meant it wouldn't correctly source its config as a referenced resource. That's now fixed in the updated version in the repositories.

Note to Secretaries: If you have successfully trained your exective to use a computer but you are tired of moving the documents from the out directory back to the in directory you can very simply set up a symmetric pair of IntrayTransports with a nullop process - to endlessly loop the documents round.

Note to Executives: It can be a lot of fun to create chains of in:out directories. If you open up a set of file explorer windows you can drop a file in at the start and watch it hop between windows (at least you can with Nautilus as it reflects file changes automatically in the view).

Have a great weekend.


Please feel free to comment on the NetKernel Forum

Follow on Twitter:

@pjr1060 for day-to-day NK/ROC updates
@netkernel for announcements
@tab1060 for the hard-core stuff

To subscribe for news and alerts

Join the NetKernel Portal to get news, announcements and extra features.

NetKernel will ROC your world

Download now
NetKernel, ROC, Resource Oriented Computing are registered trademarks of 1060 Research

© 2008-2011, 1060 Research Limited