Documente Academic
Documente Profesional
Documente Cultură
LECTURE 10
ARCHITECTING SOFTWARE SYSTEMS DESIGN
© LGChan
SDM 5001 SYSTEMS ARCHITECTURE
LECTURE 10.1
APPLICATIONS OF SOFTWARE AND INFORMATION
TECHNOLOGY SYSTEMS ARCHITECTURE
© LGChan
Software and Information Technology Systems
Characteristics
o Software architecture
o refers to the high level structures of a software system
o is set of structures (models) need to describe about the system, which comprise
software elements, relations among them, and properties of both elements and
relations (Clements, Bass, Kazman 2012)
o Software and Information Technology Systems must be integrated with
Hardware, it cannot operate independently
o Cost Structure of Software
o Software: low delivery costs, high design and certification costs
o Hardware: high design, manufacturing and delivery costs
o Examples
Software: Computer Architecture, Database Architecture System, Internet
IT Hardware: Micro-Processor Architecture, Integrated Circuit Architecture
3
© LGChan
Market Strategies of Software Architectures
Build to Change instead of building to last
o Consider how the application may need to change over time to address new requirements
and challenges, and build in the flexibility to support this
5
© LGChan
Success Factors in Open Architectures of Software
Successful architectures tend to be proprietary, but also open at the same time
6
© LGChan
5 Principal Stages of Architectural Competition
… provide structure to the chaos
Commitment
The owner of the dominant architecture can quietly and precisely raise the hurdles
- (whenever a particular competitor begins to pose a threat) by modifying the architecture
‘Point product’ vendors (eg. Lotus/EXCEL) are always at risk when the architectural
leader changes the rules of the game
IBM opened its architecture too broadly vs Apple held its architecture too closed
9
© LGChan
3 PRINCIPLES OF ARCHITECTURE OF SOFTWARE SYSTEMS
10
© LGChan
Principle 1 Separation of Concerns
11
© LGChan
Principle 2 Cohesion
Cohesion refers to the degree to which the elements of a software module belong together in
computer science,
Cohesion can be used as a measure of how strongly related the functions in a module are
It is desirable to have strong cohesion in a module
Example
In a module, it is prefer to keep frequently used functions within the module
This will reduce time to access external functions
12
© LGChan
Principle 3 Coupling
Coupling refers to the degree of dependency between two modules
We always want low coupling between modules
Systems with high cohesion and low coupling would automatically have separation of concerns, and vice versa
13
© LGChan
Cohesion Coupling
Measure of Strength of Measure of Interdependence
association of elements within of one module to another
module
Degree of responsibility of a Describes relationship
single component form a between software components
meaningful unit
Property or Feature of an Property or Feature of a
individual module collection of modules
14
© LGChan
SDM 5001 SYSTEMS ARCHITECTURE
LECTURE 10.2
NETWORK AND CLOUD ARCHITECTURE
© LGChan
Monolith Software Architectures
Micro-Kernel Architecture
Monolith Architectures Modular Monolith contains logical grouping A monolithic core system with
Layered Monolith Architecture
contain a collection of loosely related of functionality with well defined isolation an modular API
classes between modules that allows physical plug-in
enhancements
2
© LGChan
Software Network Architecture 1
Point-to-Point Architecture
o A collection of independent systems which are connected through a network
o All systems have equal rights and can both use and provide services
o Each system has its own storage
o All new systems are connected directly with existing systems:
resulting in increasing number of interfaces
© LGChan
Software Network Architecture 2
Hub-and-Spoke Architecture
o A central hub takes over responsibility for communications between systems
o Minimize growing interface complexity
o Allows seamless data exchanges
Application 1 Application 2
Application 5 Application 4
© LGChan
Software Network Architecture 3
Pipeline Architecture
o Independent systems along the value-added chain are integrated using a message data
bus (instead of hub)
o Allows more systems to be connected as the bus can be stretched over longer distances
Bus
© LGChan
Enterprise Service Bus
An enterprise service bus (ESB) is a software
architecture model used for designing and
communicating between interacting software
applications in a service-oriented architecture (SOA)
6
© LGChan
Enterprise Service Bus
Client and Business Services and Performance
Partner
Services Application and Data Access Service
Example of
Layered Infrastructure Services
Architecture
© LGChan
Service Oriented Architecture
o A service-oriented architecture (SOA) is the implementation of software architecture in a
business environment in which application components provide services to other
components via a communications protocol, typically over an enterprise service bus
o SOA consists of independent software applications that have well defined interfaces, and
are orchestrated/managed through loose coupling between software applications
Infrastructure
Services
Client
Business
Services
8
© LGChan
Event-Driven Architectures
Event-driven architectures (EDA) integrate several independent systems together using message queues
Broker
Interactions between the source and the target applications can be as complex as necessary
Examples of Connection Rules : data mapping rules, security rules, and availability rules
10
© LGChan
Creating Service Oriented Architecture – Systems Pattern 2
Broker SOA (Broker Event Architecture)
Similar to Direct Connection
Service call from a source application is routed through a broker,
and then to several target applications (this reduces number of 1: 1 connections)
Distribution rules are separate from application logic
Connection Pattern (interface) : depend broker rules
Application 2
Broker Rules
Application 3
11
© LGChan
Creating Service Oriented Architecture – Systems Pattern 3
Router SOA (Mediator Event Architecture)
Router decides which target application will receive the interaction
Router pattern only allows 1:1 connections (vs broker pattern supports 1:N connections)
Connection Pattern (interface) - router rules determine the target application
Application 2
Broker Rules
Application 3
12
© LGChan
Distributed Computing
Distributed computing brings together a network of computers to solve a computation problem
Individual computers in the grid allows its own processing time to be used to solve a large problem
A distributed computing architecture consists of a number of client machines with lightweight
software agents installed with one or more dedicated distributed computing management servers
Examples: block chain, high performance computing, weather forecasting, SETI project, Hadoop
Node
Node
Node Node
Distributed Computing 13
© LGChan
Grid Computing
Grid computing is an infrastructure enabling the integrated,
collaborative use of multi location computing resources in different organizations
It is a large scale version of distributed computing system with non-interactive workloads that
involve a large number of files and applications
Examples: Hadron Collider at CERN, DOE Particle Physics Data grid, torrent
Application
Application
14
© LGChan
WEB SERVICES ARCHITECTURE DESIGN PATTERNS
15
© LGChan
Web Services Layered Architecture
UDDI Find Web services which meet certain requirements
Service Discovery (Universal Description, Discovery and Integration)
XML (Extensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format which is both
human-readable and machine-readable WSDL
UDDI (Universal Description, Discovery, and Integration) is a XML-based registry for businesses worldwide to list themselves on the Internet
WSDL (Web Service Definition Language) is an XML format for describing network services as a set of endpoints operating on messages
containing either document-oriented or procedure-oriented information
SOAP (Simple Object Access Protocol) is a messaging protocol that allows programs that run on disparate operating systems to communicate
using Hypertext Transfer Protocol (HTTP) and XML
16
(Ref: http://www.w3schools.co©
m/L)GChan
Client Server Systems Architecture Pattern
request
Two Tier
(Classic Model)
client server
response
Three Tier
client server
Server/client
N Tier
server
17
© LGChan
Peer-to-Peer Systems Architecture Pattern
peer
peer
peer
peer
peer
peer
peer
Example:
BitTorrent
Gnutella
eDonkey
Skype
18
© LGChan
CLOUD COMPUTING ARCHITECTURE
19
© LGChan
Cloud Computing – Concept of Operations
Social Networks,
Scientific Computing,
Enterprise Applications
Applications (SaaS)
Frameworks for
Cloud Application
Development
Middleware (PaaS)
Virtual hardware,
networking, OS images,
and storage Hardware and OS (IaaS)
20
© LGChan
NIST Conceptual Reference Architecture
21
NIST 2011 Cloud Computing Reference Architecture © LGChan
Service Orchestration
Service Orchestration is the composition of systems components to support the Cloud Services
Providers activities in arrangement, coordination and management of computing resources in
order to deliver cloud services to Cloud Consumers
Service Layer
Define interfaces for Cloud Consumers to access computing services
Example: Web Services
22
© LGChan
Interactions of Stakeholders
24
NIST 2011 Cloud Computing Reference Architecture © LGChan
CLOUD COMPUTING SERVICE MODELS
25
© LGChan
Three Cloud Deployment Models
SaaS PaaS IaaS
Software as a Service Platform as a Service Infrastructure as a Service
o Capability provided to the
o Capability provided to the o Capability provided to the
consumer is to use the consumer is to deploy onto consumer is to provision
provider’s applications the cloud infrastructure processing, storage,
running on a cloud consumer-created or networks, and other
infrastructures acquired applications fundamental computing
created using programming resources where the
languages, libraries, consumer is able to deploy
o Applications are accessible services, and tools and run arbitrary software,
from various client devices supported by the provider which can include operating
through either a thin client systems and applications
interface, such as a web
browser (e.g., web-based o Consumer does not manage
email), or a program or control the underlying o Consumer does not manage
interface cloud infrastructure or control the underlying
including network, servers, cloud infrastructure but has
operating systems, or control over operating
o Consumer does not manage storage, but has control
or control the underlying systems, storage, and
over the deployed deployed applications; and
cloud infrastructure applications and possibly possibly limited control of
including network, servers,
operating systems, storage, configuration settings for select networking
the application-hosting components (e.g., host
or even individual environment firewalls)
application capabilities
26
© LGChan
SaaS Scope of Control and Software Stack
27
© LGChan
PaaS Scope of Control and Hardware Component Stack
28
© LGChan
IaaS Scope of Control and Component Stack
Application eg email
No Control Total Control
Middleware eg Java
Guest Operating System
Admin Control Hypervisor Make Requests
Total Control Hardware
No Control
29
© LGChan
CLOUD COMPUTING DEPLOYMENT MODELS
30
© LGChan
Cloud Deployment Configurations
31
© LGChan
3-4-5 Principle of Cloud Computing
Applicatio n SaaS
Runtime PaaS
32
© LGChan
INTERNET OF THINGS MODELS
33
© LGChan
Characteristics of Internet of Things
Distributive
o Highly distributed environment
o Data from many different sources and processing centers
Interoperability
o Data exchange seamlessly to achieve common goals
Scalability
o Increasing number of connected devices –Machine2Machine,Machine2Human
o Infrastructure scalable
Resources Scarcity
o Heavy demand on power consumption of devices and computing resources
Security
o Concerns with data privacy and network security 34
© LGChan
Network of Layered Architectures
7 Application Layer Application Business Layer
35
Reference Wu Lu Ling 2010 Research on Architecture of Internet of Things. 2010 3rd International Conference on Advanced Computer Theory and Engineering © LGChan
Layered Internet of Things Architecture
Business
Uses final results for business application.
May require additional tools to achieve this
Application
Analyzes data for decision making and action.
Require additional tools to enable final
application, eg mobile phones, smart cards
Middleware
Receives data from Network.
Manage and store data for further processing.
Transmits data to application layer for analysis
Network
Processing collects data from various sensors.
Cloud technology is used here because it has
reliable and dynamic interface
Sensors
Perceive physical properties of environment
and convert information to digital signals.
RFID, WSN, GPS, NFC technologies are used
36
© LGChan
Sensing Technologies
Auto-ID
38
© LGChan
Sensing Technologies
Wireless Sensor Networks (WSN)
o Distributed network of sensor nodes to monitor states such as location,
movements, environment
o Sensor nodes are connected in a wireless multi-hop design
Sensing results are reported to a smaller number of special nodes (sinks or
base stations)
Applications : GE jet engines, American Airlines airplane
39
© LGChan
Middleware
Software Interface between Physical Layer and Transport Layer
o Hides complexity of
numerous heterogeneous
devices
Sensor Cloud
Architecture
40
Source: http://www.hindawi.com/journals/ijdsn/2013/917923/
© LGChan
Example: IoT in Road Vehicle Monitoring
41
Source: Li Cheng Zhou 2015 Road Vehicle Monitoring System Based on Intelligent Visual Internet of Things . Journal of Sensors Volume 2015 © LGChan
Example: IoT Application in Enterprise
DEVICES CLOUD ENTERPRISE
Open, Secure, Intelligent Mediation, Security, Management Process Integration, Action and
Control, Data Analytics
42
© LGChan
Example: IoT Application in Manufacturing
43
© LGChan
EXAMPLE: DIGITAL PLATFORM ARCHITECTURE
44
© LGChan
Example: Digital Platform
Platform
A platform is an open architecture, together with a governance model, designed to facilitate transactions
Functions
o Pull participants to the platform (by offering incentives)
o Provide infrastructure on which participants create and exchange value
o Match participants with each other and with content/goods/services created on the platform
Participants (Users)
Producers users offering/selling products, services, and information
Consumers users seeking/buying products, services, and information
45
© LGChan
Example: Digital Platform Architecture
Platform Layered Architecture
47
© LGChan
END OF LECTURE 10.2
NETWORK ARCHITECTURES
48
© LGChan
SDM 5001 SYSTEMS ARCHITECTURE
LECTURE 10.3
ARCHITECTING SOFTWARE DEVELOPMENT PROCESS
AGILE, SCRUM, XP, CD, DevOps
© LGChan
Introduction
Agile evolved from different lightweight software approaches in the 1990s and
is a response to project managers’ dislike of the rigid, linear Waterfall
methodology
2
© LGChan
What is Agile?
What is Agile?
Agile (or agility) is a mindset practice (or philosophy) and ability to create
and respond to change in order to succeed in an uncertain and complex
environment
Agile is
o Defined by Values
o Guided by Principles
o Manifested through many different practices
Practices Practices bring Accountability to Values
Values
Values bring purposes to Practices
3
© LGChan
Agile Manifesto
Agile Manifesto
4 Values in Agile:
1. Individuals
2. Product
3. Customer
4. Change
while there is value in the items on the right, we value the items on the left more
4
© LGChan
Agile Manifesto 12 principles
1. Our highest priority is to satisfy the customer through early and continuous delivery of
valuable software
2. Welcome changing requirements, even late in development
Agile processes harness change for the customer's competitive advantage
3. Deliver working software frequently, from a couple of weeks to a couple of months,
with a preference to the shorter timescale
4. Business people and developers must work together daily throughout the project
5. Build projects around motivated individuals.
Give them the environment and support they need, and trust them to get the job done
6. The most efficient and effective method of conveying information to and within a
development team is face-to-face conversation
7. Working software is the primary measure of progress
8. Agile processes promote sustainable development.
Sponsors, developers, and users should be able to maintain a constant pace indefinitely
9. Continuous attention to technical excellence and good design enhances agility
10. Simplicity - the art of maximizing the amount of work not done - is essential
11.The best architectures, requirements, and designs emerge from self-organizing
teams
12. At regular intervals, the team reflects on how to become more effective, then tunes and
adjusts its behavior accordingly
5
© LGChan
What is Agile Software Development?
o A collection of a set of methods and practices based on an incremental, iterative approach over a period of time
o Performed by self-organizing and cross functional teams with just-in-time activities
o To produce high quality software in a cost effective and timely manner
o To meet changing needs of the stakeholders
6
© LGChan
Agile EcoSystem of Tools
7
© LGChan
SCRUM
Ref: Hirotaka Takeuchi and Ikujiro Nonaka (1986) The New Product Development Game. Harvard Business Review, January 1986 Issue 8
© LGChan
Time
Analysis Analysis
Time
Design Design
Code Code
Back to Back
Analysis Continuous Work
Analysis
9
© LGChan
Lean Principles applied to Software Development
10
© LGChan
Iterative and Incremental
Iterative
Incremental
11
© LGChan
Scrum Introduction
Scrum is an agile process that allows development team to deliver customer value very early, and in a highly
predictable manner
o Allows rapid and repeated inspect actual working software (every two weeks to one month)
o Development teams are self-organized to determine the best way to deliver the highest priority features
o Everyone, in a sprint meeting held every two weeks to a month, can report, see real working software and
decide to release it as is or continue to enhance for another iteration
Sequential Development
Overlapping Development
12
© LGChan
What is Scrum?
What is the Purpose of a Rugby Scrum? What is the Purpose of a Scrum Development?
To bring order to the chaos of a live ball on the field To bring order to the chaos of a development project
when no team has clear possession of the ball yet, Development requirements from the customer will
eg after a minor infringement of rules often change, so Scrum uses sprints to speed through
known requirements, while also being able to quickly
Video (1:01) https://www.youtube.com/watch?v=hFXHRb-kHt8
adapt to project changes
Referee = Scrum Master
Coach = Product Owner
Players = Development Team 13
© LGChan
The Chicken and the Pig Riddle
Riddle : In a bacon and egg breakfast, what's the difference between the chicken and the pig?
A Chicken is someone who has something to gain by the Pigs performing, but in the end, really do not
contribute day to day to “getting things done.” Their “eggs” are a renewable resource, and many eggs get laid
15
© LGChan
Color Code used in Slides
16
© LGChan
SCRUM TERMS
17
© LGChan
Scrum Framework (3 – 3 – 5)
3 Roles : 5 Ceremonies (Events) :
Product Owner, Scrum Master, Team Sprint, Sprint Planning, Sprint Review, Sprint Retrospective, Daily Scrum Meeting
19
© LGChan
Scrum Roles
Product Owner Team
Responsibilities The Team self-organizes to get the work done
o product backlog and priority o 5-10 people committed to project
o business value of the project o Cross-functional : generalising specialists, eg QA,
o profitability of the product (ROI) Programmers, UI Designers, etc.
o Define the features of the product o Members should be full-time : May be exceptions
o Decide on release date and content (eg., System Admin, etc.)
o Prioritize features according to market value o Teams are self-organizing
o Adjust features and priority every iteration, as needed o Membership can change only between sprints
o Accept or reject work results o Deliver value in small chunks within every sprint,
focused on customer, build in quality
Scrum Master
Scrum Master represents management to the project
and ensures that the team is functional and productive
o Responsible for enacting Scrum values and practices
o Removes impediments
o Ensure that the team is fully functional and
productive
o Enable close cooperation across all roles and
functions
o Shield the team from external interferences 20
© LGChan
Scaling with Scrum
21
© LGChan
4 Feedback Loops in Scrum
1 day
30
day
22
© LGChan
5 Scrum Ceremonies
Sprint Planning the team meets with the product owner to choose a set of work to deliver during a sprint
o Each task/work estimated @ 1- 16 hours
Release Planning after an initial feature list has been identified, prioritized, and potentially estimated, the team
plans an overall release schedule and determine which features can likely be delivered
o Used to feed individual sprint plans
Sprint
Scrum projects make progress in a series of “sprints” in which product is designed, coded, and tested during
the sprint
Daily Scrum the team meets each day to share struggles and progress
Sprint Reviews the team demonstrates to the product owner what it has completed during the sprint
Done features are presented to Product Owner
o Scrum Master, Product Owner, Team, Client(optional). Meeting 1- 3hours
Sprint Retrospectives the team looks for ways to improve the product and the process by identifying the
positive and negative impacts during the sprint
o Scrum Master, Team have 1– 4 hours discussion
o Whole team gathers and discusses what they would like to: Start Doing, Stop Doing, Continue Doing 23
© LGChan
Scrum Artefacts
Product Backlog Sprint Backlog Burn down/up Chart
Product Backlog ordered list of ideas Sprint Backlog set of work from the Burn down/up Chart shows the
for the product product backlog that the team cumulative work remaining in a
Prioritized by value delivered to the agrees to complete in a sprint, Sprint, day-by-day
customer broken into tasks o Techniques/Tools : Fibonacci
o Reprioritized at the start of each o Individuals sign up for work of Series, Pareto Analysis, Party
sprint their own choosing Poker
o Work is never assigned
User Story
A user story is a very high-level definition of a requirement, containing just enough information so that the
developers can produce a reasonable estimate of the effort to implement it.
A Story Point is used to estimate the size/importance of the User Story relative to other user stories in the project
24
© LGChan
What is Product Backlog?
Product Backlog is a list of all desired work
on the project managed and owned by a
Product Owner
o Usually a combination of
o story-based work (“let user search
and replace”)
o task-based work (“improve
exception handling”)
25
© LGChan
What is Sprint Backlog?
A Sprint Backlog is a subset of Product Backlog Items,
which define the work for a Sprint
26
© LGChan
Sprint Backlog
Sprint Backlog
Development
Team
Burndown
Chart
27
© LGChan
SCRUM ACTITIVIES
28
© LGChan
Scrum Sprint
NO outside influence can interfere with the Scrum team during the Sprint
Agenda of Sprint
o a planning meeting where the tasks for the sprint are identified and an estimated commitment for the sprint
goal is made
o a review or retrospective meeting where the progress is reviewed and lessons for the next sprint are identified
29
© LGChan
Sprint Execution Overview
30
© LGChan
What is the Daily Scrum Sprint Goals
31
© LGChan
Daily Scrum
How to Do a Daily Scrum?
What is Daily Scrum? oDaily
o A meeting in which team members make commitments to
o 15-minutes duration
each other and to the Scrum Master
o Stand-up meeting
o A good way for a Scrum Master to track the progress of the
o Not for problem solving
Team
What is the 'Daily Scrum'? Video (2:51) https://www.youtube.com/watch?v=zxwEdbcrqD8 Scrum at Microsoft Video (3:48) https://www.youtube.com/watch?v=YR84qH6d7QE
33
© LGChan
Sprints
Daily Scrum
Sprint
Sprint
Planning
Product Goal
Backlog
Product
Potentially
Owner Shippable
34
© LGChan
Sprint Execution
35
© LGChan
What is Sprint Review?
36
© LGChan
Sprint Review Meeting
37
© LGChan
What is Sprint Retrospective?
38
© LGChan
Sprint Retrospective Meeting
39
© LGChan
Potentially Shippable Product Increment
40
© LGChan
What is a Burn Down Chart?
41
42
© LGChan
Advantages and Disadvantages of Scrum
Advantages of Scrum Disadvantages of Scrum
43
© LGChan
Scrum vs Waterfall
Scrum method is a flexible team Waterfall method is the relay race approach
approach with the whole unit working (a linear process) where every individual is
together and aggressively trying to doing their part and then passing the baton
advance the ball to the next person
The scrum team need to have a cross The waterfall team need to have a specialist
functional people and they have to be in each process stage
focussed on advancing the common
goal
44
© LGChan
When to Use Agile and When to Use Waterfall
45
© LGChan
EXTREME PROGRAMMING
46
Ref: Beck, Kent (1999) Extreme Programming Explained. Addison Wesley © LGChan
Extreme Programming
Extreme Programming (also known as XP ) introduced by Kent Beck in 1990s
47
© LGChan
Extreme Engineering
New
Requirements Analyze
Design/
Improve
Module X
SCRUM Daily Scrum
Team X
Evaluate
Test
Modules
Architecture Interfaces Evaluate
Design/
Module Y
Analyze Integrate
Improve
Test
Daily Scrum
SCRUM
Team Y
Evaluate
Evaluate Test Launch
Changes
48
© LGChan
Example: Rapid Evolution of Wikispeed
Wikispeed is project created in April 12, 2007 for a
competition with the stated objective to build street
legal car that can
o Achieve 100+ miles per gallon of fuel economy
o Produce less than 200 gm/mile of CO2 emissions
o Be built for the mass market
Modular Components
49
© LGChan
CONTINUOUS DELIVERY
50
Ref: Humble, Jez, and Farley, D (2010) Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation. Addison-Wesley
© LGChan
What is Continuous Delivery?
Continuous Delivery is the ability to get changes of all types (including new features, configuration changes, bug
fixes and experiments) into production, or into the hands of users, safely and quickly in a sustainable way
It eliminates the integration, testing and hardening phases that traditionally followed “dev complete”, as well as
code freezes
Principles of Continuous Delivery
Build quality in, do not leave build broken down
53
© LGChan
What is DevOps?
54
© LGChan
© LGChan
One Team, One Goal in DevOps
o Developers always want to deliver changes as Development uses some tools and
soon as possible operation uses some other tools to
o Operations want reliability and stability perform the same stuff
Shorten Lead Time
Feedback
Dev Ops focuses on agility responsiveness and concern with quality and stability on the ultimate
goal of providing business value 56
© LGChan
Software Development Processes with Lean Methods
Value
Idea
DevOps
Agile Development
Running Lean Product / Market Analysis
Practices (Finding and Validating Ideas) Scrum, Kanban XP
Operations
(Process) (Engineering)
Lean
Principles (End-to-End Flow)
57
© LGChan
Continuous Improvement = Continuous Delivery
Embed Project Knowledge into Operations
DEV OPS
Extend Operations Feedback to Project
58
© LGChan
END OF LECTURE 10.3
AGILE, SCRUM, EXTREME, CONTINUOUS DELIVERY
59
© LGChan