<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Nico de Wet</title>
    <description>Nico de Wet's weblog on building scalable and robust distributed systems.
</description>
    <link>http://www.nicodewet.com/</link>
    <atom:link href="http://www.nicodewet.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 30 Apr 2019 19:48:32 +1200</pubDate>
    <lastBuildDate>Tue, 30 Apr 2019 19:48:32 +1200</lastBuildDate>
    <generator>Jekyll v3.6.2</generator>
    
      <item>
        <title>Name your Event-Driven Architecture Design Patterns</title>
        <description>&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;

&lt;p&gt;A few years ago I inherited a system that was sold as being bleeding edge because it was using all the latest cloud technologies. It emerged that the original designer had bought the book &lt;a href=&quot;https://pragprog.com/book/brapps/serverless-single-page-apps&quot;&gt;Serverless Single Page Apps&lt;/a&gt; and decided to run with it.&lt;/p&gt;

&lt;p&gt;A key challenge that became apparent in this system was that it was hard to reason about. This is despite an enormous amount of effort and care having gone into unit testing at least some of the layers. I had to have a coffee with the departed original designer to establish the sytem context in the first instance.&lt;/p&gt;

&lt;p&gt;In time I came to realise that the system had an &lt;em&gt;event-driven architecture&lt;/em&gt; in all its layers, but this description is not good enough because the term has many meanings, I would have to be more precise to help the reader by naming the exact design patterns that were used. But why name the exact event-driven design patterns? It is important to do because it makes the system easier to reason about without going into implementation detail.&lt;/p&gt;

&lt;p&gt;So, with this, in this post I’ll describe four key event-driven architecture design patterns, the first two of which were used in the cited system.&lt;/p&gt;

&lt;p&gt;The four &lt;em&gt;event-driven architecture&lt;/em&gt; design patterns are listed below and in turn described in greater detail further on.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The Event Notification Pattern&lt;/li&gt;
  &lt;li&gt;The Event-carried State Transfer Pattern&lt;/li&gt;
  &lt;li&gt;The Event Sourcing Pattern&lt;/li&gt;
  &lt;li&gt;The Command Query Responsibility Segregation (CQRS) Pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;the-event-notification-pattern&quot;&gt;The Event Notification Pattern&lt;/h1&gt;

&lt;p&gt;Almost all systems use the event notification pattern somewhere, that is at some level.&lt;/p&gt;

&lt;p&gt;When you call a system event-driven, the event notification pattern tends to be seen by senior engineers as
a particularly important part of the architecture.&lt;/p&gt;

&lt;h2 id=&quot;example-application&quot;&gt;Example Application&lt;/h2&gt;

&lt;p&gt;Our example application is a retail loyalty scheme application. The dollar value of tax invoices issued to members using point of sale software are used to credit the loyalty scheme point balance of members using some business rule.&lt;/p&gt;

&lt;p&gt;In the &lt;a href=&quot;https://www.visual-paradigm.com/VPGallery/diagrams/Component.html&quot;&gt;UML 2 component diagrams&lt;/a&gt; illustrated below, remember that the dashed arrows represent a &lt;strong&gt;dependency relationship&lt;/strong&gt;. So in the
diagram directly below the Invoice Sink Service depends on the Loyalty Scheme Credit Manager.&lt;/p&gt;

&lt;p&gt;The coupling between the Invoice Sink Service and the Loyalty Scheme Credit Manager is something
that we may not want. Put differently we may look for a way to get around the cited coupling in
terms of the dependency relationship by making sure the Loyalty Scheme Credit Manager knows about
the Invoice Sink Service &lt;em&gt;but not the other way around&lt;/em&gt;. The reason why we may want to do this is
because something that is very generic, such as collecting invoices from point of sale software is
generally something we &lt;strong&gt;want to depend on&lt;/strong&gt; rather then have it depend on many other components.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/Loyalty_Scheme_Component_Diagram.png&quot; alt=&quot;loyalty scheme component diagram&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now, the way in which we can reverse the dependency between the Invoice Sink Service and the
Loyalty Scheme Credit Manager, as illustrated in directly below, is to &lt;em&gt;use an event&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/Loyalty_Scheme_Component_Diagram_Reversed_Dependencies.png&quot; alt=&quot;loyalty scheme component diagram reversed dependencies&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;tax invoice issued&lt;/strong&gt; event is conceptually an example of such an event.&lt;/p&gt;

&lt;h2 id=&quot;events-and-commands&quot;&gt;Events and Commands&lt;/h2&gt;

&lt;p&gt;Its worth noting that the way in which communication patterns are realised affects whether
we use the term &lt;em&gt;events&lt;/em&gt; or &lt;em&gt;commands&lt;/em&gt;. In terms of naming &lt;strong&gt;tax invoice issued&lt;/strong&gt; is an
event-oriented naming style and it is not a command to any other system and this is important.
The reason why it is important is because our naming style more accurately describes the system
to someone that wants to understand how it works.&lt;/p&gt;

&lt;p&gt;In terms of how events or commands are implemented, it would generally be in the same way, using say messagaes and queues. So the only difference is in naming and consequential semantics.&lt;/p&gt;

