Design Patterns for Event-driven Distributed Intelligence

Following discussions with @seabird20  and @darachennis, among others last year. I decided to publish a rough idea of the event-driven Distributed Intelligence architecture for Smart Grid (this could apply to the broader IoT). This is loosely-based on the microservices concepts & principles described here and builds on Duke Energy’s collaboration on interoperability and distributed intelligence initiative. The purpose of this post is to generate ideas and aid the ongoing dialogues. As far as I’m aware, the additional concepts I discuss here; SEDA, microservices and distributed agent patterns, are not  called out in the Duke Energy work (although the authors might reasonably claim they’re implied). My aim, however, is to make the ‘software and event data’ conceptual architecture much more explicit in this discussion.
Having said that,  the  first diagram looks pretty physical! It serves as a simple IoT-ish context: A metering sensor talks to an edge processor on a ‘Field Area Network’ and thereafter data is relayed back to the Data Centre for further processing.

In the 2nd diagram we open up the Edge Processor and to reveal a relatively simplistic view of the software architecture. This is based on the micoservices pattern described by Fred George, and my own experience as VP Product Development/Architect at VI Agents.




I found the concept of small, autonomous agents, work very well for us at VI. Moreover, I spotteda lot of parallels with Fred George’s description of microservices:

Publish anything of interest – don’t wait to be asked, if your microservice thinks it has some information that might be of use to the microservices ecosystem, then publish-and-be-damned.



Amplify success & attenuate failure – microservices that publish useful information thrive, while those that left unsubscribed, wither-on-the-vine. Information subscribers determine value, and value adjusts over time/changing circumstances.



Adaptive ecosystem – versions of microservices are encouraged –may-the-best-service-win mentality introduces variety which leads to evolution.



Asynchronous & encapsulated – everything is as asynchronous as possible – microservices manage their own data independently and then share it in event messages over an asynchronous publish-subscribe bus.



Think events not entities – no grand BDUF data model, just a cloud of ever-changing event messages – more like Twitter than a DBMS. Events have a “use-by-date” that indicates the freshness of data.



Events are immutable – time-series snapshots, no updates allowed.


Designed for failure – microservices must expect problems and tell the world when they encounter one and send out “I’m alive” heart-beats.



Self-organizing & self-monitoring – a self-organizing System-of-systems’ that needs no orchestration. Health monitoring and other administration features are established through a class of microservices.



Rapids, Rivers & Ponds
I also particularly liked Fred’s use of the labels Rapid and Rivers to describe two seperate instances of message brokers and Ponds to describe persisted data. Again very similar to the VI SixD architecture where we collected signals on a ‘Rapids’ bus and  business event & document messages flowed over a ‘Rivers’ bus, and Event Logs & Document Queues were our  ‘Ponds’. But that was back in 2002,  I do think the microservices pattern is much more elegant and more extensible.


Staged Event Driven Architecture
The 3rd diagram overlays what I see as the SEDA Stages in our Smart Grid architecture:

Stage1: Raw signal filtering, simple aggregation& correlation, negative-event detection etc.

Stage2: Goal and role based functionality via an ‘Edge Agent’ that does complex aggregation and correlation, sense-making and alerting. These might be implemented as microservices, or at least, share many of the attributes described by Fred.


Stage3: There will  be more aggregation & correlation, routing alerting and broadcasting done here. The junction of Information Technology (IT) and Operational Technology (OT)  is probably here. These are the the software components that sit back at the Data Centre, that receive and process the event messages produced by the ‘Edge Agents’. There’s also a nod to some sort of management console and the publishing of commands and requests to the ‘Edge Processing’ domain. This diagram is very sketchy right now, with loads of components missing.   I just want to keep things very simple at this stage. 

Stage4: This is where the  ‘Big Data’ heavy-lifting of historical data and predictive analytics stuff is done.

We used  the SEDA pattern to define an Events Network that was capable of processing 4bn events per day without having to invest in massive network bandwidth and huge back end processing capabilities for the Royal Mail – I believe the U.S. postal service didn’t implement a SEDA  and  throw a huge amount of cash at the problem. I love the elegance of a series of cascading queues that gradually whittle the tsunami of raw signals in real time, down to ‘right-time’ stream or tap of business-meaningful messages.



This is the early stage thinking and part of a much bigger Smart Grid, and ultimately Smart City architecture. Please feel free to tweet about. or better still, comment below. Thx.

Apple Pay on London Tube Promises to Accelerate Contactless Transit Payment Adoption

Today (June 8), Apple announced at its developer’s conference that the London Underground would add Apple Pay, Apple’s contactless payment system, to the contactless methods Transport for London already allows.

The post Apple Pay on London Tube Promises to Accelerate Contactless Transit Payment Adoption appeared first on Enterprise Architecture Professional Journal.

On stupidity – Follow analysts and take things for granted

