Microservices

Tags

, , , , , , , ,

Microservices are a hot topic at present. But microservices is neither a standard or a specific technology. Like REST it is more a set of ideas. So what constitutes a microservices. The best description I have come across yet has been by Martin Fowler ( http://martinfowler.com/articles/microservices.html ).

We can focus down on a number of specific points that are central to the idea of Microservices:

  • the creation of small pieces of functionality that can be discretely deployed,
  • are connected typically by web APIs often using REST (but also seen using other abstracting protocols)
  • can be replaced with minimal dependency issues
  • microservices are typically built by small discrete teams usually in the range of 2-12 people (the so called 2 pizza rule)
  • services are usually orchestrated by dumb pipes (so publication/subscription strategies are often used, so the intelligence about how and what to do about each event is within the service not the orchestration).
  • design approach changes orientation from n-tier (presentation, orchestration/business logic, persistence) which could be described as horizontal separation to vertical separation where partitioning is functional/service centric (which internally may embody the horizontal partitioning but this is secondary and down to how the service delivery team wish to work).
  • Search service us running as their own CPU process – typically using container technologies such as Docker, Rocket, Spoon and Drawbridge
  • Any orchestration is dumb, the decisions of what to do and when to participate are taken by the service

The small container footprint (making the enforcement of the decoupling with minimal governance) means density of processes can remain high as the overhead compared to full VMs is a lot smaller but also means instantiating clean environments for fresh deployments and testing is very fast. This does not fit so well within many ESB environments such as Oracle’s SOA Suite as the pre-requisites create a substantial footprint that would need to reside within the container for the ESB (RedHat’s JBoss Fuse is one of the few exceptions if you consider the required footprint for Apache Camel for example).

However, some of the microcontainer principles can  be pursued within the larger ESB environments utilising capabilities such as :

These approaches allow you adopt the dumb pipe approach (you don’t want services directly invoking each other except in case of utility services otherwise a lot of inter service dependency will build up). Using a publish & scribe framework or simple service sequencing we should be able to exploit OSB, Weblogic MQ in an Oracle Context and Weblogic as an OSGI container (for discovering technical services). In line with the Microservices ethos it would more than legitimate to build Microservices with other tools and then use an ESB like SOA Suite to provide the technology for weaving the services together.

In a Redhat product set there are more options as the solution footprints are smaller. But you would consider Karaf (OSGi container), Active MQ,and simple uses of Camel to weave microservices together.

With cloud middleware, adopting the goals of microservices will become easier as instantiating fresh environments and deployment approaches will become more akin to those of containers – for example Oracle Integration Cloud Service (ICS) deployment is simply an import of a whole set of configuration and integration process information.

It should be noted that Microservices does fit better with a number of organisational and management approaches, such as:

  • dev ops – the build team carry the role of operational support
  • product centric rather than project centric life cycles i.e. the team exists as long as the product, rather than existing until all the current funded features are complete
  • works for build rather than buy delivery (buy is likely to introduce artefacts too large for a Microservice model).

Each microservice is likely to contain its own copy of data – potentially leading to greater data duplication – therefore data reconciliation checks and management thinking maybe be needed.

Oracle Cloud Integration – book

Tags

, , , ,

We’re progressing with our Oracle Cloud Integration book idea now that we’ve had some publisher interest. 1st cycle around defining the book should be submitted in the next day or so.  Will starting to write the initial chapters very soon. Exciting times as they say.

Psychology of Computer Programming

Tags

, , , , , , , , ,

A while back I read the book Psychology of Computer Programming by Gerald Weinberg – something of a seminal text, full of interesting observations on how people and environments can impact productivity of programming.  Anyone working within a development environment would probably benefit from reading.  But whilst I was reading the book, I did create a mind map of what I was reading which I have made available here.

PsychologyOfProgramming

Some Good Security Resources

Tags

, , ,

As a result of working my through several books (published and unpublished at present) I’ve come across a number of really useful security resources. So I thought i’d bring them together (as much for my own reference) as anything else. The following list provides a brief description of the resource and its link.

  1. SANS Institute (http://www.sans.org/reading-room/) site providing a alot of documentation security and research findings, in addition to more commercial arrangements such as training
  2. OWASP (https://www.owasp.org) guides on threat types and characteristics and guidance on developing secure solutions includes a training tool called webgoat
  3. CXOWare (http://www.cxoware.com/) – home of FAIR risk analysis process and guidance
  4. Metasploit (http://www.offensive-security.com/metasploit-unleashed/Main_Page) a site that provides free security training to help understand how hack attacks work. includes free tools
  5. RadioLabs (http://www.radiolabs.com/stations/wifi_calc.html) provides the means to calculate how far a wifi signal will carry. Important if you don’t want people parking up outside your home/office and hacking your wifi
  6. PolicyTool (http://socialmedia.policytool.net/) provides the means to create fair and reasonable polices for the use of social media in a work environment
  7. TrustedSec’s Atillery (https://www.trustedsec.com/downloads/artillery/) open source tool for detecting security attacks
  8. OSSEC (http://www.ossec.net/) open source intrusion detection system.
  9. NIST (http://csrc.nist.gov/) standards institute with a lot of information on security.
  10. CERT (http://www.cert.org/cert/) SEI’s security activities
  11. Stride (http://msdn.microsoft.com/en-us/library/ee823878) Microsoft’s threat assessment model

More TOGAF Training Tips

Tags

, , ,

Open Group TOGAF

That magical logo you can use once TOGAF Certified

A couple of my colleagues are preparing to TOGAF exams (and training). As is the case with these things the subject of tips, tricks and helpful resources come up.  I’ve blogged in the past on this, and now made those blog entries easier to find with a TOGAF category on my blog (https://mp3muncher.wordpress.com/category/technology/togaf/). But I also came across a couple of useful resources through the TOGAF for Architecture Linkedin Group. Particuarly a free Massively Open Only Course (MOOC) provided by an Australian University – https://www.open2study.com/courses/introduction-to-enterprise-architecture.  The MOOC contains almost 4.5 hours of video material – so it will give a solid picture (where as a Architecting the Enterprise training is 4 days) (note Architecting the Enterprise appear to have tweaked their branding now to AtE). In addition to this a couple of other sites / books that came recommended in recent LinkedIn discussions are:

Update: It is worth registering with Orbus Software‘s website (registration is free) as they provide a substantial number of resources on TOGAF like postes of each of the key phases which can be downloaded once registered.  In addition they have a number of blogs regarding EA, ITIL etc.

Berlin Snaps

Tags

,

Berlin Wall remnants panorama
Victory Column in Silhouette
Last week I was fortunate enough to be invited to Berlin to attend Oracle’s European Middleware Customer Advisory Board.  When I make international business trips, I’m always in a dilemma of do I take my SLR and extra lens which means luggage is going into the aircraft hold (so I can take a camera bag). Or just go with my little point and shoot Panasonic Lumix.  Well this time, I plumed for the later thinking that the weather in Berlin wouldn’t be that good, sites not easy to visit on foot in the odd hour or two free, and that the city wouldn’t be as impressive as it is.  So I am kicking my self now for not taking the SLR.  Someone really needs to create a SLR and lens camera sleeve solution that can fit into a laptop rucksack.  But our Flickr account has some ok shots.

My Book Contributions

Tags

,

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.

Latest Packt Publishing promotion

Tags

, , ,

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.

Jumpstart your understanding of Angular.js

Tags

, , , ,

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:

  1. Getting Started – Single Page Application (SPA) Intro 4:38
  2. Download & very basic SPA 8:13
  3. Directives, Filters and Data Binding 9:36
  4. Views, Controllers and Scope (MVC pattern) 24:00
  5. Modules, Routes & Factories 31:06
  6. Demo of the features introduced 1:03:28
  7. Summary 1:08:52

 

Push Notifications with a bit of Node.js

Tags

, , , , , , , , ,

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:

installErrorI 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:

npm-install

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:

external-tool-setup-0

 

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:

external-tool-setup-1

external-tool-setup-2 external-tool-setup-3

external-tool-setup-4

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:

Hello World in JDeveloper

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:

Node JS Calling Prowl

Our mobile device will show:

prowl-node-js-mobile

 

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.