Stateful Systems

National sovereignty is a hot topic at the moment. In the United Kingdom, we are shortly going to have two public votes on the issue: in September on whether Scotland should be an independent country, and in May on whether we agree with Nigel Farage that we should leave the EU. (The former vote is overtly on the Scotland issue, but the latter will be disguised as the European Parliament elections.) Further afield, a part of Ukraine has controversially chosen to join Russia. And in the office, I have been debating with developers over whether new functionality should be an extension of an existing application, or whether it should stand alone.

Does the previous paragraph seem to hang together as a coherent, logical whole? Perhaps not, but I hope it will after you’ve read this post, because I’m proposing geopolitics as an analogy to help talk about systems architecture.

Before I start, I’d like to point out the limitations of this analogy. It’s an illustrative, rather than a predictive, model. So you won’t be able to deduce my views on Scottish independence based on whether or not I say that a particular piece of business logic should be moved out to a service; nor should you tweet about my scandalous opinions on how heavy-handed EU regulations should be because of what I say about standards for RESTful services. I just think it might aid communication, particularly with non-technical managers and newbie techies, both of whom will probably be more familiar with politics than systems architecture.

The basic metaphor is that an application is a sovereign state. For the purpose of argument I shall here define an application as a set of files, database schemas and other configuration settings which all need to be released at the same time.

Here are some derived metaphors:

  • Inter-application communication is import and export trade.
  • The collection of standards governing application interfaces and messaging is international trade law.
  • Standards and conventions internal to applications are national laws and culture.
  • Standards imposed across all applications, such as sticking to a limited set of programming languages or components, are international laws or principles, such as the UN Universal Declaration of Human Rights.
  • Enterprise architects are supranational bodies, such as the UN.

And here are a couple of examples of points that this analogy helps illustrate.

Smaller applications can be changed more quickly

We know that the smaller applications are, the easier they are to adapt and refactor, and the same is true of nation states. I was recently listening to a Radio 4 programme on Estonia, which described how all interactions with the state, including healthcare and voting, could be done online. Now this is no mean achievement, but it is easier in Estonia, a country of 1.34 million citizens, than it is in the UK, where a project to store patient records electronically was conceived in 2002 and was dismantled in 2011 without having achieved its aim.

It’s more attractive to create small applications when integration is easy

In his Undercover Economist column in the Financial Times, Tim Harford relates the tendency over the last 70 years for countries to split up rather than join together to the progressive lowering of trade barriers since the end of the second world war. The theory is that in an environment in which trading between countries is expensive and difficult, it’s better to be part of a large empire to improve access to markets, but when international trade is cheap and easy, states aren’t punished economically if they choose to split up into smaller units. From a systems architecture point of view, if it’s difficult to create application interfaces – perhaps because you don’t have software libraries to help you create services, or because your organisation requires you to go through several governance boards before you are authorised to create a service endpoint – you’ll be tempted to create monolithic applications.

And extending the metaphor, we can categorise certain types of software systems as geopolitical entities:

If you have a subset of applications adhering to a common set of policies, it’s the EU

Sometimes the output of a particular programme or business area may be a suite of applications, each one being a stand-alone entity, but sharing a common set of standards, over and above those required by the enterprise. For example, applications may share a set of XML schemas for defining their APIs, or they may be built on a common framework. I think the EU is a good analogy to this – each country in the EU is a sovereign state, but adheres to EU law affecting internal standards, such as minimum cage sizes for hens, and international interfaces, such as our all having a burgundy passport.

The USA is an application platform

Some businesses have lots of separate units of functionality running on a single platform, such as SharePoint or SalesForce. The platform provides utility functionality, such as user authentication and database storage, which are used to help build functionality more quickly and provide a uniform user experience. So, for example, SharePoint might contain a timesheet system, a recruitment tracking page and a wiki, none of which could survive outside the SharePoint ecosystem. I think this is like the United States, with the platform being the federal government and the individual business applications (OK, I wanted to avoid this, but here I’m introducing Application (2): something a platform is used for) being the states.

I’m trying to think what the Cayman Islands or Monaco (sovereign states which have very low rates of tax for doing certain things) could be. The big cheese’s pet platform, which is pre-approved and therefore has has relaxed governance, perhaps?

Finally, I feel as though I should write some words to justify introducing a new analogy, when systems architecture already has a perfectly serviceable canonical analogy: Proper Architecture! In this realm, applications are buildings, classes are features such as windows and doors, and interaction between applications is modelled by things like streets, electricity wires and water pipes. I feel a bit like Microsoft when they supplemented their implementation of the W3C’s standard XML DOM with their homegrown LINQ to XML interface. Why introduce something new when there’s nothing wrong with what we’ve got?

Well, I just think it won’t hurt, and it might help. Firstly, lots of people are more interested in politics than they are in buildings, so they might be more receptive to an analogy with a harbour than an architrave. Secondly, software feels very dynamic, and so do countries, while buildings seem a little static – they aren’t, of course, being full of internal movement and flows in and out, but that’s just they feeling they evoke within me. And finally, I think it’s quite fun to think about what sort of application countries would be. What could China be? What’s Vatican City?

Advertisements