&lt;h2 id=&quot;additional-benefits-of-using-events-for-notification&quot;&gt;Additional Benefits of Using Events for Notification&lt;/h2&gt;

&lt;p&gt;An additional benefit of the reversed dependencies between systems, and using events for notification between systems, is that it becomes easier to add additional systems or components that can listen to particular events using say publish-subscribe messaging patterns. In our example application, if there had been
an “Invoice Sink Service” team &lt;em&gt;in principle&lt;/em&gt; there would be no need to even talk to the said team to consume
&lt;em&gt;tax invoice issued&lt;/em&gt; events.&lt;/p&gt;

&lt;p&gt;There is a particularly significant trade-off when it comes to the use of the &lt;strong&gt;event notification&lt;/strong&gt; pattern. While we have, as a benefit, the &lt;strong&gt;decoupling of the receiver from the sender&lt;/strong&gt; (i.e. great flexibility) we have as a drawback &lt;strong&gt;the difficulty in reasoning about the overall system behaviour&lt;/strong&gt;. The latter occurs because there is no single system or codebase that can be consulted to reason about the overall system behaviour. The only way to figure out what is going on system wide is to follow or &lt;em&gt;trace&lt;/em&gt; through the flow of messages throught the overall system. This is true when it comes to GUI software and similarly it is true is larger enterprise systems.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/Loyalty_Scheme_Component_Diagram_Event_Reuse.png&quot; alt=&quot;loyalty scheme component diagram event sharing&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;the-event-carried-state-transfer-pattern&quot;&gt;The Event-carried State Transfer Pattern&lt;/h1&gt;

&lt;p&gt;This is simply putting so much information into the event that going back to the source
system for further detail is not necessary. For example a &lt;strong&gt;tax invoice issued event&lt;/strong&gt;
may contain all line item details, the payment receipt information if available and a
host of other data such as the merchant. Likewise an &lt;strong&gt;merchant address changed event&lt;/strong&gt;
would conceivably contain the old address as well as the new address.&lt;/p&gt;

&lt;p&gt;The overarching consideration is whether the querying load on the source system can be
eliminated for unantipicated queries related to events. The answer is yes but this
requires tranferring the state from the source system into a suitable data store at the
target system.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/Loyalty_Scheme_Diagram_Event_Carried_State_Transfer_Pattern.png&quot; alt=&quot;loyalty scheme component diagram&quot; /&gt;&lt;/p&gt;

&lt;p&gt;With this pattern contact initiated from the &lt;em&gt;Invoice Sink Service&lt;/em&gt; to the &lt;em&gt;Point of Sale Software&lt;/em&gt; is forbidden. It logically follows that the latter will keep a copy of all the
data its ever going to need. So that is the trade-off, on the upside downstream systems
no longer need to call the source system which may eliminate remote network calls and so enhance performance.&lt;/p&gt;

&lt;p&gt;On the upside &lt;strong&gt;availablity&lt;/strong&gt; may be improved in terms of downstream systems which can tolerate the upstream system being down. On the downside duplicate data needs to be stored.
In terms of downsides, as per the CAP Theorem, the price of high availablity is a lack of consistency and so we have eventual consistency. So, we are trading off high availablity for consistency.&lt;/p&gt;

&lt;p&gt;So in summary with Event-carried State Trasfer trade-off the following benefits.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Decoupling.&lt;/li&gt;
  &lt;li&gt;Reduced load on supplier (duplicating data to avoid calling back).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Against the following costs:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Eventual consistency (due to replicated data).&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;the-event-sourcing-pattern&quot;&gt;The Event Sourcing Pattern&lt;/h1&gt;

&lt;p&gt;With this pattern, events that contain the details of a change are stored before being processed. The event is then processed to affect the necessary change. With this we effectively have an &lt;strong&gt;event log&lt;/strong&gt; and the &lt;strong&gt;current application state&lt;/strong&gt; which are two representations of the same world. The event log contains all the events that ever change the application state and that lead to its current application state. Both the event log and current application state would commonly be persisted but this in itself
is not necessary to use the pattern.&lt;/p&gt;

&lt;p&gt;In order to test that we are using the event sourcing pattern we would have to test whether we can, at any time, reproduce the current application state. The reason why we would want to do this testing
is because a key benefit of the event sourcing pattern is being able to discard and rebuild the
application state. An additional benefit is that you don’t need to focus on preserving the application
state because it can easily be rebuilt.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/Event_Sourcing_Pattern.png&quot; alt=&quot;loyalty scheme component diagram&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Metaphors or systems that use event sourcing:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Version control e.g. git&lt;/li&gt;
  &lt;li&gt;Accounting ledgers - the current application state is an account balance which is derived from every
credit and debit to that account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key pattern benefits:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Audit&lt;/li&gt;
  &lt;li&gt;Debugging&lt;/li&gt;
  &lt;li&gt;Historic State&lt;/li&gt;
  &lt;li&gt;Alternative State - In essence storing events provides new and interesting ways to look at data when compared with a current state approach. In that regard &lt;a href=&quot;https://eventstore.org/docs/event-sourcing-basics/business-value-of-the-event-log/index.html&quot;&gt;eventstore.org says&lt;/a&gt; &lt;em&gt;As the events represent every action the system has undertaken any possible model describing the system can be built from the events.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Memory Image&lt;/strong&gt; - No need to store the application state in a persistent store, the entire application state can run in memory and so this leads to &lt;strong&gt;high performance systems&lt;/strong&gt;. Application developers can focus on having
