1. We connect, inspire and guide women in computing and organizations
that view technology innovation as a strategic imperative.
From Monolith to Microservices
(Technology is the Easy Part)
Paula Paul
Architect, AmWINS Group, Inc.
paula.paul@paulapaul.com
ABSTRACT
‘From Monolith to Microservices’ is a .NET legacy
software adventure story. The presentation addresses
technical topics including microservices architecture, state
management, REST API and messaging for business
systems using Microsoft Azure. The presentation also
illustrates the people aspects of legacy system
transformation, and perspectives on why ‘technology is the
easy part’.
AUDIENCE
This is a technical presentation, for industry software
architects, engineers, and IT managers or executives
interested in a microservices implementations.
INTRODUCTION
All legacy software has a story to tell. This is a story of
legacy .NET software, and the long and sometimes perilous
journey from monolith to microservices. Microsoft .NET
celebrated its fifteenth birthday this year (Massai, 2017);
and while .NET is still alive and well, it has evolved
significantly in the past 15 years. For a business that relies
on systems written in .NET, when should a legacy story
begin, and how does it end?
Episode I: Legacy software, a phantom menace?
Not all legacy software is a problem; but, the first step with
aging software is admitting that you may have a problem
before you do. If aging software supports a multi-million-
dollar business, is there a need to fix something that works?
How can you tell if software is aging well, or if it is on a
path to becoming an operational risk? Is it time to plan for
a minor retrofit, or a complete overhaul? Early warning
signs of legacy risk include:
Difficulty hiring people who want to learn or work with
the language, framework, or platform;
‘Untamed JavaScript’ (lack of JavaScript framework);
Rationalizing monitoring trends (e.g. Dynatrace User
Experience Index), because users aren’t complaining;
Calling DBA warriors to battle: SPID killing rampages,
invoking Read Committed Snapshot Isolation (RCSI)
as a false hero, and buying time with SQL replication
to ‘scale out’ an application across multiple databases,
without refactoring code.
Enter our heroine, the Architect.
Episode II: Setting the story in motion
Knowing when, and how, to set a legacy story in motion is
an art. Technical analysis of the system and warning signs
is a first step, but to chart a course forward, our heroine will
need to bargain with and navigate the generations of
industry software engineers:
20’s: Can make anything work; may not be able to
explain why or how. Documentation = read the code
30’s: Can make anything work; may have strong
opinions about how, and questions about why.
Documentation = annotate the code
40’s: Can make anything work in the stack they’ve
mastered, using design patterns they’ve mastered.
Documentation = ERD, or ask the business analyst
Simple, clear language is the best way to navigate
generational chasms, and avoid getting cut on the bleeding
edge. Chanting the words ‘microservices’ and ‘service bus’
2. We connect, inspire and guide women in computing and organizations
that view technology innovation as a strategic imperative.
can conjure demons who will paint your story as bleeding
edge risk taking. Keep things simple:
This is one
way to
enable
distributed
computing.
If DBAs
scale out a
system using SQL Replication, that is also a way to enable
distributed computing; SQL maintains the transaction log,
and pushes ‘state’ (data) to different containers. There are
other tools in the distributed computing toolbox, and no
need to get cut on the bleeding edge. Simple diagrams,
simple terms, and sticking with the basics can win the battle.
In this architecture, every microservice ‘container’ is fully
responsible for maintaining its own internal state (data). It
can be a challenge for DBAs to relinquish control of state
management and SQL Replication. But, we can free our
microservices from SQL replication with a simple ‘Publish-
Subscribe (Pub-Sub) approach, using Azure Service Bus
(ASB) Topics. Microsoft ASB is a collection of
technologies, and ASB Topics allow a subscribing service
to filter some or all the messages to only the messages it is
concerned with (Microsoft Corporation, 2017).
Emphasizing the
use of ‘Pub-Sub’
with microservices
can help with ASB
adoption, since
Pub-Sub is a
pattern familiar to
DBAs who manage
SQL replication. With ASB we can start a transition from
replication of concerns to separation of concerns.
To support downstream reporting and analytics,
microservices can use ASB to publish the relevant data
through an Azure Data Factory pipeline, to data marts in
Azure Data Warehouse. Although the options to move
away from traditional ETL and SQL replication can be
explained simply, the work can involve complex
organizational terraforming. The journey from monolith to
microservices is a marathon, not a sprint.
Turning our sights from back end microservices to front end
architecture brings new adventures. A ‘Microsoft Shop’
with legacy software may have a mix of front end
technologies, from gun-metal grey Visual Basic
applications, to classic ASP.NET and .NET MVC.
Depending on the generation, there may be varying levels
of comfort with JavaScript, or doubts that JavaScript can be
engineered at all. In addition, there may hurdles around the
concept of ‘open source’.
Since most organizations now embrace web development
for business applications, it is important for all involved to
understand that Microsoft did not invent the bedrock web
development technologies:
When business users
interact with systems
through a browser,
which understands
HTML, CSS and
JavaScript, front end engineering is needed. We can tame
the JavaScript dragon, and free the software from ‘third
party controls’. Our next adventure: What’s the best
JavaScript framework for a .NET shop? In this battle, we
need a non-Microsoft ally.
JavaScript frameworks are a labyrinth full of demons. To
survive, it’s best to join forces with a component oriented
framework (Salesforce, 2015):
Where is
Angular?
Look past the
framework
names, and
focus on the
vendors.
Polymer, Angular 1, and Angular 2 are Google frameworks,
and the armies of Angular 2 and Polymer are converging.
For a ‘Microsoft Shop’, the battle was won when Google
partnered with Microsoft on TypeScript (Lardinois, 2015).
Angular 2 and TypeScript offer a perfect front line for our
back-end .NET Core microservices.
3. We connect, inspire and guide women in computing and organizations
that view technology innovation as a strategic imperative.
With front and back end demons slain, we’ve earned a
chance at the final and most perilous test. It’s time to run the
gauntlet of operations.
Microsoft Azure allows developers to treat infrastructure as
code. The operations team can partner with engineers on:
Release Management: Automated buildCI and release
management in Azure with scripted infrastructure.
Security: AuthenticationAuthorization with Azure
Active Directory and Identity Server 4
Scalability and Reliability: Azure Application Service
scale-up or scale-out (automatic or manual)
Telemetry: Azure Application Insights and connectors
Distributed state management for initialization, point in
time restore, or when disaster strikes
This last bullet presents interesting challenges for a
distributed system. We’ll consider one approach, using
ASB Topics and a message store.
Episode III: Five stages of legacy grief, in pictures
Denial, Anger, Bargaining, Depression, Acceptance
Episode IV: A New Hope (pun intended)
Our heroine has vanquished challengers from front end to
back end, and run the gauntlet of operations. But how can
she keep the new microservices from becoming the next
‘legacy software’ story? The quests ahead include:
If sprint boards are only for User Stories, where do we
manage scalability, reliability, manageability, and
security stories? And ‘upgrade legacy’ stories?
Who is the “Director of Dependencies”? If ongoing
review of package and framework versions is not part
of sprint planning, we’ll have another legacy story
before we can say ‘Episode Five’.
Put the costs in perspective. How much time and
money is put into legacy transformation? It’s cheaper
to invest in processes to avoid legacy problems.
OUTCOMES/CONCLUSION
Remember, not all legacy software is a problem. But, when
there is technical evidence of a potential problem, it may be
time to begin a new chapter. The quest can be a challenging
and amazing adventure in navigating generations of
engineers, de-mystifying microservices, slaying JavaScript
demons, and running the gauntlet of operations. This story
was set in a Microsoft Azure universe, but the concepts and
technologies apply just as well in an Amazon Web Services
or Heroku world. There are ways to avoid the perception of
‘bleeding edge’ with simple and clear language; the
containers for our ‘microservices’ can be as large or as small
as we need them to be, and we can rely on tried and true
APIs and Pub-Sub for state (data) management. And, at the
end of the story, the most important episode is finding ways
to avoid the sequel.
PARTICIPATION STATEMENT
If accepted, I am committed to attending Grace Hopper
2017 and meeting all presentation requirements.
BIO
Paula Paul, Architect, AmWINS Group, Inc.
Paula entered the workforce as a
software engineer after an
internship with IBM in the early
80’s. Since then she has shipped
commercial software,
evangelized .NET for Microsoft,
and held executive positions in
corporate IT. After ‘flipping the
table’ mid-career, she came back
to technology through a passion for teaching people to code.
Paula is currently an architect with AmWINS Group, Inc.
and enjoys work in the community as an ABI Syster,
diversity speaker, and mentor. LinkedIn:
https://www.linkedin.com/in/paulapaul
REFERENCES/BIBLIOGRAPGHY
Lardinois, F. (2015, Mar 5). Microsoft And Google
Collaborate On Angular 2 Framework, TypeScript
Language. Retrieved from Techcrunch:
https://techcrunch.com/2015/03/05/microsoft-and-
google-collaborate-on-typescript-hell-has-not-frozen-
over-yet/
Massai, B. (2017, Feb 13). Happy 15th Birthday .NET!
Retrieved from .NET Blog:
https://blogs.msdn.microsoft.com/dotnet/2017/02/13/hap
py-15th-birthday-net/
Microsoft Corporation. (2017, 1 10). Azure Service Bus.
Retrieved from Azure Service Bus Messaging:
https://docs.microsoft.com/en-us/azure/service-bus-
messaging/service-bus-fundamentals-hybrid-solutions
Salesforce. (2015, Mar 26). Building your UI with
Salesforce1 Lightning. Retrieved from SlideShare:
https://www.slideshare.net/Salesforce/building-your-ui-
with-salesforce1-lightening