Micro services – the new architecture for digital engagement ?

Disclaimers and excuses.

I’d like to think I know as much or more than the average tech. pundit when it comes to building large-scale, resilient systems. In a previous life I spent the best part of a decade building large complex distributed systems for space, transport, telco. and utilities using CORBA, DCE, COM, WS*, REST, etc. So for what it’s worth here are my views on the latest architectural buzz-word du-jour – microservices. I’ve also heard numerous terms to describe the ideas behind microservices :

  • μservices (this one is bankrupt)
  • hipster-SOA (I like that one)
  • MSA (why does everything have to be a TLA in this industry ?)
  • agile SOA (this one has some merit)
  • SOA-2.0 (Just. No.).

I think I’m going to stick with microservices until someone proposes a better alternative.  But Agile SOA – yeh – I like that.

There are lots of articles on the web about microservices, and I’ve included links to what I believe are the better ones below. I’ve also seen quite a few conference presentations (some good, some bad) and they all fall into one of two categories :

  • In the trenches, doing it today, at scale for real customers.
  • Higher-level description and fundamental principles

There really aren’t many of the former and this post falls into the latter category. I haven’t been a “real” developer for at least 15 years  and I won’t show any detailed blueprints or code in this post. But I do intend to share some of my experiences, research and what I’m hearing from customers, analysts and other tech. pundits. I’ll also answer some questions I’m already being asked; a small sample here :

  • Isn’t a microservice architecture just SOA ?
  • Is this just the next software vendor buzz-word du-jour ?
  • How many LOC (Lines Of Code) is a microservice ?
  • Are there any applicable standards ?
  • Is an architecture build on APIs microservices ?
  • How do microservices relate to agile and DevOps ?
  • Where can I buy a microservice product ?

At this point I should add – these are my words and my opinion but they are heavily influenced by my role here at Red Hat where I run Product Management and where I have responsibility for a bunch of Red Hat’s Middleware products. I’d like to think I’m generally fairly impartial but I can’t promise not to be a little biased here and there. Finally – I’m learning here as well – I welcome challenges, questions, feedback and discussion. Comments are open.

New challenges.

So what has changed that has people across the industry questioning the architectural approaches and design decisions they’ve made in the past; or more importantly looking at alternatives to those architectures and practices for developing the next generation of applications ? A number of things :

Technical / architectural debt

When we talk about Applications in the Enterprises – we’re more often than not talking about complex compositions of intercommunicating systems – often developed over many decades using an array of technology. Individual elements of the “system” have their own release cadence, dependencies and often different owners with different goals. An increasing amount of energy is required to merely keep things running and avoiding outages that impact the business. Less and less energy is available to create competitive services and applications to serve the business.

The rise of DevOps

There is a strong headwind from the DevOps movement to radically change the way software is delivered and maintained. An essential element of DevOps is the notion of Continuous Delivery – a continuous stream of small, incremental chances to production applications instead of large disruptive upgrades. This requires an agile process and solid automated build and test using modern software development tools and practices.

Greenfield Opportunity – Digital Engagement

A shift towards developing net new systems that are focussed externally vs internally – if you follow Gartner – that’s the shift towards Systems of Engagement (or Innovation) or mode 2 applications using their Bi-modal IT vernacular. Or IDC’s third platform. Or Forrester’s “The Age of the Customer”.

Open Choice

During the last decade and a half – when building an application for the enterprise – there were two dominant choices – Java EE or .NET. More recently developer’s choices have expanded and IT has been willing to support a broader range of technologies. Especially for the kinds of green-field systems described above, developers are much more likely to make choices beyond the mainstream IT approved stacks and pick fit-for-purpose technology (eg. node.js for mobile, PHP for web, Java for middle-tier logic and back-end integration) Open source has made the technology that supports building resilient, distributed, web-scale applications far more accessible to far more developers. As with many other areas of technology – the innovation is happening in open collaborative communities and not in the ivory towers of traditional software vendors. Some notable examples are vert.x, ReactiveX, Netflix OSS.

