May 23, 2007 - Service Instance. Service Monitor ... collection of the fundamental decisions about a software product/so
5/23/2007
SOA Patterns Arnon Rotem-Gal-Oz Biometrics Line Development Manager Rafael LTD. Haifa, Israel
[email protected]
Everybody wants SOA because it is oh so wonderful…
© Dolores Nielsen
Everybody forgets that every rose has it thorns
1
5/23/2007
Well, we can always buy SOA, right?
Solving SOA pains with patterns Virtual Endpoint
Service Instance Workflodize Edge Component Gridable Service Inversion of Communications
Blogjecting Watchdog Orchestrated Choreography Transactable Service
Request/Reply
Composite Frontend Identity Provider
Parallel Pipelines
Service Firewall Decoupled Invocation
Saga Aggregated Reporting Client/Server/Service
Service Monitor
How do you present a lot of patterns without getting here?!
2
5/23/2007
Metropolis Chief of Police: “We need to completely revamp all our software systems”
3
5/23/2007
Software architecture is…
What the software architect does
• collection of the fundamental decisions about a software product/solution designed to meet the project„s quality attributes • Includes the main components, their main attributes, and their collaboration • expressed in several levels of abstraction (depending on the project's size). • Architecture is communicated from multiple viewpoints • Tradeoffs are made explicit
Adheres to
Policy
Binds to
End Point
governed by
Exposes
Serves Service Consumer
Understands
Contracts
implements
Service
describes Key Component
Sends/Receives
Messages
Sends/Receives
Relation
4
5/23/2007
Metropolis Policing System Emergency Response
Mobile policing • Ticketing • Navigation • Communications
Special Ops
MPS Situational Awareness
Logistics
Incident Analysis
Dilemma: Data Propagation Dispatch (Emergency Response) Scenario (Performance -> Latency)
COP (Situational Awareness)
Under all conditions, the freshness of the positions and statuses of all the police units will be better than 2 seconds (the time from change to update) Operations Management (Special Ops)
Navigation (Mobile Policing)
5
5/23/2007
Computer A
Consumer (requestor) Replier Process A
Computer B
Requestor
Service (replier)
Process
Process B
Objects in a Process
Services
Request/Reply
EndPoint
1. Request
2. Synchronous processing
3. Reply
Service Consumer
Service
Inversion of Communications
6
5/23/2007
The Network is reliable The Network is homogenous
Transport cost is zero
Latency is zero
Fallacies of distributed Computing
There is one administrator
Bandwidth is infinite
The Network is Secure
Avoid RPC Over SOA Topology doesn’t change
Dilemma: Cross-Service Transactions Register Incident
Dispatch
Tasks
Scenario (Integrity> Consistency) Under all conditions, an incident accepted by the system cannot get lost
7
5/23/2007
ACID Transactions 1. Begin TX
2. Request
2. Reply
Service B
4. Commit TX
Service A
Trasnactable Service 1. Begin TX 4. Commit TX Transaction Support End Point
Transaction Root 2. Get/Read Message
Message Pump 3. Handle Message
Contract
Message Handler Service
Saga
8
5/23/2007
Avoid the coupling of cross-service transactions
Dilemma: Reporting & BI Navigation Road Service
Incident Registration
Incident Analysis
Scenario (Usability-> Reporting)
Under normal conditions, The chief of police will have on his dashboard near real-time gauges of the following KPIs:. Number of incident per hour, avg. time to arrive at a crime scene, number of patrol car breakups during answering incidents ….
9
5/23/2007
Extract Transform Load
copyright © Flashmap systems www.flashmapsystems.com/imgrs/pdfs/bi.pdf
Aggregated Reporting EndPoint Request Request report
Produce reports
Report
ODS
Transpose
Out
EndPoint Convert
Poll Data Subscribed/ Polled data Edge
Pre-Proces
Send
Join Clean
Transform
Save Data
Load
Aggregated Reporting Service
10
5/23/2007
ETL Connection to DB File Based On line
Department Server DB
Adding a specific BI contract is not a good idea
Dilemma: UI integration
Scenario (Constraints> Operations) While the police department is transitioning to the new system. The emergency response center must continue to operate
Composite Frontend Inter portlet Communications Layout Single Sign On Portlet Lifecycle
UI Logic proxy
Main Window
Service A Service Interaction
Portlet UI host
Service B
Composite Frontend
11
5/23/2007
Client/Server/Service Legacy Cloud
Business logic Services bridge
Server logic Service A Service Interaction
proxy
Service Agent Service A Server
Legacy UI
Dilemma: Dynamism Plan special operation
Authorize
Scenario (Flexibility> Business processes) Under normal conditions, updating work procedures (expected to happen quarterly/yearly) will take less than a week Plan special operation
Send for review
Evaluate trouble potential
Send for Review
Authorize
12
5/23/2007
Workflodize
End Point
Manage Process
request
Schedule
route request
Invoke actions
Service Business Logic
Workflow instance Host Workflow Engine Workflows
Service
Orchestrated Choreography Service
Service
reaction
request
Manage Process
Protocol
Schedule
Coordinator
route request
monitor Workflow instance
Workflow Engine
Host Workflows
Offline designer Auxiliary tools
Orchestration platform
13
5/23/2007
Be careful of using workflows everywhere
Think carefully about service granularity
14
5/23/2007
Dilemma : peak Loads Schedule Testimony
Schedule testimony
Schedule Service
Robbery
Armed Robbery
Break-In
Schedule Service
Break-in Dispatch Service
Line-up
Line-up Dispatch Service I'm Stuck I'm Stuck I'm Stuck I'm Stuck Stuck I'mI'm Stuck I'm Stuck I'm Stuck Scenario (Performance> Scalability) In case or unexpected emergency, the emergency response 5 times the usual Flood Normal Day @ thecenter officewould be able to handle case load
Rescue cat
Key
request
End Point
SOA Component
Pattern Component
Relation
Concern/attribute
Load Balance
Business Logic Job
Logic Execute
Queue Management Schedule
Contract
Tasks
Monitor & Manage Grid root node
Monitor Grid Agent
Grid Node Grid Node
Grid root
Service
Grid Node
Gridable Service
Key SOA Component
Pattern Component
Relation
Concern/attribute
Queue
Correlate
Read
EndPoint
Send
Transform
reaction
Store & Forward
Dispatcher
Out Prioritize
Prioritize
Initial Reply (ack.) request
Transform
Handler Edge
Read Load Balance
Send Store & Forward
Dispatcher
In Service Business Logic
Decoupled Invocation
15
5/23/2007
Dilemma : throughput Scenario (Performance> Latency) Under normal conditions a call can be handled end-to-end in 30 seconds or less Fraud Detection Incident Registration
Blacklist Callers
Prioritization
Dispatch
Location Tracking
Scenario (Performance> throughput) On a busy night the Emergency center would be able to handle up top 500 calls per hour
Service Instance Service Business logic
End point reaction request
Distribute
Dispatcher Edge
Service Instance
16
5/23/2007
Parallel Pipelines Key
Request Reaction
Pattern Component
Relation
Concern/attribute
Queue
pipeline
pipeline
Edge
EndPoint
SOA Component
EndPoint
Request 1 EndPoint Request 2
Perform Task
Perform Task
pipeline EndPoint Perform Task
Service
17
5/23/2007
What‟s in a 9 Special Ops Tracking
COP
Incident Registration
Navigation
Scenario (Availability> Hardware failure) During an operation, When a server crashes the COP will continue functioning within less than a minute
Failsafe hardware
Status Technologies FT Server
Virtual Endpoint Edge Request
EndPoint
Service Request Virtual End point Location Transparency
Request
Request
EndPoint Request Request EndPoint
18
5/23/2007
Service Instance Service Business logic
End point reaction request
Distribute
Dispatcher Edge
Service Instance
Service Instance with NLB Real IP : 1.1.1.4 Windows Host Edge Windows Kernel
Real IP : 1.1.1.3 Cluster Host Service Instance Windows Kernel
Real IP : 1.1.1.2 Cluster Host Service Instance Windows Kernel
TCP/IP
TCP/IP
NLB Driver
NLB Driver
NIC Driver
NIC Driver
NIC
NIC
TCP/IP
NIC Driver
NIC
Virtual IP : 1.1.1.1
19
5/23/2007
Dilemma: Interfacing with the outside world Drivers Department Of Motor Vehicles
Ticketing Vehicles Scenario (Security> Access control)
Under all conditions, prevent unauthorized access , information disclosure and tampering from the patrol‟s car‟s interfaces to the Department of Motor Vehicles (retrieving driver‟s licenses and car registrations)
Edge Component
Validate Security End Point Contract
Edge
request
Audit Transform Load Balance Etc.
reaction
Service Business Logic
20
5/23/2007
Service Firewall Scan
FW EndPoint
Filter
Request
Validate
Authorized Reply
FW EndPoint Authorized Out request
Cleanse
Reply
Audit
In Service Firewall
Edge/Service
Identity Provider Signed Certificate
Audit
Provision
Revoke
Service
Provision
Convert Tokens
Identity Data Store
Verify Identity Issue Tokens
Token Server
Check Identity In Signed Token
Service
Identity Provider
21
5/23/2007
Dilemma : Autonomy and Management Scenario (Security> Governance) During development and operations, the enterprise architecture team will be able to ensure all services use secured channels Scenario (Reliability> MTTR) Under normal operations the time to discover a faulty service will be shorter than 2 minutes
Blogjecting Watchdog Edge
Service
EndPoint Monitor
Request
Watchdog Edge
Monitor
EndPoint Reports
Watchdog Agent Heal Monitor
Report
Log
Monitor Monitor
Service Monitor
Collect
Fault Monitoring Security monitoring
Metrics collection
Edge/Service Status
Policy governance
Notify Control
Monitor Service Monitor
Status
Reporting & Dashboarding
Act
Commands In Edge/Service
22
5/23/2007
Mind the gap
Decision: Certificates for authentication & authorization x.509 certificate
System TokenToken Security
Client Workstation
x.509 certificate
23
5/23/2007
Authorized client
Identity Provider IIS
X.509 HTTPS X.509 HTTPS SSL VPN
Edge Component Query Handler
Kerberos WCF TCP Kerberos WCF MSMQ Kerberos (WCF TCP
Decoupled Invocation
XML Firewall Service Firewall
Service
DMZ
Implementing a Service Firewall
Getting to SOA is a long journey…
© Dolores Nielsen
24
5/23/2007
www.rgoarchitects.com
[email protected]
25