For me it is always astonishing to see the tendency of passing the buck, as well as to switch off any thinking. I often see many architects arguing with an Analyst report instead of using their own reasoning, usually this happens most with enterprise, business and solution architects or all those architects that help in … Continue reading On stupidity – Follow analysts and take things for granted

Enterprise Architecture Conference Europe 2015

  QualiWare will be at the Enterprise Architecture Conference Europe 2015 in London on 15-18 June 2015. Kuno Brodersen participates in a panel session about How Practitioners and Vendors can Co-create Value from the Succesful Application of EA Tools. John Gøtze will speak together with Milan Guenther about Models that Matter. Our customer Statoil will speak about A […]

Bricks, Bytes, Behavior, and Branding: Four Pillars of the Digital Workplace

When thinking of a digital workplace strategy, you might—understandably so—expect that it primarily involves technological change. However, at last week’s European Conference on Information Systems, a panel of academic and industry experts led by MIT CISR research scientist Kristine Dery pointed out that this couldn’t be further from the truth. Technology can be potentially disruptive […]

Political parties and organizational intelligence 2

#orgintelligence #politics @rafaelbehr contrasts the behaviour of the Conservative and Labour parties.

Before the 2015 election, the Labour party practised collective denial (“misplaced confidence”, “kidded themselves”), believing that “organization could compensate for uninspiring leadership”. Following the election, “a danger now is oversteering the other way”.

Denial and oscillation are two of the principal symptoms I have identified of Organizational Stupidity (May 2010).

Contrast this with the Conservative willingness to invest in ‘blue collar conservatism’. Behr attributes this initiative to George Osborne, one of whose political gifts “is the self-knowledge to identify gaps in his own experience and to plug them with astute appointments”. Cameron, he suggests, is much less intellectually curious than Osborne. And yet it is Cameron who carries through Osborne’s plan to appoint Robert Halfon in order to recalibrate the Conservative’s relationship with the working classes.

What reveals itself here is a form of intelligence and leadership that is collective rather than individual, a form of collaboration and teamwork that has not been strongly evident in the Labour Party recently.

Steve Richards goes further …

“During Cameron’s leadership the Conservatives have become more alive as a party, impressively animated by ideas and debate. Cameron appears to be an orthodox Tory but likes having daring thinkers around him, even if they do not last that long. … In recent years Conservative party conferences have been far livelier than Labour ones, which have been deadened by fearful control freakery.”

… and insists that “the next Labour leader must not be frightened by internal debate”.

One of the essential duties of leadership in any organization must be to boost the collective intelligence of the organization. Not just debate, but debate linked with action.

Patrick Wintour reports that there was plenty of (apparently) healthy argument in Labour’s inner circle.

“Meetings were quite discursive, because there were a large number of views in the room. … [Miliband] enjoyed that. He used the disagreement as a means to get his own way. It is a very interesting case study in power, in that he would not be described typically as a strong leader, but very consensual. The caricature of him is as weak, but internally he had great control.”

But that’s not enough.

“The team that Miliband had assembled around him consisted of highly intelligent individuals, but the whole was less than the sum of its parts – it was, according to many of those advisers, like a court in which opposing voices cancelled one another out.”

Furthermore, an important requirement for organizational intelligence is that it is just not enough to have an inner circle of bright and well-educated ‘spads’, and to appoint either the cleverest or the most photogenic of them as “leader”. Perhaps the Labour inner circle deeply understood the political situation facing the party, but they neglected to communicate (forgot to mention) this insight to others. The vanguard is not the party. Any party that aspires to be a movement rather than a machine must distribute its intelligence to the grass roots, and thence to the population as a whole.

Exercise for the reader: count the ironies in the above paragraph.

Finally, intelligent organizations have a flexible approach to learning from the past. @freedland argues that Miliband was single-minded about the future, and refused to tackle the prevailing narrative about the Labour government’s role in the 2008 economic crisis.

“The management gurus and political consultants may tell us always to face forward, never to look over our shoulder, to focus only on the future. But sometimes it cannot be done. In politics as in life, the past lingers.”


Sources:

Rafael Behr, The age of machine politics is over. But still it thrives in the Labour party (Guardian 4 June 2015)

Jonathan Freedland, ‘Moving on’: the mantra that traps Labour in the past (Guardian 5 June 2015)

Tim Glencross, Attack of the clones: how spads took over British politics (Guardian 19 April 2015)

Brian Matthews, The Labour Party and the Need for Change: values, education and emotional literacy/intelligence (Forum, Volume 54 Number 1, 2012)

Steve Richards, Labour’s next leader should look to David Cameron, not Tony Blair (Guardian 1 June 2015)

Patrick Wintour, The undoing of Ed Miliband – and how Labour lost the election (Guardian 3 June 2015)

Chris York, The Rise Of The Spad: How Many Ministers Or Shadow Ministers Have Had Proper Jobs? (Huffington Post, 13 November 2013)


Related Posts:

Symptoms of Organizational Stupidity (May 2010)
Political Parties and Organizational Intelligence (May 2012)
Dark Politics (May 2015)

Updated 6 June 2015