a rich domain model as per Domain-Driven Design by Eric Evans which in itself challenging. As systems increasingly have large amounts of
non-volatile main memory this pattern becomes increasingly viable. Many systems have been built with the assumption that main memory is significantly limited (and so persistant store usage becomes mandatory), but this may no longer be the case. Entire systems can fit into main memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key pattern drawbacks or downsides:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Unfamiliar - and so harder to work with.&lt;/li&gt;
  &lt;li&gt;External Systems - e.g. you cannot replay a call to an external system two weeks ago, you have to save every response from an external system
as an event and make it a part of the replaying mechanism.&lt;/li&gt;
  &lt;li&gt;Event Schema - the issue here is how can you store events in such a way that you are confident that you can change the replaying code that processes them. With this the event schema becomes an important consideration.&lt;/li&gt;
  &lt;li&gt;Identifiers - when identifiers are generated it must be done in such a way that we can replay. This adds complexity as this must be thought through.&lt;/li&gt;
  &lt;li&gt;Asynchrony [&lt;em&gt;questionable&lt;/em&gt;] - This may be cited as a drawback, because it makes it harder to reason about a system, but note &lt;strong&gt;there is no need for asynchrony in an event sourced system&lt;/strong&gt;. Asynchrony does not have to be used when using an event sourced approach. People &lt;em&gt;may&lt;/em&gt; introduce asynchrony to enhance responsiveness but this introduces complexity.&lt;/li&gt;
  &lt;li&gt;Versioning [&lt;em&gt;questionable&lt;/em&gt;] - This is a potential drawback due to the ability to replay. The code in the system
would be changing over time, and it would need to be compatible with the events in the event log. Or does it need
to be compatible with the events in the event log? One could keep events up to a certain point in time in particular systems (e.g. a daily event log), which one could call a snapshot, so with this it’s not necessary to be overly concerned with the versioning aspect. Naturally this would not be possible in some systems and there is &lt;a href=&quot;https://leanpub.com/esversioning&quot;&gt;advice on how to deal with this&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://eventstore.org/docs/event-sourcing-basics/rolling-snapshots/index.html&quot;&gt;Rolling Snapshots&lt;/a&gt; - Given that it may become impractical to replay millions of events we would
need to introduce storing the state when all events of a particular type up to a point have been
replayed. This adds complexity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note [Event Store], &lt;em&gt;“the stream database written from the ground up for event sourcing”&lt;/em&gt;, has useful &lt;a href=&quot;https://eventstore.org/docs/event-sourcing-basics/index.html&quot;&gt;Event Sourcing Basics&lt;/a&gt; reference material. I would recommend reading all the subsections because for example the how to deal with &lt;a href=&quot;https://eventstore.org/docs/event-sourcing-basics/rolling-snapshots/index.html&quot;&gt;Rolling Snapshots&lt;/a&gt; is good to know about.&lt;/p&gt;

&lt;h1 id=&quot;the-command-query-responsibility-segregation-cqrs-pattern&quot;&gt;The Command Query Responsibility Segregation (CQRS) Pattern&lt;/h1&gt;

&lt;p&gt;With this when we have a persistent store, we have a Query Model, which deals with reads, that is distinct from a Command model, which deals with updates, each with its own distinct service interfaces. With this you &lt;em&gt;seperate the components that read and write from your persistent store&lt;/em&gt;. To be clear these components are seperate pieces of software i.e. modules. They may or may not be seperated at run-time.&lt;/p&gt;

