I’ve updated the page showing my active contributions to books during their development phase as a reviewer, the list can be seen at Book Contributions.
My Book Contributions
10 Sunday May 2015
10 Sunday May 2015
I’ve updated the page showing my active contributions to books during their development phase as a reviewer, the list can be seen at Book Contributions.
05 Tuesday May 2015
Packt are repeating the promotion that they ran earlier in the year where each day they give away a free ebook. The books so far are (at least from my perspective) a little niche – developing for Kinect for example. Go check it out each day until the 17th you might see something that works for you.
29 Wednesday Apr 2015
Posted in General, Technology
I came across the this video which does a good job of providing a technical overview of the Angular.js framework that is gaining a lot of attention, and uptake.
Although the video is 70 minutes long it is actually made up of several sections, the start points of which are:
16 Thursday Apr 2015
Posted in General, Oracle, Technology
Tags
API library, HelloWorld, javascript, JDeveloper, Node, node.js, npm, Oracle, prowl, push notifications
So I have written a couple of blogs about Push Notifications with a bit of Java (see here as the post that pulls all of this together). But this time we’re going to do something similar with Node.js. This blog entry is going to position us so we can then take a simple solution and push up to the cloud – as I use Oracle a lot then we’ll be looking at the Oracle cloud as a final step.
To start we need a local instance of node.js. Given the fact it is a small footprint we can pretty much install anywhere. So you’ll need to download Node.JS from the official site, and install it. I’m not going to walk through the installation guidance as it is well documented elsewhere (http://blog.teamtreehouse.com/install-node-js-npm-windows for example). You do want ensure you include the NPM capability (node.js packaging & deployment tool). Make sure that Node is on your path so we can reference the binary without a lots of file paths. You also want to ensure that node.js is up and running.
Next up is to the the Prowl API library that makes interacting with prowl simple and helps illustrate the deployment framework (NPM) used by node.js. So following the link from the Prowl website or go directly here and download the library. If you download the zip file as I did, you’ll find it has a folder called node-prowl-master. You need to unpack this and rename to node-prowl. and run the command
npm install node-prowl
When I first tried to deploy the Prowl API library then I did see an error. This isn’t the API but actually the Node.js installation (atleast on my Windows platform) as you can see:
I found googling using node.js and ENOENT showed up plenty of help to solve errors. In this situation the solution was purely to create the folder. Then re-running the action without problem.
When the npm command works you’ll see something like:
So hopefully in addition to the prerequisites described in this earlier post we should have everything ready to progress. So I’ve continued to use JDeveloper 12c, but using the general profile and set up a web solution project. This does create a large directory structure given we’re producing some simple Javascript. But the structure is right for a proper development effort, and lazy habits form poor practises – so lets work with it.
With the project setup, we need craft a little JavaScript. To we’re good to go – lets just try hello world, with a tiny twist, we’ll get the hostname using a Node library with this code:
// our very first node program
// get info about the OS
var os = require(‘os’);// say hello world and include the hostname
console.log(“Hello world, we’re running on ” + os.hostname());
Before we do anything else, lets be a bit clever, to allow us to run our Node script within JDeveloper. This can be done by adding a new Tool through the Tools –> External Tools … menu. Which will display the following screen:
Asa you can see in this image I have already selected New… and walked through the configuration screens, you’ll probably want to use a configuration similar to what I have in the following steps:
With this setup in JDeveloper with the Editor focus on our JavaScript, goto the Tools menu and you’ll see your Node entry. Just click on it. We’ll then see the results in the message window, as you can see here:
Alternatively in a command window you just need to run the command from the folder with the JavaScript (or include the path):
node helloworld.js
So lets take things up a notch and send our mobile device a message. So using the following code, we can use the prowl-api and initiate a message:
var Prowl = require(‘node-prowl’); // pull in the prowl API we deployed with NPM earlier
var prowl = new Prowl(‘your-prowl-key-here‘); //setup your API key
var now = new Date();
// ready to send the message, passing a function reference to handle the response
var message = ‘hello mobile device, the time is ‘+ now.toUTCString();
prowl.push(message, ‘NodeJS App’, prowlReplyHandler);//function to handle the response from the prowl API lib
function prowlReplyHandler ( err, remaining )
{if( err )
{
var errorStr = err.message;
console.log( ‘I have an error ‘ + errorStr);
}
else
{
console.log( ‘I said:’ + message+ ‘; I have ‘ + remaining + ‘ calls available’ );
}}
Note you’ll need to replace your-prowl-key-here in the above code with you genuine API key registered with the Prowl web app. Then we can run the application, and should see:
Our mobile device will show:
Next steps, in the next post – run through through a cloud hosting of node.js and extend the capability to be a simple service, which will mean packaging ourselves up and other exciting things.
10 Friday Apr 2015
Tags
Apache Camel, Apache Camel Developer's Cookbook, book, camel, mastering, Packt, Packt Publishing, review, SEDA
So aside from a horrible couple of weeks with everyone being ill and manic work loads. Its been busy time with the books.
The final chapter review for a new Packt book on Apache Camel (Mastering Apache Camel) went back. So I’d expect the book to coming out soon. I’d suggest this is a companion text to
the exceedingly good Apache Camel Developer’s Cookbook (which I’ve blogged about previously here). The new book approaches Apache Camel more from a pure development platform mentality rather than from the integrator approach. If you’re familiar with Camel basics or want to focus on realising good pattern based integration then start with the Cookbook. If you’re new to Camel and/or being asked to write custom Components or End Points then start with Mastering Apache Camel but go on to the Cookbook as it should show best practise Camel integration will be applied.
The Mastering Apache Camel doesn’t address advanced things such as SEDA which the Cookbook definitely does. The Mastering book does an excellent job of covering things like Unit testing (in part because the Camel capability has developed).
As one book wraps up, another starts, with a 2nd Edition of Java EE Development with Eclipse which I expect will bring the book upto date with the latest capabilities of Eclipse and take in the JEE updates upto JEE v7; we’ll see where this takes us.
17 Tuesday Mar 2015
Posted in Books, General, Technology
Tags
book, Cloud, Patterns, servicetech, ServiceTech Press, Thomas Erl
This book continues the very high standard we have come to expect from ServiceTech Press. The book provides well explained vendor agnostic patterns to the challenges of providing or using cloud solutions from PaaS to SaaS. The book is not only a great patterns reference, but also a worth reading from cover to cover as the patterns are thought provoking, drawing out points that you should consider and ask of a potential vendor if you’re adopting a cloud solution.
Phil Wilkins, Enterprise Integration Architect

Useful Links:
14 Saturday Mar 2015
Posted in Books, Technology
Tags
Ansible, automation, AWS, book, Chef, configuration, deployment, DigitalOcean, Docker, Hadoop, Packt, Packt Publishing, Puppet, Puppet Labs, review
This the final part of the detailed look at Packt book, Learning Ansible. As the book says in the opening to chapter 6 we’re into the back straight, into the final mile. The first of two final chapters look at provisioning of platforms on Amazon AWS, DigitalOcean and the use of the very hip and cool Docker plus updating your inventory of systems given that we have dynamically introduced new ones. The approach is illustrated by not only instantiating servers but delivering a configured Hadoop cluster. As with everything else we’ve seen in Ansible there isn’t a standardised approach to all IaaS platforms as that restricts you the lowest common denominator which is contrary to Ansible goals described early on. But deploying the Hadoop elements on the two cloud IaaS providers is common. Although the chapter is pretty short, I did have to read through this more carefully, as the book leverages a lot of demonstrated features from previous chapters (configuration arrays etc) which meant seeing the key element of the interaction with AWS was harder. It does mean if you tried diving into this chapter straight away, although not impossible does require a bit more investment from the reader to see all the value points. That said it is great to see through the use of the various features how easy to setup the provisioning in the cloud is, and the inventory update. Perhaps the win would have been to just so the simple provision and then the clever approach.
Chapter 7 focuses on Deployment. When I read this, I was a little nonplussed, hadn’t we been reading about this in the previous 6 chapters. But when you look at the definition provided:
“To position (troops) in readiness for combat, as along a front or line.”
Excerpt From: “Learning Ansible.” Packt Publishing.
You can start to see the true target of what we’re really thinking about, which is the process of going from software build to production readiness. So having gone through the software packaging activities you need to orchestrate the deployment across potentially multiple servers across a server farm. This orchestration piece is really just pulling together everything that has been explained before but also share some Ansible best practise. Then finally an examination of the Ansible approach for the nodes to pull deployments and updates.
The final piece of the book is an Appendix which looks at the work to bring Ansible to the Windows platform, Ansible Galaxy and Ansible Tower. Ansible Galaxy is a repository of roles build by the Ansible community. Ansible Tower provides a web front end to the Ansible server. The Tower product is the commercial side of the Ansible company – and effectively sales here fund the full time Ansible development effort.
So to summarise …
The Learning Ansible book explains from first principles to the very rich capabilities of building packaging software, instantiating cloud servers or containers through to configuring systems and deploying applications into new environments; and then capturing instantiated system details into the Ansible inventory. How Ansible compares with the more established solutions in this space in the form of Puppet and Chef is discussed, and the pros and cons of the different tools. All the way through, the books has been written in an easy engaging manner. You might even say wonderfully written. The examples are very good with the possible exception of 2 cases (just merely good in my opinion), the examples are supported with very clear explanations that demonstrate the power of the Ansible product. Even if you choose not to use Ansible, this book does an excellent job of showing the value of not resorting to the ‘black art’ of system build and configuration and suggesting good ways to realising automation of this kind of activity, in many place undoubtedly thought provoking
Prior Review Parts:
14 Saturday Mar 2015
Posted in General
“The end result is that, while designing your infrastructure, you want to make sure that you can bring up and bring down machines on demand and not allow certain machines to assume mammoth importance.”
Excerpt From: “Learning Ansible.” Packt Publishing. iBooks.
This material may be protected by copyright.
12 Thursday Mar 2015
Oracle Press are offering the Quick Start Guide to Oracle Query Tuning for free at the moment – register for the book at http://books.mcgraw-hill.com/ebookdownloads/solarwinds/
08 Sunday Mar 2015
Posted in Books, Technology
Chapters 4 & 5 of Packt’s Learning Ansible continue to build out strategies needed for enterprise class deployment and configuration management, for example error handling, rollback and reporting in chapter 4. As chapter, the amount of new Ansible capabilities being introduced is not as substantive as prior chapters, and emphasis is more only what could be described as best practise. For example creating Playbooks that have the means to be invoked to re-establish a prior state if the the execution of the current playbook was to throw up an error. The callback explanation does need a bit more understanding of how Python works as implementing a callback involves a little bit of Python coding, but the points into which you can hook actions is very rich.
From knowing how to trap callbacks it becomes possible to initiate notifications when events occur in playbooks which is where this chapter moves onto with monitoring and alerting. This really focuses on has my playbook executed as expected and reporting back through means such as email, nagios and graphite. The examples with email and nagios miss a trick, although the text says you can incorporate output from tasks – it isn’t illustrated; yet if something falters you’d want to see the task output.
Chapter 5 goes into how you might write your own custom modules and test them. Ansible will support any language that is available in your target environment, although Python is the recommended language given its general availability and is the language used to write Ansible, and Ansible modules can be leveraged to shorten the effort in creating custom modules. The chapter then walks through examples using Python, Bash shell scripting and Ruby. A lot of the work appears to be centred on extracting the appropriate parameters to allow the module to run with. The final part of the chapter looks at testing with the Python Nose library.
Solid chapters, and perhaps a little shorter than the first few, but importantly continuing to be well written although perhaps a couple of small missed opportunities to be great chapters.
Prior chapter reviews:
You must be logged in to post a comment.