Anatomy of a Micro-service

    Microservices build on the same solid principles of good software design long espoused by practitioners of Object Oriented Systems and Service Oriented Architectures. Namely :
  • Loose coupling in all dimensions – time, lifecycle, type, location, interface, version.
  • Clearly defined purpose.
  • Autonomous – eg. taking responsibility for failure, resilience, security, etc.
  • Explicit Boundaries – self contained implementation; dependable public APIs.
  • Standards-based wire protocols, not language-specific APIs for interoperability (assuming heterogeneous technology)
  • Policy & Meta-data driven – favoring configuration changes over code changes

Microservices can only be useful in an underlying environment or with a platform that provides a means for :

  • service discovery
  • service replication (for availability and scaling)
  • dependency resolution and management
  • service failure detection and recovery
  • reliable and flexible build, package and deploy toolchain
  • service monitoring, alerting, eventing and introspection

Many of these technologies and solutions exist today and have been used successfully with monolithic and SOAs for many years but microservices deployments may push existing tools to the limit for a number of reasons – scale and heterogeneity. So this begs the question – “How is microservices different from SOA ?” Well, firstly – it’s not about size. We shouldn’t get too hung up on the “micro” prefix – services (micro or otherwise) should have a well-defined single purpose and a stable API – it shouldn’t matter if the implementation is 100 lines of COBOL or 900 lines of Scala. Some would argue it’s about the underlying technology – some pundits claim microservices is a movement against and away from traditional SOA and integration technology and vendors. I’m not convinced this is a major differentiator or driver for microservices – there are many ways to implement micro services and few people will be willing to completely burn their IT portfolio to the ground and start again. Well, I’m not completely convinced – I do think the whole integration space has become associated with large proprietary software vendor stacks and overly complex standards – I can understand why people are looking for a more agile, lightweight alternative. For me – the major change in thinking is something that we haven’t been talking about in the SOA world much in the last decade and that is operational agility and flexibility. Essentially, I believe microservices is good SOA principles married with modern DevOps practices – it’s an architecture that supports a fast cadence of continuous change in an operational environment vs big-bang upgrades with long release cycles. That’s an architectural approach married with an agile process for delivering the new breed of customer engagement applications I discussed previously.

Some Cautionary Notes

Building reliable, maintainable distributed systems is hard and many of our previous assumptions about software development no longer apply. As we learnt with CORBA and COM – moving objects / services out of process adds latency, performance and code overhead. It introduces failure scenarios and potential security exploits that didn’t previously exist – eg. well constructed in-memory function calls rarely if ever fail; add an air gap and everything changes – the code overhead to handle failures, retries, security, etc. likely eclipses the application complexity (and cost) itself. This was also true moving from non-SOA to SOAs. Managing service dependencies is also a challenge – we faced similar challenges building distributed systems with DCE, DCOM and CORBA and more recently SOAs and that underlined the importance of governance and API management tools, but microservices architectures will exacerbate the issue as we increase the number of services. Decomposing applications into fine-grained services each with their own process-space and possibly their own container / virtual-machine introduces additional resource utilization and process management overhead. Finally and as I mentioned above – micro services architectures build on solid SOA principles to solve some very real operational bottlenecks – I strongly suspect that successful microservices practitioners are also successful agile and DevOps practitioners.

Summary

Microservices is an architectural style that builds on solid principles of good software design – when used in a mature DevOps environment it can increase the cadence of change without increasing the risk and cost of maintaining large, complex systems. It delivers operational flexibility and agility but it comes at a cost. It requires developers to understand distributed systems development and requires sophisticated systems and application management tools. Ultimately people will have to make the tradeoff between operational agility and development complexity Microservices represents an evolution not a revolution and IT practitioners should avoid micro service envy and rush to re-architect perfectly serviceable applications without discrete problems in mind than can be solved with a move to microservices. Oh, and if someone tries to sell you a microservice product – run away as fast and far as you can.

Further Reading 

“What is so Special about Microservices? An Interview with Mark Little” , InfoQ, February 2015 “Micro services : Decomposing Applications for Deployability and Scalability”, Chris Richardson, InfoQ, May 2014 “Micro services” by Martin Fowler, ThoughWorks, March 2014 “Micro-Services – Java, the UNIX way” by James Lewis, ThoughWorks, Sept. 2013

Still here

