What Are Events? Always 'Decoupled'
Why our use of the term ‘Asynchronous’ represents a major obstacle to a shared comprehension of Event Driven Architecture (EDA).
Join the DZone community and get the full member experience.
Join For FreeIn January 2021, I wrote that Event Driven Architecture (EDA) should be "Always Asynchronous." At precisely the same time, I argued that "the concept that we are actually trying to explain when we use the term 'Asynchronous' — within the context of EDA — might be better termed: 'Monologueous Communication'" (where no response is ever required). Nonetheless, 'Asynchronous' remains the dominant term in use today, and it was never certain that 'Monologueous Communication' was a good replacement. As the months have passed, however, I see more and more clearly how using the term 'Asynchronous' represents a major obstacle to our shared comprehension of EDA.
Let me give you an almost unbelievable example that I witnessed from the CTO of the global computing giant AWS at its recent re: Invent Summit in December 2022. Of course, it goes without saying that the CTO of AWS is as well placed as anyone in the world to explain to an ignorant public was 'Asynchronous' actually means, for which reason I find this example so incredibly useful (please do not take it as a pointless exercise in AWS-bashing).
Many of those there for Dr. Werner VOGELS' keynote in Las Vegas became quickly mesmerized while watching computer-generated images of a starling 'murmuration.' The long-time CTO of AWS went on to inform us that "sometimes the world looks synchronous, and one of those examples is bird murmurations… And it looks like a centralized controller tells all these starlings where to go and what to do [– but there isn't]. Our ancestors actually thought that there was telepathy in the birds… [However,] This is not a singular system because it's nature, and nature is asynchronous. So all the actions that the birds take are based on local observations… So what you see here is … purely driven by local decision-making. The bird is completely autonomous, even though the overall system looks like it's working in synchrony. But it's not. This is a purely asynchronous system. The world is asynchronous."
As someone that has been writing about the fundamentals of Event-Driven Architecture (EDA) for several years now, I was astounded to hear from Dr. VOGELS that "There is absolutely nothing that is synchronous in this world." Astounded by the calamity that was unrolling before my eyes, acted out by a company with almost unlimited resources. There are many reasons to declare the pronouncements mentioned above as a calamity. Still, I think it's best to start with the actual dictionary definition of the term 'Asynchronous': "not happening … at the same time or speed" (Cambridge). To describe the individual movements of starlings in a single murmuration as "not happening … at the same time or speed" is about as large an error as one could possibly ever imagine hearing, but this was far from the only problem.
Even if ample leeway is provided for the fact that modern usage of the term 'Asynchronous' often departs from its dictionary definition, there remain several other reasons to declare the pronouncements made by Dr. VOGELS as newsworthy. We were also told in the CTO's Keynote that "if you look at an asynchronous system, that actually is driven by an event broker… There is no tight coupling between any of the components". I found this statement a little problematic, given that I could not see any magical event broker floating in the sky between the birds. Likewise, given that Dr. VOGELS had earlier stated that "it looks like there's a centralized controller that tells all these starlings where to go and what to do" – but that there probably isn't – it would appear that he was equally unable to perceive of the flying event broker. The reality is, of course, that there is no "asynchronous system … driven by an event broker" in the example of starling murmurations, any more than there is "telepathy."
Instead, as Dr. VOGELS rightly notes, "all the actions that the birds take are based on local observations"; their own observations, not those of an omniscient event broker. We are even shown an image of an individual bird, with a number of lines-of-sight 'connecting' it to those birds closest to it: it has no concept whatsoever of what the individual birds/components on the far side of the flock/system are doing, despite the fact that a capacity to subscribe to every system component's published events is a fundamental characteristic of any 'Decoupled,' Event-Driven Architecture. What we also remark on in the dazzling visualization provided by AWS is that the displayed lines-of-sight emanating from the central example starling very obviously represent a 'point-to-point' architecture: one of the most obvious tells of Synchronous communication there is.
These last three paragraphs alone should be more than enough to make the case that a starling murmuration is very obviously 'Synchronous' – i.e., "happening or done at the same time or speed" (Cambridge) – but to this, I would like to add a very simple rebuttal of my own to the claim that" nature is asynchronous": nature is not stupid. Nature would never impose the unavoidable latency hit of 'Decoupled' (Asynchronous) communication upon its systems if that latency could not be supported. I'm willing to bet that a delay of even a few extra microseconds between a starling moving off to the side and its neighbor doing precisely the same would be more than enough to see this particular natural system crash to the ground in its entirety.
One thing that Dr. VOGELS would hopefully be willing to concede, despite his earlier assertions, is that the movement between the individual starlings in a murmuration is absolutely NOT 'Decoupled.' This is precisely why we need to stop describing Events as 'Asynchronous' (despite the fact that they are almost always triggered via Synchronous API calls) and need instead describe Events – and EDA more generally – as 'Decoupled.'
Opinions expressed by DZone contributors are their own.
Comments