&lt;p&gt;The question is, when is this pattern appropriate? What are the trade-offs? Do teams get in trouble when using this pattern (&lt;a href=&quot;https://youtu.be/STKCRSUsyP0&quot;&gt;as Martin Fowler suggests&lt;/a&gt;) and if so why? I’ll adress these
further on.&lt;/p&gt;

&lt;p&gt;It may be worth noting what &lt;a href=&quot;https://youtu.be/STKCRSUsyP0&quot;&gt;Martin Fowler has stated&lt;/a&gt;, which is that this pattern often &lt;em&gt;gets confused&lt;/em&gt; when people claim CQRS should be used in all systems because of how useful it is to have the seperate models for reading things
and populating different models. As Folwer states, at the persistance layer we have been using seperate operational databases (online transaction processing databases) and reporting databases for a &lt;strong&gt;very long time&lt;/strong&gt; and this pattern is almost unversally pervasive. That said, the separation of the update model from the read model in the &lt;strong&gt;service layer&lt;/strong&gt; is rare.&lt;/p&gt;

&lt;p&gt;It is interesting to read the &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs&quot;&gt;Microsoft treatment of the pattern&lt;/a&gt; in conjunction with my most
recent experience of applying Robert C. Martin’s Clean Architecture in an ambitious content management product development effort. In my mind we faced problems similar to what they mention relating to the same POJO being used for read and write operations. An interesting question is whether CQRS would apply at the core layer, that is when it comes to the Domain Driven Designed core layer, or only at specific layers such as at the interactor layer. Robert C. Martin’s Clean Architecture is certain more complex than the traditional CRUD design mentioned in the Microsoft
documentation because traditional CRUD designs don’t have a clean core layer.&lt;/p&gt;

&lt;h1 id=&quot;useful-references&quot;&gt;Useful References&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://pragprog.com/book/brapps/serverless-single-page-apps&quot;&gt;Serverless Single Page Apps - Fast, Scalable and Available&lt;/a&gt; - Ben Rady, The Pragmatic Bookshelf, 2016&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://youtu.be/STKCRSUsyP0&quot;&gt;The Many Meanings of Event-Driven Architecture&lt;/a&gt; - Martin Fowler, GOTO Conference, Chicago 2017&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://martinfowler.com/articles/201701-event-driven.html&quot;&gt;What do you mean by “Event-Driven”&lt;/a&gt; - Martin Fowler, 07 February 2017&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.oreilly.com/library/view/software-architecture-patterns/9781491971437/ch02.html&quot;&gt;Event-Driven Architecture&lt;/a&gt; - Mark Richards, &lt;a href=&quot;https://www.oreilly.com/library/view/software-architecture-patterns/9781491971437/&quot;&gt;Software Architecture Patterns&lt;/a&gt;, O’Reilly Media, February 2015&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/event-driven&quot;&gt;Event-driven architecture style&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=izmjS6ENFKA&quot;&gt;Building Event-Driven Microservices with Event Sourcing and CQRS (Lidan Hifi, Israel)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://eventstore.org/docs/event-sourcing-basics/index.html&quot;&gt;Event Sourcing Basics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://leanpub.com/esversioning&quot;&gt;Versioning in an Event Sourced System&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.infoq.com/news/2017/07/versioning-event-sourcing&quot;&gt;Versioning of Events in Event Sourced Systems&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs&quot;&gt;Command and Query Responsibility Segregation (CQRS) pattern&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://martinfowler.com/bliki/CQRS.html&quot;&gt;CQRS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Wed, 20 Mar 2019 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2019/03/20/name-your-event-driven-architecture-design-patterns.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2019/03/20/name-your-event-driven-architecture-design-patterns.html</guid>
        
        
      </item>
    
      <item>
        <title>From Options Analysis to the Automated Measurement and Management of Architecture Debt</title>
        <description>&lt;p&gt;As a sofware engineer, it is a certainty that, having contributed to and reviewed &lt;em&gt;technical or non-functional&lt;/em&gt; requirements, you’ll be called upon to provide &lt;em&gt;robust solution option analysis&lt;/em&gt; along with costing considerations. In the interest of the &lt;em&gt;robustness&lt;/em&gt;, or the &lt;em&gt;thoroughness&lt;/em&gt;, of an options analysis, which one would expect in an engineering discipline, one technique you could leverage is the &lt;a href=&quot;http://www.nicodewet.com/assets/ATAM_Method_for_Architecture_Evaluation.pdf&quot;&gt;Architecture Tradeoff Analysis Method (ATAM)&lt;/a&gt;. In this post I touch on ATAM, its use in industry and the rearview mirror views of one of its luminary authors, Rick Kazman, roughly 20 years later.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If a software architecture is a key business asset for an organization, then architectural analysis
must also be a key practice for that organization. Why? Because architectures are complex and
involve many design tradeoffs. Without undertaking a formal analysis process, the organization cannot ensure that the
architectural decisions made—particularly those which affect the
achievement of quality attribute such as performance, availability, security, and modifiability—are advisable
ones that appropriately mitigate risks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Architecture Tradeoff Analysis Method (ATAM) is a technique for analyzing software architectures that was developed and refined in practice by the Software Engineering Institute (SEI) at Carnegie Mellon University. Notice that Carnegie Mellon permits unlimited distribution of the &lt;a href=&quot;http://www.nicodewet.com/assets/ATAM_Method_for_Architecture_Evaluation.pdf&quot;&gt;ATAM technical report&lt;/a&gt;, of course reading the material is the easy part.&lt;/p&gt;

&lt;p&gt;Arguably presenting stakeholders with a &lt;em&gt;thorough&lt;/em&gt; options analysis is the bedrock of servant leadership and the mere act of acknowledging the need to openly analyse architectural design tradeoffs, formally and in workshops, is a great step forward for many organizations. ATAM starts with the need to identify the &lt;em&gt;quality attributes&lt;/em&gt; (often called &lt;em&gt;non-functional requirements&lt;/em&gt; which I believe Rick Kazman describes as a &lt;em&gt;dysfunctional term&lt;/em&gt;) of a software architecture. It then proceeds with techniques to providing insight into how quality goals interact with each other and crucially how they trade off against each other.&lt;/p&gt;

&lt;p&gt;Its worth noting that the ATAM principles and practices can and should be applied when it comes to detailed design which may
initially not be regarded as architecturally significant. Requirements and insights into them change rapidly, taking the time to analyse and review options is important at all levels. Arguably agile development practices such as XP are designed to facilitate high bandwidth design review however not necessarily at the level of enterprise or software architecture.&lt;/p&gt;

&lt;p&gt;It’s worth considering &lt;em&gt;why&lt;/em&gt;, if they are sensible, practices such as ATAM are, in my experience at least, not prevalent in industry. As Rick Kazman, one of the authors of the ATAM technical report from 2000, noted in his &lt;a href=&quot;https://youtu.be/PTg8dFNX0gg&quot;&gt;2018 European Conference on Software Architecture keynote&lt;/a&gt; the reason why is because software engineering researchers have failed to factor in the practical and often difficult context(s) that software engineers experience in industry i.e. reality. It is telling that the title of his keynote is &lt;em&gt;Measuring and Managing Architecture Debt&lt;/em&gt; and that he provides the following image to represent the state of &lt;em&gt;the average software project in industry&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/Rick_Kazman_State_Of_The_Practice.png&quot; alt=&quot;rick kazman state of the practice&quot; /&gt;&lt;/p&gt;

&lt;p&gt;He goes on to state that we typically don’t measure the degree to which we are in debt with the debt occuring due to the incremental accumulation of architectural flaws. He goes on to define how he believes the &lt;strong&gt;incremental accumulation of architectural flaws&lt;/strong&gt; take place.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Little tiny design mistakes that programmers make innocenty because they are busy doing their “real job” which is implementing features and fixing bugs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The topic that he addresses is broadly speaking &lt;em&gt;Architecture Health Management&lt;/em&gt;. Of course while there is the notion of incremental accumulation of architectural flaws there are also what I would call &lt;strong&gt;big bang&lt;/strong&gt; manifestations of architectural flaws. These events could be never fit for purpose from the start or when a critical business decision gets made for example a pivot in terms of business strategy.&lt;/p&gt;

&lt;p&gt;In any case, I highly recommend watching the &lt;a href=&quot;https://youtu.be/PTg8dFNX0gg&quot;&gt;cited keynote&lt;/a&gt; on &lt;em&gt;Measuring and Managing Architecture Debt&lt;/em&gt;. Perhaps in time the &lt;em&gt;automated&lt;/em&gt; identification and quantification or architectural
 and design issues (e.g. &lt;a href=&quot;https://www.cs.drexel.edu/~yfcai/papers/2016/icse2016-DL.pdf&quot;&gt;Decoupling Level&lt;/a&gt; measures) that burden projects with ever-increasing maintenance costs will become standard practice. It appears as if the notion is gaining traction with books such as &lt;a href=&quot;https://pragprog.com/book/atcrime/your-code-as-a-crime-scene&quot;&gt;Your Code as a Crime Scene&lt;/a&gt; being published in recent years.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/Rick_Kazman_Final_Thoughts.png&quot; alt=&quot;rick kazman final thoughts&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It is worth noting that at the end of &lt;a href=&quot;https://youtu.be/PTg8dFNX0gg&quot;&gt;Kazman’s presentation&lt;/a&gt; a member of the audience asked about the use of libraries and the rise of functional programming and how that gets factored into automated architectural debt analysis which entails for example Decoupling Level metrics. Good questions
 but they still don’t take away from the benefit of giving architects measures to quantify what they often
 know in their gut, for example that a particular system may be &lt;em&gt;hard&lt;/em&gt; to maintain or test. The resulting benefit being that it arms the architect with hard facts that can be taken to management in terms of why
 they should invest in refactoring (maintenance) rather than building new customer facing features.&lt;/p&gt;

&lt;p&gt;Finally, Kazman provides an answer to a question posed about microservices and DevOps in terms of how relevant
their work is to industry. His answer is that even though a depedency may only exist at runtime its still a
dependency. So the challenge is the extract the same type of metrics (e.g. Decoupling Level) from these
&lt;em&gt;dynamic architectures&lt;/em&gt; but the principles still apply, the challenge is to figure out how to &lt;em&gt;discern dependencies&lt;/em&gt; that exist at runtime.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;A does not call B in a programming language sense, its not a method call or something, its gonna be a message, maybe its a pub-sub or through a broker, or through some other mechanisms.
So, we need different extraction tools to determine the dependencies which are often only established at runtime.
However, once we have that information, the analysis can proceed exactly the same. A dependency is still a dependency.
And so if you have a cycle of dependencies, thats probably a bad thing, whether that was via method calls or via some runtime relationship.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;His final caution on the value of automated analysis is telling with the context of students implementing design patterns incorrectly 75% of the time &lt;em&gt;after&lt;/em&gt; a semester long course on design patterns. He’s
basically saying that patterns are important and of great value but if you cannot analyse them
automatically the flaws will just breed and grow.&lt;/p&gt;
</description>
        <pubDate>Sun, 24 Feb 2019 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2019/02/24/atam-as-a-means-of-providing-robust-solution-option-analysis.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2019/02/24/atam-as-a-means-of-providing-robust-solution-option-analysis.html</guid>
        
        
      </item>
    
      <item>
        <title>Clean Architecture and When To Avoid Libraries</title>
        <description>&lt;p&gt;I recently had the privilige of partaking in the inception phase of a multi-year project that was totally committed to Robert C. Martin’s &lt;a href=&quot;http://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html&quot;&gt;Clean Architecture&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/CleanArchitecture.jpg&quot; alt=&quot;clean architecture&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It was fun, but also timeconsuming. In that regard, although Mr. Martin makes convincing arguments when it comes to motivating designing and building a system using this approach, an excellent companion is &lt;a href=&quot;https://sandofsky.com/blog/third-party-libraries.html&quot;&gt;When To Avoid Libraries&lt;/a&gt; by Benjamin Sandofsky.&lt;/p&gt;

&lt;p&gt;In my mind Mr. Sandofsky makes a more balanced argument because he is pragmatic when he states&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If you’re building a prototype, go with magic&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Magic refers to frameworks and mystical libraries. Prototyping is naturally quite important when requirements are unclear or when spiking a new engineering initiative.&lt;/p&gt;
</description>
        <pubDate>Sat, 16 Feb 2019 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2019/02/16/clean-architecture-and-when-to-avoid-libraries.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2019/02/16/clean-architecture-and-when-to-avoid-libraries.html</guid>
        
        
      </item>
    
      <item>
        <title>Spring Boot React Maven Starter For Agile Developers</title>
        <description>&lt;p&gt;In this post I talk about a &lt;em&gt;&lt;a href=&quot;https://github.com/nicodewet/spring-boot-react-maven-starter&quot;&gt;Spring Boot React Maven Starter&lt;/a&gt;&lt;/em&gt; project set up to basically get agile developers going as fast as possible. What does as fast as possible mean? Also, what’s an agile developer? In other words what overarching principles apply here?&lt;/p&gt;

&lt;p&gt;To answer the first question, &lt;strong&gt;as fast as possible&lt;/strong&gt; means you can run it all up on your local with 3 commands:&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;git clone https://github.com/nicodewet/spring-boot-react-maven-starter.git &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;spring-boot-react-maven-starter/
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mvn clean install
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;java &lt;span class=&quot;nt&quot;&gt;-jar&lt;/span&gt; server/target/server-0.0.1-SNAPSHOT.jar
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There is no Docker (&lt;em&gt;yet - it will come later&lt;/em&gt;) and after the third step you can open http://localhost:8080 in your browser and see the app.&lt;/p&gt;

&lt;p&gt;To answer the second question, &lt;strong&gt;agile developer&lt;/strong&gt; means that working software in production at the end of the first sprint is not negotiable. It also means we accept that our user interface and interpretation of requirements expressed in software is a mere hypothesis, so we want to do everything we can to test the hypothesis as quickly as possible. Infinite scalability when we have 0 users is not a primary concern for example.&lt;/p&gt;

&lt;p&gt;With the context of the cited sample project, to facilitate rapid development the following has been done:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The entire stack gets served from a single Spring Boot application so that we can build a &lt;em&gt;simple&lt;/em&gt; Docker based pipeline to production.&lt;/li&gt;
  &lt;li&gt;The entire app is in a single repo with clearly marked client and server directories.&lt;/li&gt;
  &lt;li&gt;The developer can focus on core concerns and so React (Javascript) &amp;amp; Spring Boot (Java 8), not infrastructure or cloud concerns.&lt;/li&gt;
  &lt;li&gt;A single Maven command packages the app.&lt;/li&gt;
  &lt;li&gt;Multi-module Maven build.&lt;/li&gt;
  &lt;li&gt;No TypeScript - we’ll start with the variant of &lt;a href=&quot;https://facebook.github.io/create-react-app/docs/supported-browsers-features&quot;&gt;Javascript Next features&lt;/a&gt; provided by &lt;a href=&quot;https://facebook.github.io/create-react-app/&quot;&gt;Create React App&lt;/a&gt; out of the box.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, if the above sounds good to you, and perhaps you are stronger when it comes to Spring Boot than React, I’d recommend doing the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Read through Matt Raible’s &lt;a href=&quot;https://developer.okta.com/blog/2017/12/06/bootiful-development-with-spring-boot-and-react&quot;&gt;Bootiful Development with Spring Boot and React&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Checkout the &lt;a href=&quot;https://github.com/nicodewet/spring-boot-react-maven-starter&quot;&gt;repo I created&lt;/a&gt; and satisfy yourself that it works as advertised.&lt;/li&gt;
  &lt;li&gt;Delete the React components and create them from scratch (follow Matt Raible’s tutorial but without TypeScript).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a final note, I think TypeScript is great and the way to go, but not before you have mastered Javascript and Javascript Next.&lt;/p&gt;
</description>
        <pubDate>Thu, 07 Feb 2019 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2019/02/07/spring-boot-react-maven-starter-for-agile-developers.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2019/02/07/spring-boot-react-maven-starter-for-agile-developers.html</guid>
        
        
      </item>
    
      <item>
        <title>The Only Thing Necessary for the Triumph of Faux Agile is that Good Men Do Nothing</title>
        <description>&lt;p&gt;The U.S. Department of Defence recently published an &lt;a href=&quot;https://media.defense.gov/2018/Oct/09/2002049591/-1/-1/0/DIB_DETECTING_AGILE_BS_2018.10.05.PDF&quot;&gt;informative document&lt;/a&gt; on &lt;em&gt;How to Detect ‘Agile BS’&lt;/em&gt;. The schematic they include in the document is simple and &lt;a href=&quot;https://thenewstack.io/the-u-s-department-of-defense-on-how-to-detect-agile-bs/&quot;&gt;some&lt;/a&gt; argue it offers advice to managers on how to fine-tune their projects.&lt;/p&gt;

&lt;p&gt;In actual fact the document offers advice, and a set of questions, to &lt;em&gt;everyone&lt;/em&gt; on a team. This makes it clear, in my mind, that preventing &lt;em&gt;agile-scrum-fall&lt;/em&gt; or &lt;em&gt;faux agile&lt;/em&gt; is a shared responsibility, it does not rest squarely on management shoulders.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/dod-agile-bs.png&quot; alt=&quot;detecting agile bs&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In terms of context, when reading the document I could not help but wonder &lt;em&gt;how&lt;/em&gt; time and again teams (or entire programs of work) remain in the ‘Agile BS’ state.&lt;/p&gt;

&lt;p&gt;Surely at some stage, at least &lt;em&gt;some&lt;/em&gt; individuals must have harboured thoughts to that effect.&lt;/p&gt;

&lt;p&gt;Sadly, in my exeprience, these same invididuals keep quiet - and this is where things start going wrong. As the prolific speaker and author Robert C. Martin (aka &lt;em&gt;Uncle Bob&lt;/em&gt;) said in one of his presentations, when addressing programmers, “you were hired to say no”.&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://thenewstack.io/the-u-s-department-of-defense-on-how-to-detect-agile-bs/&quot;&gt;The U.S. Department of Defense on How to Detect ‘Agile BS’&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://media.defense.gov/2018/Oct/09/2002049591/-1/-1/0/DIB_DETECTING_AGILE_BS_2018.10.05.PDF&quot;&gt;DIB Guide: Detecting Agile BS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Sun, 27 Jan 2019 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2019/01/27/the-only-thing-necessary-for-the-triumph-of-faux-agile-is-that-good-men-do-nothing.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2019/01/27/the-only-thing-necessary-for-the-triumph-of-faux-agile-is-that-good-men-do-nothing.html</guid>
        
        
      </item>
    
      <item>
        <title>Organizational Health and Software Architecture</title>
        <description>&lt;p&gt;I sometimes pick up a business book to broaden my horizons. The latest one happens to be &lt;a href=&quot;https://www.amazon.com/Advantage-Organizational-Health-Everything-Business/dp/1491510803&quot;&gt;The Advantage: Why Organizational Health Trumps Everything Else In Business&lt;/a&gt; by Patrick Lencioni.&lt;/p&gt;

&lt;p&gt;According to Lencioni, an organization needs to be both &lt;em&gt;smart&lt;/em&gt; and &lt;em&gt;healthy&lt;/em&gt; in order to succeed.&lt;/p&gt;

&lt;p&gt;Smart characteristics:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Strategy&lt;/li&gt;
  &lt;li&gt;Marketing&lt;/li&gt;
  &lt;li&gt;Finance&lt;/li&gt;
  &lt;li&gt;Technology&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Healthy characteristics:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Minimal Politics&lt;/li&gt;
  &lt;li&gt;Minimal Confusion&lt;/li&gt;
  &lt;li&gt;High Morale&lt;/li&gt;
  &lt;li&gt;High Productivity&lt;/li&gt;
  &lt;li&gt;Low Turnover&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a sofware engineer, the following statement by Lencioni caught my eye as something to note as it hints at what one may
 suspect. Namely that one cannot expect software engineering expertise, and software architecture in particular, to make
 an &lt;em&gt;unhealthy&lt;/em&gt; organization healthy.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;When an organization is unhealthy, no amount of heroism or technical expertise is going to make up
for the confusion and politics that take root.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It may still be worth asking the question as to whether a software architect and software architecture could have a significantly
negative impact on the health of an organization. In my mind the answer is undoubtedly yes.&lt;/p&gt;

&lt;p&gt;In other words, the actions of a software architect could lead to the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Increasing Levels of Politics&lt;/li&gt;
  &lt;li&gt;Increasing Confusion&lt;/li&gt;
  &lt;li&gt;Lower Morale&lt;/li&gt;
  &lt;li&gt;Lower Productivity&lt;/li&gt;
  &lt;li&gt;Higher Turnover&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my mind, the take-away is to simply bear this in mind and ideally to explicitly include the avoidance of the above as quality attributes when designing a system and engaging with stakeholders.&lt;/p&gt;

&lt;p&gt;One could argue that most would take this for granted, but I don’t think that is prudent.&lt;/p&gt;
</description>
        <pubDate>Fri, 05 Oct 2018 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2018/10/05/organizational-health-and-software-architecture.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2018/10/05/organizational-health-and-software-architecture.html</guid>
        
        
      </item>
    
      <item>
        <title>Developers Should Abandon Agile</title>
        <description>&lt;p&gt;There is no doubt in my mind that daring to be critical of agile methods is career limiting.&lt;/p&gt;

&lt;p&gt;In fact, just recently, with the best of intentions, I inadvertently talked my way out of a job by criticizing agile methods. Putting the same thoughts into writing on my blog is probably even more career limiting. But, I’ve seen development teams
run for the door too many times to say nothing.&lt;/p&gt;

&lt;p&gt;On that note, here I’m whole-heartedly agreeing with Ron Jefferies’ recent &lt;a href=&quot;https://ronjeffries.com/articles/018-01ff/abandon-1/&quot;&gt;Developers Should Abandon Agile&lt;/a&gt; post. Like him I’m a programmer and after 20 years I don’t have any intention of ever stopping.&lt;/p&gt;

&lt;p&gt;At this point, if you are a professional programmer you should stop reading this post and read &lt;a href=&quot;https://ronjeffries.com/articles/018-01ff/abandon-1/&quot;&gt;Ron Jefferies’ post&lt;/a&gt; (or &lt;a href=&quot;https://thenewstack.io/has-agile-programming-lost-its-way/&quot;&gt;this associated article&lt;/a&gt;). I cannot say what he said better than what he did. I will however attempt to distill his advice.&lt;/p&gt;

&lt;p&gt;In essence, rather than focus on whatever agile method you may be asked to use, focus your attention and energy on these two aspects:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;your core skills&lt;/strong&gt;, a part of which should entail writing &lt;strong&gt;clean, refactorable, well tested code&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;releasing&lt;/strong&gt; it in a &lt;strong&gt;consumable fashion with confidence multiple times per day&lt;/strong&gt; to &lt;strong&gt;add real value&lt;/strong&gt; to the business you may be serving&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No matter what agile method you may be asked to use, if you achieve both of the above your stakeholders are likely to be delighted.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update: 4 September 2018&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The following article, which is based on a keynote speach by Martin Fowler at Agile Australia 2018, is strongly supportive of Ron Jeffries views and my own. In it Martin Fowler suggests that the main challenges we should focus on, in 2018, are dealing with &lt;em&gt;faux-agile&lt;/em&gt; and &lt;em&gt;fighting the Agile Industrial Complex&lt;/em&gt;. Indeed.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://martinfowler.com/articles/agile-aus-2018.html&quot;&gt;The State of Agile Software in 2018&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Sat, 23 Jun 2018 00:00:00 +1200</pubDate>
        <link>http://www.nicodewet.com/2018/06/23/developers-should-abandon-agile.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2018/06/23/developers-should-abandon-agile.html</guid>
        
        
      </item>
    
      <item>
        <title>Coding on Crack</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Craic&quot;&gt;Craic&lt;/a&gt; or “crack” is a term that was taught to me by some rowdy Irish lads at &lt;a href=&quot;https://en.wikipedia.org/wiki/Telecom_SudParis&quot;&gt;an engineering school in Paris&lt;/a&gt;. They generally used
the term in the context of enjoyment.&lt;/p&gt;

&lt;p&gt;These times were back in ‘02/’03 just as &lt;a href=&quot;https://en.wikipedia.org/wiki/Bush_shoeing_incident&quot;&gt;Dubya was training for the Bush shoeing incident&lt;/a&gt;. It was a wildly optimistic time of chanting &lt;em&gt;open bar, open bar, open bar&lt;/em&gt; to no avail at the local student pub.&lt;/p&gt;

&lt;p&gt;Since those days, and leaving grad school, I’ve spent a solid 13 years in the software development trenches, mostly getting my hands dirty.&lt;/p&gt;

&lt;p&gt;One of the key lessons I’ve learned in this time is to never compromise on your professionalism and values. In the end, you’ll enjoy yourself a lot more and you’ll probably stay in business longer than the rest.&lt;/p&gt;

&lt;p&gt;This brings me to the &lt;a href=&quot;http://www.acm.org/about-acm/acm-code-of-ethics-and-professional-conduct&quot;&gt;ACM Code of Ethics of Professional Conduct&lt;/a&gt;. It’s worth a read from time to time no matter what your association with the ICT industry and in particular if you call yourself a software engineer. &lt;em&gt;I should read it more often&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.nicodewet.com/assets/coding_on_craic.png&quot; alt=&quot;coding on crack&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 05 Nov 2017 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2017/11/05/coding-on-craic.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2017/11/05/coding-on-craic.html</guid>
        
        
      </item>
    
      <item>
        <title>Re-Wiring Enterprise IT With DevOps</title>
        <description>&lt;blockquote&gt;
  &lt;p&gt;This article chronicles an enterprise experience of introducing DevOps and continuous deployment practices into, from a seasoned 
DevOps practitioners perspective, a virtual Ground Zero with overhead tracer fire. In the spirit of No More Consultants 
this was done in-house at the kiwi enterprise Jukt Micronics by a committed team of veterans and DevOps newcomers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;/assets/Re-Wiring_Enterprise_IT_With_DevOps_13-06-2016.pdf&quot;&gt;Full Article [PDF 749K]&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Thu, 13 Oct 2016 00:00:00 +1300</pubDate>
        <link>http://www.nicodewet.com/2016/10/13/re-wiring-enterprise-it-with-devops.html</link>
        <guid isPermaLink="true">http://www.nicodewet.com/2016/10/13/re-wiring-enterprise-it-with-devops.html</guid>
        
        
      </item>
    
  </channel>
</rss>