OK, spent a few hours yesterday importing some older posts from a backup – so (modulo a few images) I have all my posts since 2008. I also re-registered my softwhere.org domain and attempted to set some mappings in WordPress – if you’re reading this then it’s probably worked. I’ve forgotten a lot of the DNS basics so still need to do some research getting a sub-domain (blog.softwhere.org) to map to this blog.

I realize blogging about blogging is pretty sad and I will start posting some more interesting content here real soon – I’ve just got to iron the last few issues.

I’m Back

After a blogging hiatus – I thought I’d give blogging another try. Rather conveniently – I found this old WordPress blog still active so I’ll continue here. FWIW – between this blog and now – I did have an another hosted WordPress blog but let the domain expire last year due to inactivity. As part of the refresh on this site – I’m going to try and recover some of the posts.

I’ll use this blog to share my thoughts on some of the trends, issues and emerging technology that is impacting the tech. industry.

Fear Uncertainty and Cluelessness

I’m generally impressed with the quality of our competitors FUD and anti-JBoss marketing. Our competitors may not be super-smart but they generally make up for it in raw man-power (or girl power) and can usually produce reasonably well researched; well articulated arguments. But this latest piece from Oracle is way, way below their usual standards. It contains a multitude of blatantly incorrect statements – most seemingly not through malice but more likely through pure ignorance and laziness.

The only conclusion I was able to draw from the blog post (and it’s not easy to draw any conculsion) is that Oracle answer to pretty much anything is “we can make anything better with Engineered Systems”. If that’s Oracle strategy then they probably need to salvage the hardware business they’ve managed to run into the ground.

By and large, the blog post is of such poor quality that it barely deserves a response but Shane produced one anyway – I guess it presents such an easy opportunity to make Oracle look clueless.

Come on Oracle – get your act together !

Is Java Dead Yet ?

This question has been asked many times over the last 13 years or so; I’ve answered it numerous times in various dark corners of the web related to these kinds of discussion. But the question came on our JBoss EAP 6 and Data Grid Virtual Launch today, so here’s this year’s answer.

In a word – No.

For a longer answer, here follows my attempt at a substantiation.

It’s part of my job to know what’s coming next and I’ve been tracking a number of sources that track technology adoption and popularity for many years. The first is specific to programming languages – the Tiobe Index.

The question most people have is why after XX years is C still so popular ? My explanation is that it’s still the standard language for embedded devices – device drivers, network appliances, automation systems, etc. And the embedded market has absolutely exploded in the last 5 years.

EASE INTO THE CLOUD : Red Hat Virtual Event

RH_EAP6_banner_468x60_9405757_0512_it.png

Join our online virtual event next Wednesday (June 20th) at 11am ET and hear us talk about some exciting new JBoss products – JBoss EAP 6 and JBoss Data Grid. We have separate developer and operations tracks with speakers from the product teams and customers ready to share their experience of these exciting new technologies. Sign up for free here.

The death of bloated, heavyweight, monolothic enterprise Java …

… and the rise of the lightweight, agile, dynamic, modular Enterprise Java.

Java EE has long had the perception of being slow, bloated and monolithic. While the Java EE specification doesn’t prescribe a lightweight, modular implementation; neither does it preclude one. So the negative perception of Java EE is more to do with certain implementations than the standard itself. The two dominant commercial vendors of (Oracle and IBM) have, over the last 10 years, done a lot to re-enforce the perception that Java EE has to be complex, bloated and expensive. While at JBoss we’ve been pushing in a different direction for many years. Each of the last major release of JBoss AS has incrementally pushed modularity closer to an ideal where you only pay for what you need (in memory, complexity, CPU).

junk in the trunkPhoto Credit : “Junk in The Trunk”, zappowbang (CC, some rights reserved)

The latest version (JBoss AS 7) – which is also the underlying technology for Red Hat’s commercially supported product (JBoss EAP 6) has pushed the lightweight theme as far as to completely erode the difference between lightweight web containers (like Tomcat) and “heavyweight EE servers”. As far back as 2008 (through the advances in mobile devices and JBoss miniaturization) it’s been possible to run a full Java EE server on something as small as a smartphone; last year at Red Hat summit we ran the entire JBoss keynote demo (starts about 35min) on a cluster of cheap plug-top computers (far less powerful than today’s smartphone).

