from legacy to state-of-the-art; architectural refactoring · example of refactoring goals +...
TRANSCRIPT
From Legacy to State-of-the-art; Architectural Refactoringby Gerrit Muller University of South-Eastern Norway-NISE
e-mail: [email protected]
Abstract
The market of electronic appliances shows a fast increasing diversity. Manufac-turers must be able to combine existing functions and new applications in a shorttime frame. A large amount of accumulated SW code (legacy) has to be reusedin new ways.The architecture(s) must be adapted to these new ways of working. Revolu-tionary adaptations have proven to be extremely risky. Opportunistic extensionand integration decrease the quality of the code base, making it increasingly moredifficult to continue. Architectural refactoring is a feedback based method to evolvean architecture.
Distribution
This article or presentation is written as part of the Gaudí project. The Gaudí projectphilosophy is to improve by obtaining frequent feedback. Frequent feedback is pursued by anopen creation process. This document is published as intermediate or nearly mature versionto get feedback. Further distribution is allowed as long as the document remains completeand unchanged.
June 21, 2020status: finishedversion: 1.3
TV domain HW Computin
g HW
TV domain platform
TV computing
Infra- structure
TV applications
TV Hybrid TV Digital TV
"All-in-one" combi TV
Set Top Box domain HW
Set Top Box Platform
M H P
Set Top Box
functions 3 rd party stack(s)
Computing HW TV domain HW
Computin g HW
TV domain platform
TV computing
Infra- structure
TV applications
Digital Video Platform SW
Set Top Box domain HW
M H P
Set Top Box
functions 3 rd party stack(s)
Computing HW TV domain HW
TV domain platform
TV computing
Infra- structure
TV applications
Digital Video Platform SW
Set Top Box Platform
Digital TV UI
Set Top Box domain HW
TV domain HW Computing HW
Digital Video Platform SW
M H P
Set Top Box functions
TV domain platform
TV computing
Infra- structure
Set Top Box Platform
3 rd party stack(s)
TV applications
storage domain HW
Storage applications
Digital TV UI
Storage srvices
PDP DVR
DVD RW
Set top
elec. Digital Cable
Gate way
ADSL TV2
re- ceiver
portable media- screen
trans mitter
game console
Today’s Audio Video Consumer Products
DVD
VCR
Audio Mini
Audio
Audio Portable
CD man
TV
Walkman Hard Disk
From
: CO
PA
tuto
rial,
Rob
van
Om
mer
ing
From Legacy to State-of-the-art; Architectural Refactoring2 Gerrit Muller
version: 1.3June 21, 2020
ARproductsRvO
Trend: Convergence of separate worlds
Telecom
Consumer
Computer
From Legacy to State-of-the-art; Architectural Refactoring3 Gerrit Muller
version: 1.3June 21, 2020
LWAconvergence
Integration and Diversity
mp3
dvd
set top box
flat display
pen
speech
cable
modem
firewall
Ambient Intelligence
living room
car
car navigation
pda
surveillance
camera
camera
GSM phone
computerCommunicator
television
games
sailboat
audio
microset
headphone
garment
watch
From Legacy to State-of-the-art; Architectural Refactoring4 Gerrit Muller
version: 1.3June 21, 2020
LWAintegrationAndDiversity
Today’s Video Products
Conventional TV
Set Top Box
Video Recorder
DVD Player
Cable Modem
PC
From Legacy to State-of-the-art; Architectural Refactoring5 Gerrit Muller
version: 1.3June 21, 2020
ARcurrentProducts
Evolution of Video Products
TV VCR
DVD
Set top
TV VCR
DVD
PDP VCR
DVD
Set top
elec.
Digital Cable
Digital Cable
Analog Cable
PDP DVR
DVD RW
Set top
elec. Digital Cable
Gate way
ADSL TV2
Multiple inputs Multiple stores Multiple displays Multiple applications Multiple formfactors
1
2
3
4 re-
ceiver
portable media- screen
trans mitter
game console
From Legacy to State-of-the-art; Architectural Refactoring6 Gerrit Muller
version: 1.3June 21, 2020
ARproductEvolution
Distribution Scenario’s
Network
Thin Clients
All-in-one Server
All-in-one Combi's
Thin Servers
Clients
Network
Network
B A C
Network
Server
Server
Server
Client
Client
Client
D "All-in-one"
Combi's "Thin Servers"
"All-in-one" Home server
"Modular"
From Legacy to State-of-the-art; Architectural Refactoring7 Gerrit Muller
version: 1.3June 21, 2020
ARproductScenarios
Product Packaging Options
TV2
PDP DVR
DVD RW
Set top
elec. Digital Cable
Gate way
ADSL TV2
4A re-
ceiver
portable media- screen
trans mitter
game console
PDP DVR
DVD RW
Set top
elec. Digital Cable
Gate way
ADSL TV2
4B re-
ceiver
portable media- screen
trans mitter
game console
PDP DVR
DVD RW
Set top
elec. Digital Cable
Gate way
ADSL
4D re-
ceiver
portable media- screen
trans mitter
game console
PDP DVR
DVD RW
Set top
elec. Digital Cable
Gate way
ADSL TV2
4C re-
ceiver
portable media- screen
trans mitter
game console
"All-in-one" Digital TV
"Thin Servers" "All-in-one" Home server
"Modular"
TV2
From Legacy to State-of-the-art; Architectural Refactoring8 Gerrit Muller
version: 1.3June 21, 2020ARpackaging
Moore’s law
1965 1979
2000 1990
1 kB
64 kB2 MB
Moore's law
Fro
m: C
OP
A tu
toria
l, R
ob
va
n O
mm
erin
g
From Legacy to State-of-the-art; Architectural Refactoring9 Gerrit Muller
version: 1.3June 21, 2020
LWAmooresLawRvO
Problem: increasing SW size, decreasing reliability?
1000
100
10
man
year
s p
er
prod
uct
1990 1995 2000 2005
1000
10000
typi
cal a
mou
nt o
f er
rors
per
pro
duct
From Legacy to State-of-the-art; Architectural Refactoring10 Gerrit Muller
version: 1.3June 21, 2020
ARproblem
The Holy Grail: Reuse
REUSE
time
$$
Prom
ise
Reality
From Legacy to State-of-the-art; Architectural Refactoring11 Gerrit Muller
version: 1.3June 21, 2020
ARtheHolyGrail
Simplistic Architecting: Digital TV
Set Top Box domain HW
Set Top Box Platform
MHP
Set Top Box
functions 3 rd party stack(s)
Computing HW
TV domain HW Computing
HW
TV domain platform
TV computing
Infra- structure
TV applications
Digital Video Platform SW
Set Top Box domain HW
TV domain HW Computing HW
analog TV Set top box
Digital Video Platform
Set Top Box domain HW
TV domain HW Computing HW
Digital Video Platform SW
Set Top Box Platform
MHP
Set Top Box
functions 3 rd party stack(s)
TV domain platform
TV computing
Infra- structure
TV applications
Digital TV UI
Digital TV
Merge
glue
From Legacy to State-of-the-art; Architectural Refactoring12 Gerrit Muller
version: 1.3June 21, 2020
ARdigitalTelevisionSimplisticArchitecture
Available Code Assets
>100 Myr
>100 Myr
>200 Myr >100 Myr
Set Top Box domain HW
TV domain HW Computing HW
Digital Video Platform SW
Set Top Box Platform
MHP
Set Top Box
functions 3 rd party stack(s)
TV domain platform
TV computing
Infra- structure
TV applications
Digital TV UI
"Legacy" code > 500 Myr
glue
From Legacy to State-of-the-art; Architectural Refactoring13 Gerrit Muller
version: 1.3June 21, 2020
ARdigitalTelevisionCodeAssets
Merge problems
tuner tuner MPEG MPEG
Duplication
Architectural mismatch : wrappers, translators, conflicting controls
Poor performance; additional resource usage
additional code and complexity,
no added value
UI UI
non problem Problems Architecture Reuse
From Legacy to State-of-the-art; Architectural Refactoring14 Gerrit Muller
version: 1.3June 21, 2020
ARmergeProblems
Solution: Architectural Refactoring
Refactoring
within short term business goals
with limited but substantial refactoring goals
clear product clear value proposition
feedback on direction
limited investment based on long term architecture vision
From Legacy to State-of-the-art; Architectural Refactoring15 Gerrit Muller
version: 1.3June 21, 2020
ARsolution
Example of Refactoring Goals
+ Decrease Code Size
+ Decrease Resource Usage * power * memory * silicon area
+ Increase Performance * response time * throughput
Qua
lity
time
0%
10%
20%
Improvement investment as percentage of total budget
+ Increase quality * decrease fault density
From Legacy to State-of-the-art; Architectural Refactoring16 Gerrit Muller
version: 1.3June 21, 2020
ARrefactoringGoals
Architectural vs Code refactoring
optimize() ...
add(a) ...
remove() ...
move() ...
accelarate() ...
add(a) ...
remove() ...
optimize() ...
move() ...
accelarate() ... add(a)
... remove()
...
Code Refactoring
old
new
old
new
new
Architectural Refactoring Function, Structure, Rationale
Mechanisms, Technologies
return( error )
free, alloc
raise( exception )
garbage collection
old
From Legacy to State-of-the-art; Architectural Refactoring17 Gerrit Muller
version: 1.3June 21, 2020
ARcodeVersusArchitecturalRefactoring
Prerequisite 1
Frequent feedback
From Legacy to State-of-the-art; Architectural Refactoring18 Gerrit Muller
version: 1.3June 21, 2020
Feedback
3 months
25 months
Start
Target
stepsize:
elapsed time:
From Legacy to State-of-the-art; Architectural Refactoring19 Gerrit Muller
version: 1.3June 21, 2020
LWAfeedbackLarge
Feedback (2)
3 months
25 months
2 months
12 months
Start Start
Target Target
stepsize:
elapsed time
From Legacy to State-of-the-art; Architectural Refactoring20 Gerrit Muller
version: 1.3June 21, 2020
LWAfeedbackMedium
Feedback (3)
3 months
25 months
2 months
12 months
1 month
8 months
Start Start Start
Target Target Target
stepsize:
elapsed time
Small feedback cycles result in Faster Time to Market
From Legacy to State-of-the-art; Architectural Refactoring21 Gerrit Muller
version: 1.3June 21, 2020
LWAfeedbackSmall
Prerequisite 2
Awareness of dynamics
From Legacy to State-of-the-art; Architectural Refactoring22 Gerrit Muller
version: 1.3June 21, 2020
Myth: Platforms are Stable
Architecture
Platform
Dynamic Market
Fast changing Technology
How stable
is a platform
or an architecture?
Components
From Legacy to State-of-the-art; Architectural Refactoring23 Gerrit Muller
version: 1.3June 21, 2020
LWAplatformStability
Platform Evolution (Easyvision 1991-1996)
1991
1992
1994
1991
1994
Last changed in:
Growth
Change
3rd
generation components are mature, active maintenance needed.
Growth and change continues, some "old" components become obsolete
1992
1996
From Legacy to State-of-the-art; Architectural Refactoring24 Gerrit Muller
version: 1.3June 21, 2020
LWAplatformEvolution
Prerequisite 3
Long Term Vision
From Legacy to State-of-the-art; Architectural Refactoring25 Gerrit Muller
version: 1.3June 21, 2020
Example Long Term Vision
Computing Infrastructure
Domain Infrastructure
Services Applications
Config
urati
on
i.e. In
terna
tiona
lizati
on
perso
naliz
ation
i.e. tu
nes,
themes
Framework
Long Term Vision: Reference Architecture + Sample implementation of Framework and Components
Reference Architecture
From Legacy to State-of-the-art; Architectural Refactoring26 Gerrit Muller
version: 1.3June 21, 2020
ARlongTermVisionExample
Don’t do
PDP DVR
DVD RW
Set top elec. Digital
Cable
Gate way ADSL TV2
re- ceiver
portable media- screen
trans mitter
game console
PDP
DVR
DVD RW
Set top
elec.
Gate way
re- ceiver
trans mitter
Digital TV
Opportunistic Legacy
Integration
Proclaimed reuse
Set Top Box domain HW TV domain HW Computing HW
Digital Video Platform SW
Set Top Box Platform
MHP
Set Top Box
functions
3 rd
party stack(s)
TV domain platform
TV computing
Infra- structure
TV applications
Digital TV UI
glue
From Legacy to State-of-the-art; Architectural Refactoring27 Gerrit Muller
version: 1.3June 21, 2020
ARtheWrongWay
Conclusion: Refactoring the Architecture is a must
TV domain HW Computin
g HW
TV domain platform
TV computing
Infra- structure
TV applications
TV Hybrid TV Digital TV
"All-in-one" combi TV
Set Top Box domain HW
Set Top Box Platform
M H P
Set Top Box
functions 3 rd party stack(s)
Computing HW TV domain HW
Computin g HW
TV domain platform
TV computing
Infra- structure
TV applications
Digital Video Platform SW
Set Top Box domain HW
M H P
Set Top Box
functions 3 rd party stack(s)
Computing HW TV domain HW
TV domain platform
TV computing
Infra- structure
TV applications
Digital Video Platform SW
Set Top Box Platform
Digital TV UI
Set Top Box domain HW
TV domain HW Computing HW
Digital Video Platform SW
M H P
Set Top Box functions
TV domain platform
TV computing
Infra- structure
Set Top Box Platform
3 rd party stack(s)
TV applications
storage domain HW
Storage applications
Digital TV UI
Storage srvices
PDP DVR
DVD RW
Set top
elec. Digital Cable
Gate way
ADSL TV2
re- ceiver
portable media- screen
trans mitter
game console
From Legacy to State-of-the-art; Architectural Refactoring28 Gerrit Muller
version: 1.3June 21, 2020ARrefactoring