5. SOA Policy Adheres to governed by End Point Binds to Exposes Serves Service Consumer Service Contracts implements Understands describes Key Component Messages Sends/Receives Sends/Receives Relation
6. Pipes and Filters Client Server Distributed Agents Layered System Stateless Comm. SOA is derived from other styles SOA
7. SOA vs. REST Pipes and Filters Client Server Uniform Interface Virtual Machine Distributed Agents Layered System Replicated Repository Code On Demand Stateless Comm. Cacheable REST SOA
9. …and patterns can help mitigate them Virtual Endpoint Service Instance Workflodize Edge Component Gridable Service Blogjecting Watchdog Inversion of Communications Orchestrated Choreography Composite Frontend Transactable Service Identity Provider Request/Reply Parallel Pipelines Service Firewall Decoupled Invocation Saga Aggregated Reporting Client/Server/Service Service Monitor
11. Mobile Integration Services Applications Advertizing Management Resources Reporting Rich Client Link management Web based Link Managment
12. Mobile Integration Services 3G Video Calls MMS Dedicated Client 3rd parties Monitoring Usage Datmart Ad Management Applications Acquisition Interactions branding Targeted Advertizing Campaign Mgmt. Billing Resources Reporting Interactions Reference Data Links Data mining & Statistics Link Managment Reports Publishing tools integration Interaction Designer Web Front-end Data Interfaces
13. Load balancer Smart phones Web Server (IIS/Apache Web Server (IIS/Apache MMS Gateway 3G Gateway 3G Gateway Camera Phones DMZ Firewall Load balancer App Server App Server App Server App Server App Server App Server App Server Operational Firewall Backend BI & Reporting Links Registeration Sync. Server NMS Paper Editor Web Server (IIS/Apache Firewall Advertizing clients DB Links Datamart usage DB References Admin Console DMZ
25. Service Instance with NLB Real IP : 1.1.1.2 Real IP : 1.1.1.3 Real IP : 1.1.1.4 Cluster Host Cluster Host Windows Host Service Service Edge Instance Instance Windows Kernel Windows Kernel Windows Kernel TCP/IP TCP/IP TCP/IP NLB Driver NLB Driver NIC Driver NIC Driver NIC Driver NIC NIC NIC Virtual IP : 1.1.1.1
34. Service view [ServiceContract] [DataContract] publicclassSendMmsEvent : ImEvent { ///<summary> /// end user's number. should be in international format: +[country-code]number. Example: +491737692260 ///</summary> [DataMember] publicstringToNumber { get; set; } ///<summary> /// service's number, usually a short-code. Example: 84343 ///</summary> [DataMember] publicstringFromNumber { get; set; } ///<summary> /// Text, as byte array. Use Encoding classes to do it. ///</summary> [DataMember] publicbyte[] TextAsByteArray { get; set; } ///<summary> /// Image, as byte array. Can be: jpg, gif, png, bmp. (jpg rulez!!) ///</summary> [DataMember] publicbyte[] ImageAsByteArray { get; set; } ///<summary> ///Remeber<c>ImageAsByteArray</c>? - This is where you manaually tell us what's the extension. Yes, we can inspect the signature, but why? ///</summary> [DataMember] publicstringImageExtension { get; set; } ///<summary> /// the mms message should have a subject. just put something there. ///</summary> [DataMember] publicstring Subject { get; set; }
49. Service Monitor Collect Metrics collection Status Fault Monitoring Reporting & Dashboarding Edge/Service Security monitoring Status Policy governance Notify Commands Control In Monitor Act Edge/Service Service Monitor
55. Aggregated Reporting EndPoint Produce reports Request Request Report ODS report Transpose Out EndPoint Join Convert Send Poll Data Save Data Clean Pre-Proces Subscribed/ Polled data Load Transform Edge Aggregated Reporting Service
61. Business Logic Control Edge Event Broker Resource Allocator Service Host Service Instance #1 Service Instance #2 Business Logic Control Edge Business Logic Control Edge Business Logic Control Edge Service Host Reservation Event Broker Event Broker Event Broker Resource Allocator Resource Allocator Resource Allocator Service Host Service Host Service Host Service Host Service Host Service Host
It has been quite a while since I last presented – in fact it was just a bit more than 2 years ago when I presented in Dr. Dobb’s ArchitectureI spent most of my time since buried inside xsightsI like startups (that’s my second time around) it is a cooking pot for new learnings* I’d like to give you a short glimpse into a typical day @ the office (courtesy of Tim ConleyConnelly customer expectations…http://painting-life.blogspot.com/2009/08/morning-mist.html
Software architecture is the collection of the fundamental decisions about a software product/solution designed to meet the project's quality attributes (i.e. requirements). The architecture includes the main components, their main attributes, and their collaboration (i.e. interactions and behavior) to meet the quality attributes. Architecture can and usually should be expressed in several levels of abstraction (depending on the project's size). If an architecture is to be intentional (rather than accidental), it should be communicated. Architecture is communicated from multiple viewpoints to cater the needs of the different stakeholders.Architectural decisions are global tied to quality attributesDesigns decisions are local –tied to functionality Photograph: Charlie Brown http://www.bestfoto.com/Galleries/GalleryView.asp?PIC=01%2D11%2Ejpg
Client Serverdescribes client-server components as follows: A client is a triggering process; a server is a reactive process. Clients make requests that trigger reactions from servers. Thus, a client initiates activity at times of its choosing; it often then delays until its request has been serviced. On the other hand, a server waits for requests to be made and then reacts to them. A server is usually a non-terminating process and often provides service to more than one client.LayeredThe layered style is composed of layers (the components) which provides facilities and has a specific roles. The layers have communication paths / dependencies (the connectors).In a layered style a layer has some limitations on how it can communicate with other layers (the constraints). Typically a layered is allowed to call only the layer below it and be called only by the layer above it (but there are variants e.g. a layer can call to any layer below it; etc. - all is fine as long as the layers communication paths are limited and restricted by some rules)Pipes and FiltersFilters - are independent processing steps they are constrained to be autonomous of each other and not share state, control thread etc. Pipes - are interconnecting channels“invisible hand” arranging the filters (..bpm) Brings autonomyDistributed AgentsThe term "agent" describes a software abstraction, an idea, or a concept, similar to OOP terms such as methods, functions, and objects.[citation needed] The concept of an agent provides a convenient and powerful way to describe a complex software entity that is capable of acting with a certain degree of autonomy in order to accomplish tasks on behalf of its user. But unlike objects, which are defined in terms of methods and attributes, an agent is defined in terms of its behavior.[citation needed]Various authors have proposed different definitions of agents, these commonly include concepts such aspersistence (code is not executed on demand but runs continuously and decides for itself when it should perform some activity)autonomy (agents have capabilities of task selection, prioritization, goal-directed behaviour, decision-making without human intervention)social ability (agents are able to engage other components through some sort of communication and coordination, they may collaborate on a task)reactivity (agents perceive the context in which they operate and react to it appropriately).
I am not going to talk about the “Code On Demand” since it is optional (also easy to understand – think javascript)
In addition to a solution, a pattern gives us context, forces and consequences What are the patterns we are going to look at today?Reporting & BI ( Incident analysis) (Aggregated Reporting and Inversion of Communications)Connecting legacy UI ( Client/Server/Service)Securing integration with external Party (Service Firewall, ticket server) Reliability (Transactional Service, Saga vs. Cross-service transactions)Availability (Virtual End-point, Service Instance)Flexibility ( Workflodze vs. Orchestrated Choreography vs. ?)Manageability (Blogjecting Watchdog & MPerformance (Decouples invocation vs. Request/Reply)
Maybe in the future Video platform/IVP replacement(maybe later) Dedicated Client
Set up and provide common componentse.g. throtteling and message size ,
Stages approachFailure detectionService instance (simple services) vs. Virtual endpoint (handle redirection within the service – more autonomous but more complex)
http://www.flickr.com/photos/29327368@N06/2739558370/sizes/o/What does it mean to achieve 99.999% in an SOAMTBF vs.MTBCFReliable Messaging, “transactions” - we already talked about that – will all help us more reliable when a crash happens How much time 99 % - 3d 15h 36s99.9% - 8h 45m 57s99.99% - 52m 35s99.999% - 5m 15s99.9999% - 31s The number of “9” for a single component depends on its own reliability and on the interactions it has (each call is a chance for a failure)The overall reliablity of a system is the product of the reliabilities of each component (the more component you have the lower is your systems reliability -> again beware of fine grained services)
Lets look at a sample process and say it has a 99% availability (about 3.5 days of downtime in a year)
About 31.5 days of downtime a year – each component (service) and that’s before we consider the reliability of all the network calls….
Video calls means no client – so we need a service to handle call flowLikely to failNeed to mat
We can also use the Service instance pattern we already mentioned
The service components are simpler e.g less locks (less likely to fail)We may even redirect on failure (if we can detect it – more later)Only handle one session More management overhead (virtual end-point is simpler in that sense)Remener MTBF vs. MTCBF
Needs stateless components Since we do have state we’ll need stateless communications (e.g.
Take 1
The bread and butter of communication in general anRPC over SOA - a generalized antipattern of the above Simple to implement – time to market
Good for stateful services
1. prepare an interaction (offline)2. define the coordinates for a link (offline)3. Preprocess target pages (offline)4. Accept a 3G call (using RV 3G GW)5. Initiate a call on the IVP (RV product)6. The IVP contacts a web service to accept the call configuration7. The web service contacts a resource manager to get an Address for a SIP Listner, passing it the radvision session ID 8 The Resource Manager allocates all the resources needed to handle a call (including a SIP listner) and returns the list to the webservice9 The webservice configures the conference call for the IVP sending video to the user from a cestel application and sending the incoming video to the SIP listner10 The siplisners negotiates a session with the IVP and instructs it to send the video to the RTP extractor11 The RTP extractor, listen for incoming video, using a component developed by DSP-IP it extracts individual frames from the video and forwards them to the algorithmic engine12. The algorithmic engine wrapper, accepts the frames and initiates a match 13 The algorithmic engine converts the image to grayscale , calls the matlab algorithm and returns a result to the wrapper14 the wrapper forwards the coordinates to the dispatcher15. the dispatcher looks at the list of links and identifies the relevant link16. The dispatcher updates a the web connector with the last identified link17, All this time the cestel application streams a webpage18. The webpage constantly polls the web connector for the the identified link and when that is updated by the dispatcher (step 16) updates the display to indicate the link
Be careful from theNanoservices Anti-pattern- make every little component a service
Take 1
“pigeon blog”: monitoring air quality by equipping GPS on pigeons (Beatriz da Costa)Beatriz da Costa showing miniaturized hardware for Pigeon Blog project at ISEA2006(http://www.flickr.com/photos/26468628@N00/74795130/in/set-1193491/)
Set up and provide common componentse.g. throtteling and message size ,
Stages approachFailure detectionService instance (simple services) vs. Virtual endpoint (handle redirection within the service – more autonomous but more complex)
The routing problem
Same resource two saga initiatorsDistributed resource allocation