So it’s great to see IBM following our lead and pulling their own miniaturization stunt – Websphere running on a Rasberry Pi – very cool. Great to see IBM joining us to help change the perception of Java EE.

JBoss Data Grid – Making Big Data Work

Screen Shot 2012-04-13 at 10.11.51 AM.png  

This week Red Hat extended the Early Access program for JBoss Data Grid with the availability of the BETA – available to existing customer and future customers.

Traditional (typically relational) spinning-rust data stores have become one of the biggest economic and technical impediments to extracting the true value from the increasing amount of data that is available to organizations today.

JBoss Data Grid is a distributed, in-memory, fault-tollerant key-value store that is architected for large scale, mission critical applications. JBoss Data grid is built on the Infinispan open source project which is the natural evolution of JBoss Cache – which has been a core part of JBoss products for many years.

There’s a huge amount of activity around BigData and NoSQL as people look for more appropriate solutions to store, manage and analyze data – JBoss Data Grid and in-memory solutions in general provide orders-of-magnitude performance and scalability benefits without necessarily having to completely re-architect the data tier. The intrinsic distribution also provides a high-degree of fault-tollerance without the additional cost, complexity and overhead involved in traditional data stores.

So, give it a spin; and give us some feedback.

Red Hat is looking for some awesome Product Managers

Looking for a new challenge in a fast growing business ? Familiar with Java, JBoss and Open Source ? Able to kick competitor butt and have fun ?

Product Manager, JBoss User Experience (UXP) Mobile Platform

The Product Manager, JBoss User Experience (UXP) and Mobile Platforms Group is looking for a Product Manager, to be responsible for the overall product life cycle of Red Hat’s User Experience Platforms including Mobile and Portal. The Product Manager will be responsible for determining the market requirements for a successful product and driving the overall product strategy. This Product Manager will also work closely with the product development and engineering teams to determine product priorities and plan product releases and determine the product roadmap.

Sr Product Manager, JBoss Application Platforms

JBoss Enterprise Application Platform is the market leading platform for innovative and scalable Java applications. Integrated, simplified, and delivered by the leader in enterprise open source software. Responsible for the overall product life cycle of Red Hat’s application platform products marketed under the JBoss brand name. Responsible for determining the market and technical requirements for a successful product and driving the overall product strategy. Will work closely with product development to determine product priorities and plan product releases and determine the product roadmap.

Sr. Product Manager, JBoss Enterprise SOA

The Sr. Product Manager will be responsible for the overall product life cycle of Red Hat’s JBoss Enterprise SOA platform, Enterprise Service Bus, BPEL engine, related tooling and integration with related technologies. The individual will be responsible for determining the market requirements for a successful product and driving the overall product strategy. This person will work closely with product development and engineering to determine product priorities and plan product releases and determine the product road map.

JBoss EAP 6 BETA Q&A

Here follows answers to the the majority of the questions we had during the BETA webinars last week. I’ll add the remaining answers in he next few days. There were lots of questions so I’ve grouped them into categories – if you have additional questions or require more clarity, please leave a comment.

Note any mentions of specific features, component versions and dates in these answer are subject to change.

I’ll post the results of the EE 6 Poll in a separate post.

Finally some links referenced in the Webinars for you convenience :

The Webinar replay (will be available in a week or so)

Red Hat’s PaaS – OpenShift

EAP 6 BETA Download

EAP 6 BETA Documentation

The Q&A

Developer Tools

Q: the current JBDS 5 beta does not include EAP 6, when will it include EAP 6?

A: A brief time after EAP6’s GA date – JBDS will GA prior to EAP6 GA – so post EAP6 GA will be the first time for us to get them sync’d up. Between now and then, simply download both, it is easy to add EAP6 to JBDS5.

Q: Will Zip file with Maven artifacts be provided in EAP 6 distribution or it will be a separate deliverable?

A: It’s a separate download on the Support Portal.

Cloud

Q: does the openshift flex support postgresql database?

A: yes it does.

Migration

Q: What about the migration from EAP 5 to EAP 6, is it transparent, or is it different?

A. There are definitely some major differences in configuration and management but applications should be largely portable from EAP 4 / 5 to EAP 6. We have created a migration guide and we also offer migration services.

