Friday 16 January 2015

Microservices and the future in business enterprise software development

Business processing has evolved from being
  • Done by humans, to
  • Hardware, to
  • Machine code, to
  • Compiled, to
  • Intermediately compiled, to
  • Scripted 

At each step of evolution these systems becomes more and more interconnected.  Isolated mainframes evolve into micro-services that run on mobiles and the cloud. 

As the cost of implementing each component falls so does the need to invest in their planning and design, until you almost do not want to do any at all.  This ‘suck it and see’ approach, where the implementation is the prototype, and is eventually the published design, often gives the best results as experience is a valuable form of design feedback.  This reductive agile process is like chipping away at a piece of marble in comparison to an additive one when working with clay. 

This approach interestingly was done with great success by Russian rocket scientists with a fraction of the budget of the Americans.  E.g. plans for an efficient N1 rocket motor from the design bureau, only worked when the build engineers played with the designs, once perfected the design was sent back to the design bureau.  Although the rocket never went to the moon, the motors were successfully used decades later by the Americans.

This counter-informative way of doing things motivates developers as they can just get on with doing what they love: turning requirements into living code.  It results in smaller teams and depends less on software architects and project managers, in exchange for a more direct dialogue with the owner themselves.

Having said that if anything went then there would be anarchy, so some simple standards are required.   Code quality, agreed methods/interfaces for communicating between components, code reuse of standard sub components e.g. logging, database connectivity, email etc.  The number of rules need to be simple, clear and wherever possible automatically checked.   Scientist have found out that fish follow very simple rules to work effectively in a shoal, the same goes for micro-services.

The language that best suits this is JavaScript/Node, it is portable, lightweight and extensively supported.   However it being a bit of a rush job when first implemented, it misses many features that are considered best practice such as type safety.  Also as it is such a dynamic language key components can morph unexpectedly to express different behaviour when a new dependency is injected into an application.  However these issues are not insurmountable and the benefits easily outweigh them.  Also some of the weaknesses have changed the behaviour of developers considerably by actively encouraging them to use BDD/TDD unit testing at a much earlier stage in development that is usual in other languages, which helps in developing a higher quality product in the end.

The best thing of all is that it is not owned by any big corporation, which is allowing a very healthy ecosystem.  They have not come in and injected enterprise components that rot the heart of the language in the way that has happened to Java.  There are signs of a fight for the hearts and minds between mainly Microsoft and Google over type safe implementations of JavaScript, which will result in fragmentation for a while, however, in the long term will benefit all concerned.

Where does it leave legacy languages such as C++, Java and C#?  They will never go away, but will retreat into their particular niches.  In CloudMargin we use C++ for a database abstraction/caching/security/event service layer, due to its nature it needs to be multithreaded and is treated and developed more as a system component.  C# come as output from MapForce for doing data mappings from and to our client file formats.  Both the C++ and C# components have no business level functionality such as the JavaScript micro-services do, and do not take part in the same development lifecycles, they are valuable components, but do not take part in normal day to day business enhancements.


Software development undergoes waves of what is fashionable and certainly what is coming out now is a breath of fresh air.  However what is popular now will be as trendy as my father’s flares in a few years’ time.  Or come full circle… perhaps I should be thinking of investing in some bell bottoms!

No comments:

Post a Comment