Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Software Architecture
Topics to be discussed
• Software Architecture
• Need for Software Architecture
• Objectives of Software Architecture
• Types of IT Architecture
• Architectural patterns and Styles
Software Architecture
• A blueprint that satisfies the requirements of a
software application
• Example software application:
Travel Reservation application that
– Shows various options to complete a trip
– Allows to select specific option
– Allows to book/view/cancel reservations
Live Examples: Makemytrip, Travelocity, Expedia
Software Requirements
• States the problem clearly
• Specific needs and constraints
(web app and also mobile app; 1sec response time;
budget limit, time to market, etc.)
• Verifiable and measurable
• Focusses on what to be done. Not how the
problem is solved.
– Customer needs to book a ticket (belongs to what)
– What interface, tools, database used is not part of the
requirements (this belongs to how part)
Software Requirements
• Functional Requirements
– Booking a Ticket
– Cancelling a Ticket
– View the Status of a waiting-list ticket
• Non-Functional Requirements
– Performance ( the booking page should be loaded
under a second)
– Scalability (Must support 20 concurrent users)
– Security (The customer details must be secured)
How s/w Requirements are
implemented?
• Dividing the complexity
• Using a number of
– sub-systems (Payroll, HR, Sales, Purchase for ERP)
– Interfaces (Interfaces to communicate with Payment
Gateways)
• Software Architecture is the blueprint covering
– Sub-systems
– interfaces
– Interaction between subsystems
To meet the requirements
THE NEED OF ARCHITECTURE
The Winchester “Mystery” House
Adrian D.
Smith
(Architect)
William F.
Baker
(Structural
Engineer)
Loan Management System
• Different Modules
– Registration
– Loan enquiry
– Loan Approval
Cryptography
Business layer
Access Control service
Authorization Authentication
Logging Services Interface
Audit Trail
IEEE 1471-2000
Enterprise Architecture
Business Architecture
Solution Architecture
Technical Architecture
Infrastructure Architecture
Enterprise Architecture
Defines the collection of models that define the structure
required for an organization to meet its objectives
Scope :
business
IT systems need to support the business
Policies and principles for governance
Who :: Enterprise Architects
Enterprise Architecture
Who :: Enterprise Architects
What do they
– Deal with future business stated from interactions
with CXOs and other stakeholders
– Insights into business trends, technology trends
– regulations and compliance requirements
– Translates Business Strategy to IT Strategy
– Decisions related to migration, retiring
applications
– Ensure IT applications aligned with the business
processes
Enterprise Architecture
Models that represent EA :
– Business model
– Application model
– Information model
– Infrastructure model
Business processes
a series of steps performed by a group of stakeholders to achieve a
concrete goal.
Examples:
1. product assembly process, a quality assurance process, a
corrective/preventive maintenance process
2. Register, select products, provide payment, ship - ordering
process
What do they :
Review Technical Architecture
Sizing and capacity planning of application hosting
Storage systems
Identification of systems for
Provisioning
Fault-tolerance
Application deployment and security compliance
Enterprise Architects
What is different?
architecture styles focus on components, connectors, and their
interaction. But not on rationale.
architectural patterns require:
Rationale
Capture common use
Aesthetic (a clever solution)
Provides context, problem, solution
Architecture Patterns
Layers
Context: Decomposition of a complex system
Problem: To handle multiple levels of abstraction
Solution: Group elements into layers with each layer
interacting with the next layer
Broker
Context: Distributed system with autonomous interacting
components
Problem: To loosely couple interacting components
Solution: Uses a mediator component to connect clients to
servers
Architecture Patterns
Reflection
Context: System providing modification of its own persistence
Problem: Expose modifiable elements while hiding core elements
Solution: Mechanism to allow change of structure and behavior dynamically
Examples:
idl2java compilers that generate code for stubs and skeletons,
Generating proxies for classes that can do logging and security checks
Java serialization
Service Oriented Architecture
Service-Oriented Architecture (SOA) is an architectural
style that supports communication between services.
Service :
Is a logical representation of a repeatable business activity that has a
specified outcome (e.g., check customer credit, provide weather data,
consolidate drilling reports)
Is self-contained/autonomous
Access through a well-defined interface
Coarse-grained
Stateless
Loosely coupled
Communicate via messages
May be composed of other services
Is a “black box” to consumers of the service
Service Oriented Architecture
Service provider and service consumer applications are
loosely coupled by the use of service contract and data
contract.
Service Contract
Interface to use the service
Defines message types exchanged between the service provider and
service consumer
One or more operations to exchange messages (request-reply
exchanges)
Service Oriented Architecture
Data Contract
– Technology Drivers
Drivers for SOA
Business Drivers
1.Rapid business process changes
2.Reduction of process cycle times
3.Promotion of business through multiple
channels
4.Protection of investments in legacy
applications
5.Lower total cost of ownership
Drivers for SOA
Technology Drivers
1. Application modernization
2. Technology change management
3. Integration and interoperability for
enterprise wide heterogeneous
applications
4. Support by product vendors
Dimensions of SOA
Dimensions that enable business
transformation are:
• Reuse (How many reusable components are
available)
• Integration (How easy it is to integrate with
other systems)
• Agility (agile infrastructure to make changes
with ease and minimal effort)
Dimensions of SOA
Reusability:
• By using services
• Corse-grained reusable functionality
• SOA – functionality exposed as set of services
• Services orchestrated by a set of business process
services
• Changes to the business functionality or
orchestration do not impact the other
applications
• Complexity, agility are better managed in SOA
Dimensions of SOA
Integration:
• Hub-Spoke model
Hub –
• Centralized
• Accepts Messages from different
applications connected via spokes
• Message validation,
transformation, routing
• Asynchronous Message delivery
• Single Point of Failure (Hub)
• Expensive proprietary products
Dimensions of SOA
Integration:
• Enterprise Service Bus (EBS)
integrates service providers
and consumers
• Better than Hub-Spoke
model
• Distributed services for
message routing,
transformation, and event
handling
• Capabilities for loose
coupling between service
providers and consumers
Dimensions of SOA
Agility:
• Organization mergers, acquisitions
• Collaborative arrangements with other enterprises
• Business Restructuring may cause the business
applications to be moved to different/newer
applications (within organization or outside
organizations like partner organizations)
• Services allow business process and orchestration
independent of the technology used to implement
an application
Key components of SOA
Components that support the reuse, integration,
and agility:
• Services
• ESB
• Orchestration
Key components of SOA
Services
• Basic reusable components of SOA
• Coarse-grained business functionality
• Service Contract
– Consumers invoke an operation published (in the
service contract) by the service
• Data Contract
– Consumers provide data as per the data contract
• Autonomous
Key components of SOA
Services
• Loosely coupled
• Stateless
• Composability
• Discoverable
• Can be implemented by different technologies
(webservices SOAP over HTTP)
• WSDL to describe
• Invoked using xml messages
• SOAP envelop over HTTP
Key components of SOA
(Services contd.)
SOAP over HTTP is more popular. But not mandatory to
become a service.
The following must be met to become a service
• Service boundaries explicit, interact with others through
message passing
• Autonomous in terms of data isolation and loose coupling
• Interactions based on service contract, data contract and
associated policies
• Service compatibility based on policy expression (WS-
Policy) when service contract cannot fully specify all
aspects of a service
Key components of SOA
Enterprise Service Bus (ESB)
Enterprise Service Bus
• Acts as a mediator between service provider and service
consumer
• Allows services to interact with each other
• Across locations, different transports, across organization
boundaries
• Provides integration capabilities – routing, transformation and
delivery between providers and consumers
• Better than Hub and Spoke model
• ESB is an architectural pattern. Does not impose specific
implementation
• Different vendors have different tools to support ESB concepts
– routing, transformation and delivery
Key components of SOA
Orchestration
Orchestration
• Brings Agility
• A business process consists of set of services, a workflow is
defined that invokes services at different stages of a workflow
• To execute the business process, the workflow is orchestrated
• Controls process level integration and automation of services
• Business Process Execution Language (BPEL) is a language to
specify business process as a workflow
• Many vendors support BPEL and have orchestration engine
Perspectives of SOA
• Technology providers are defining SOA reference
models and Products to support them
• Standard bodies worked on SOA standardization
• World Wide Web Consortium (W3C) published XML,
SOAP to interoperate web technologies (Any
hardware and any software can work together
across web)
• Web Services are based on W3C standardization
• W3C also published Service Modeling Language
(SML) for creating complex services
Perspectives of SOA
• Organization for the Advancement of Structured Information
Standards (OASIS) has developed
– WS-Transaction, WS-Reliability
– Reference model for SOA
• Service Component Architecture (SCA)
– Assembling services to create a solution
– Separates the role of programmer vs assembler
– Life-cycle management at architecture level rather than code level
• Service Data Objects (SDO)
• SCA, SDO put forth by IBM and supported by Open SOA
Collaboration (group of 18 s/w vendors).
• OASIS standardizing the SCA,SDO, Reference Model for SOA
Perspectives of SOA
The SOA reference model (proposed by OASIS) has
3 views
• Service eco-system view
(related to participants of SOA)
• Realizing services view (requirements for SOA)
• Owning view
(related to governance and management )
Perspectives of SOA
OMG (Object Management Group) developed standards for
modelling:
• BPMN (Business Process Modeling Notation) for business processes
• UML(Unified Modeling Language) for service and component modeling
• CWM (Common Warehouse Meta-model) for modeling
Database and BI)
• Platform independent view based on MDA (Model Driven
Architecture)
• MDA offers the capability to design a SOA solution through
models, minimizes the effort invested in specific technologies or
protocols
Perspectives of SOA
OMG (Object Management Group) standards (contd.)
• an UML profile for SOA and
• a meta model specification SOAML
• UML Profile, SOAML defines stereotypes for –
– ServicePoint,
– ServiceChannel,
– Service Contract,
– ServiceInterface
Future Trends
• SOA adaptation resulted in significant
improvement to meet enterprise needs
• SOA based projects estimated to reach hundreds
of billons
• SOA not limited to Enterprise Architecture. It is
becoming part of the Cloud computing (SaaS)
• Cloud *-as-a-service and SOA are not
incompatible, It is a logical progression
Future Trends
SOA Improves the business process by
– Automating steps in business process
– Providing right information at the right time to clients
• Gartner states
– SOA used when large new business applications need to
be developed
– Integrating some combination of purchased packages,
legacy applications, services from other business units
• Advanced SOA: addition of business event and
event driven architecture (EDA) to the
request/reply interactive business model