Q: Would you please spend a few word regarding the migration path for Seam applications that currently target the EAP 5 release?

A: We have documentation for how to make Seam 2.2 applications run on EAP6. Furthermore, we will be delivering Seam 2.3 which will maintain the Seam 2.2 programming model but allow you to take advantage of JSF2.

Q: Being already partners, is there a path or redhat offer to help poc’ing the migration from EAP 5 to EAP 6 ? Thanks

A: Red Hat Consulting have a full set of migration services.

General

Q: will you publish the questions/answers ?

A: Yes.

Q: When EAP 6 GA will be available?

A : Subject to the outcome of the BETA, performance and quality – we plan to release within the next 4 months.

Q: You said you wanted to make sure you don’t do a vendor lock in, but how do you make sure that other vendors won’t lock you in?

A: Avoid proprietary technologies (languages, frameworks, tools) that are only available from a single vendor. Choose open standards and open source. Ask yourself this question about your technology stack – if the (single source) vendor goes out of business or pushes their prices up significantly what is your contingency plan ?

Q: Any idea when the beta’s will become stable?

A: EAP 6 GA is planned within the next 4 months but we may distribute a second BETA release before that.

Q: Will the support Lifecycle of Jboss EAP 4.3 be extended because of the late release of Jboss EAP 6?

A : We have a an extended lifecyle program for EAP – contact your local Red Hat representative for more details.

Q: Pros-Cons Domain Architecture versus standalone Architecture : will you better support the first mode ?

A : They will both be fully supported. Domain mode if you want to run multiple instances for HA or scale-out and don’t have other management tools. Standalone mode if you’re developing or don’t want our management wiring to get in the way of other management tools you use or have developed.

Q: What are technical differences between EAP 6 and AS 7.1 ? ( management tools, fixes, deploy tools, etc ? )

A : At the point of the BETA the difference between AS 7.1.Final and EAP 6 BETA are pretty limited – some branding and some critical bug fixes. As we progress through the BETA and our testing we EAP 6 will start to diverge from the last available AS release and that divergence will continue as we start the maintenance stream for EAP 6. More information on our model here.

Q: when will the Jboss Training courses start covering EAP 6, most spefically, the JBoss Application Administration course (JB336)?

A: JB366 (JBoss EAP 6 Admin.) will be available at GA – in fact you’ll be ale to take the course at Red Hat Summit / JBoss World in June. We’re also developing a new core developer course for EAP 6 that will be available at GA.

Messaging

Q: Have you enable data replication to hornetQ in EAP 6

A: It’s being worked on upstream but not planned for EAP 6.0 GA. It is on the wish-list for EAP 6.1

Q: When will HornetQ implement AMQP?

A : There are no plans for HornetQ to implement AMQP. Red Hat has a separate messaging product (Red Hat Messaging) that does support AMQP – Red Hat Messaging can be used as an alternate JMS provider for EAP.


Core App Server

Q: Will EAP5 bootstrap be updated to be compatible with Java 7? Or do we need to upgrade to EAP6 in order move forward in Java?

A : The plan is to certify EAP 5 with Java SE 7 after the GA release of EAP 6 – so within the next 3-6 months.

Q: Does EAP 6 contain tomcat 7.

A : EAP 6 embeds a modified version of Tomcat 6 with support for many Tomcat 7 features.

Q: When is EWS expected to uptake Tomcat 7 ?

A : JBoss EWS 2.0 will support Tomcat 7 and will be available later this year.

Q: Is there any EJB 2.1 support?

A: Yes but definitely in maintenance mode – you should consider moving to EJB 3.1

Q: Downloaded beta 1, can’t seem to find a way to “install it as a service” for Windows. Is this going to be introduced later?

A : The Windows Service Wrapper didn’t make the BETA – it will be in the GA and in BETA 2 (if we do one).

Clustering / Caching

Q: Why do not integrate The full Infinispan product in EAP 6 (not only for 2nd level cache or session replication)?

A: A number of reasons. The cache instance used for Query caching and session replication is tuned for a specific use-case, enabling it for general purpose use would likely impact both session replication and query caching. We have decided to offer a separate product (JBoss Data Grid) that is specifically for use a a general purpose, in-memory key value store. It can be run in embedded mode and also standalone and satisfies a broader range of deployment topologies and designs.

Q: Is JBoss Data Grid announced for end-March derived from Infinispan project ? Or any other relation between them ?

A : Yes JBoss Data Grid is based on Infinispan.

Modules / Class-loading

Q: Can we replace class on demand on working instance, without redeploying?

A: Possibly. Not out of the box. You’d need something like JRebel or Stuart’s Fakereplace to make it work. And of course there are limits to what kinds of changes can be made with that sort of mechanism.

Q: Will you support to access a Java module inside of an EAR via JNLP?

A: Sounds like a cool idea, though you can probably do this already using simple servlets.

Q: Can we point to application classloader what jar version should it use when we have many version of the same jar?

A: It depends. If you have more than one version deployed as deployments, or your JARs are installed as modules (either with different names, or with the same names but different versions) then yes, you can choose which one to link to simply by using the right Class-Path or Dependency entry, or their jboss-deployment-structure.xml equivalents. We do not support more than one version of a JAR within the same EAR’s lib/ directory or within the same deployment, and each deployment can only refer to one version of a JAR. You can however have an EAR with two subdeployments in it, with each sub-deployment linking against a different version of the same JAR (as long as the conflicting dependencies are never brought into contact with each other).


Security

Q: What is the status of PicketLink in EAP6?

A : PicketLink is included and fully supported.

Q: Is there any internal API to confirm x.509 certificate validity.


We do not provide any internal API to perform the x509 validation. You can use the standard JDK Classes for that. Usage of X509 depends on the subsystem:

If you are using JSSE via the JDK, then you can install your own Trust Manager

For the Web subsystem, you can use CLIENT-CERT and use any of the x509 based login modules.

Management Questions

Q: Can the domain controller be started from the command-line interface (CLI) as well?

A: No – you have to start it manually (or run as a daemon / service)

Q: What kind of scripting tool will be available in EAP6 ? Can all the tasks can be performed via the scripting interface ?

A: JBoss CLI was cover in the BETA Webinar, there are some more details in the docs.

Q: Is JON 3 packaged with EAP6 then? or still separate?

A: All JBoss Enterprise Platforms have a managed option that include entitlement for JBoss ON; though the products have their own distribution / installation.

Q: Will EAP6.0 contain more streamlined patches/fixes and will there be a better way to apply patches instead of copying jar files at different locations ?

A : Local patching is scheduled for EAP 6.1

Q: Does EAP 6 CLI able to deploy a web app on many instances at once ?

A: Yes – the CLI is fully domain aware.

Q: Can we see/configure all application servers under domain controller from the admin console of “domain controller” ?

A : Yes there is a physical view of running instances within the domain.

Q: Where web console keeps our modification? Does it change the XML files or what?

A: Yes. Any config. modification made through the management APIs are persisted in the underlying confg. files.

Q: Would twiddle still be supported?

A: No – we no longer support Twiddle but you can use something like JConsole to get at the underlying JMX MBeans or use jboss-cli.

Q: Does jboss-cli compatible with previous Jboss EAP releases?

A: There was no equivalent to jboss-cli in previous release of JBoss EAP.

Q: Will Domain Controller introduce a single point of failure (either at runtime for applications or for management operations) ?

A: No it isn’t involved in application request flow. In fact it’s quite common to disable the management infrastructure in secure production environments. We chose not to encumber the Domain Controller with an overly complex HA design, when the simple solution is to re-start it if it fails – or run it as a daemon / service so it is auto-started.

Q: is it possible to use JON3 to make automated deployments of jboss applications?

A: Yes., more info. in the JBoss ON 3 Documntation.

Q: If we can change configuration of other instances remotly, can it be done in transactional way – I mean all of the node confirm the change, or none of them in case of some failure

By default, if you make an administrative change that affects multiple servers, the Domain Controller will apply it on all affected servers and will roll it back on all affected servers if it fails on any of them. This constraint can be relaxed when using the CLI by adding an additional header to the operation request that specifies a “rollout-plan”. Among other things, rollout plan can specify that a certain number or percentage of servers in a server group can fail to accept the change without triggering an overall rollback. (See “Operations with a Rollout Plan” on for some conceptual information about rollout plans.