SlideShare uma empresa Scribd logo
1 de 53
Patterns and anti-patterns of SOA Presented by: Mohamed R. Samy Technical Architect, MVP
What is Architecture anyway? The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships between them. The term also refers to documentation of a system's software architecture. Reference: Wikipedia What is an architectural style?  Introduction
Architectural Styles
What is an architectures’ goal? So what is SOA?  A style of architecture that emphasizes standards based integration. Is it the best way? Is success guaranteed? Introduction contd.
Standards based integration Friction free interaction/Integration Communication between system components The Goal of SOA
Should loose coupling be everywhere?  Implicit behaviour vs. Explicit behaviour Services as an interface to business processes. (That is how we should think about a service when we design it) The Hype
Boundaries are explicit Services are autonomous Services share contract and policy not class Service compatibility is determined by policy The four Tenets of SOA
Borders are Explicit
2 Tier (VB4-5-6) vs 3-Tier Com+ (Client in Egypt, Service in Mexico) In the architecture you have to know where the boundaries are. Practical Example: Egypt/ Libyan Border vs. Cairo/ Alex Their system vs Our system (A boundary) Lessons learned: Authentication, Authorization Communication overhead TENET I :Boundaries are Explicit
Services are Autonomous
Able to choose Self Governing Self sufficient Fax /Telephone between ministries When the computer is down, I can still get my license (Send it later by the mail) TENET II: Services are Autonomous
Services Share Schema and Contract not Class
XML not objects, specially not platform specific objects e.g. datasets We need to agree on 2 things: The protocol The policy Just what is required for the service to perform it’s function (Just enough validation) TENET III:Services Share Contract and Policy not Class
IT department Policy like language of the system (Arabic – Russian – English) Policy like http/XML/SSL ports The requirements for the way the conversation is to be held E.g. WS- standards (Message encryption, which parts are encrypted, what algorithm we will use to encrypt)  TENET IV: Service Compatibility is determined by Policy
To understand the patterns we must take a look at the most common anti-patterns Patterns/Antipatterns of SOA
Customer. ADD/Update/ Delete Why not?  Is updating the address just an update or is it a business process? CRUDY interface
CustomersList.MoveNext Who holds the list? Who controls the memory? Enumeration
1.CustomerObject.Setflagfordelete 2.CustomerObject. Delete Objects should not be left in an inconsistent state between message exchanges. However, this is dangerous but not wrong. Chatty Interface
 The perfect interface for all services: XmlDocument PerformOperation(XmlDocument input) Why not? Implicit behavior versus explicit behavior. You need to know what you send specifically and be generic about what you receive (Just enough validation.) Loosey Goosey
To avoid this anti pattern ask 3 questions: 1.What does the service do?  2. What data does it need to do it? 3. What data does the service return? Loosey Goosey contd.
A flag called “zeft”, “mido” , “soso” A house of cards Why implicit behavior is bad
What if the service schema changes?  What happens to the connected systems? Versioning contracts in .NET1.1 vs .NET2.0 [OptionalField VersionAdded = 2] Nickname Why is that important? Just Enough Validation
The patterns Patterns and Anti Patterns- Part2
Patterns Document Processor Idempotent Message Reservation Some important SOA patterns
An architectural approach to creating systems built from autonomous services Integration as a fore-thought rather than an after-thought A service is a program you interact with via message exchanges Services are built to last Availability and stability are critical A system is a set of deployed services cooperating in a given task Systems are built to change Adapt to new services after deployment SOA
How do you create a simple to use, well defined an interface? Pattern1: Document Processor
Changing your drivers license, Giza Authority for Traffic Real world examples
1. Start with a process 2. Compose a workflow 3. Start Defining your message contracts, before your objects and entities(try to be atomic- avoid chatty interface) 4.Define operations Where to start
5. Group your operations into services Tips:  1. Do not use platform specific types e.g. datasets. 2. Decouple Internal vs. External objects 3. Use TDD so you know you are thinking about the service consumer, now you know how it feels. Where to start contd.
Context You are building a web service Problem How do you create a simple to use, well defined an interface? Forces Your interface should  Encourage document centric thinking Define a clear semantic in the contract Promote loose coupling through encapsulation of the implementation Be easy to consume from any platform (WS-I base profile) Represent a business process as a complete unit of work Pattern1: Document Processor
Solution: Document Processor public	FindCustomerByCountryResponse	FindCustomersByCountry( 		FindCustomerByCountryRequest request) { 	// Do something.... } -Encourage document centric thinking by defining a schema (XSD) for request and response messages in your project -Generate objects from your schema to simplify development -Remember this is a boundary so don’t leak internals
Do not leak internal abstractions
Generate Data transfer objects
Transition at the boundary
Benefits Consumers think about sending and receiving business documents which are naturally more granular The boundary of the system involves conversion from internal structures to external documents The implementation details of the system are encapsulated The service is more consumable from other platforms and can evolve more easily Liabilities Performance will suffer with transfers of data from internal to external structures Resulting context
Should I use the same schema for multiple services or should each service have its own schema? Opinion: Give each service its own schema Sharing schema makes it difficult to evolve each service independently and introduces unnecessary churn for service consumers Design Question
How do I handle duplicate messages received at my service? Pattern2: Idempotent Message
Context You are developing a web service for your SOA You heard that messages should be idempotent Problem How do you insure that messages are idempotent? Forces You cannot expect anything more from the sender than what the contract defines for your service You are working with a transactional database system with frequent updates Indempotent messages
Sender tags message with a request ID Your contract can specify that this is required Your contract cannot insist that the ID is unique across time The ID tags a unit of work which will be done only once Receiver must check to see if the unit of work has already been done before doing it Then what? Solution
Option1: return a cached response Option2: Process the message again. Option3: Throw an exception Solution Options
You will have to cache responses for some period of time – how long? What if the current value is different than the cached value? What if the response was an error? What if the sender sends duplicate IDs for different units of work? Option1: Return a cached response
Great for reads, what about writes? Should we withdraw $1000 from a checking account twice? Option2: Process the message again
Did the sender get the original response? How does he get the original response if you are sending him and exception? Option 3: Throw and exception
UOW ID can be a part of the request schema Implies duplicate handling is part of the business process UOW ID can be a custom SOAP header Implies duplicate handling is part of the message processing infrastructure Create a schema for the SOAP header Having a URI for immediate sender can be helpful to detect reentrancy Data changes should be traceable to a UOW ID Your cached responses may need to reflect what the response was at the time when the request was received Solutions
Benefits Your service autonomy is increased by not having to rely on consumer to do the right thing You won’t fool yourself into thinking that reliable messaging will solve this problem Liabilities Your service will consume potentially large amounts of durable storage caching responses Your service will take a performance hit for cache management Pattern3: Indempotent message
How do you maintain data consistency across a long running process? Pattern3: Reservation Pattern
Context You are building a service oriented application You have a complex business process that you want to expose to your customers with a web service Problem How do you maintain data consistency across a long running process? Forces You cannot share a distributed transaction The business process requires several messages to complete The message exchange process could take anywhere from seconds to hours Reservation pattern
Reservation pattern illustrated Reserve part: 49389 Qty: 200 Reservation ID: 14432 Expires: 2004-09-15 02:43:53Z Confirm reservation: 14432 PO #49839 Reservation: 14432 Receipt: 29389 PO #49839
Know the concepts before you write the code SOA is not web services SOA is about standards based integration and friction free interaction between systems SOA is not a silver bullet Summary
Web services WCF Biztalk ESB SOA Technologies
www.arcast.tv (Webcasts) www.geekswithblogs.net/Mohamed (Cool tech blog) www.msdn.com/Architecture www.thevstsguy.com  (under construction) www.msdn.microsoft.com/practices (P&P) References:
Email: m_raafat_samy@hotmail.com Facebook @msamy Contacts
Questions?

Mais conteúdo relacionado

Mais procurados

Client server computing
Client server computingClient server computing
Client server computingjorge cabiao
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented MiddlewarePeter R. Egli
 
Design patterns in distributed system
Design patterns in distributed systemDesign patterns in distributed system
Design patterns in distributed systemTom Huynh
 
Large Scale Deployment of SOA-P
Large Scale Deployment of SOA-PLarge Scale Deployment of SOA-P
Large Scale Deployment of SOA-PC2B2 Consulting
 
What is in a Good Contract? Designing Interfaces for Distributed Systems
What is in a Good Contract? Designing Interfaces for Distributed SystemsWhat is in a Good Contract? Designing Interfaces for Distributed Systems
What is in a Good Contract? Designing Interfaces for Distributed SystemsSchalk Cronjé
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2
 
JDC2008 - Enterprise Integration and Service Oriented Design
JDC2008 - Enterprise Integration and Service Oriented DesignJDC2008 - Enterprise Integration and Service Oriented Design
JDC2008 - Enterprise Integration and Service Oriented DesignHossam Karim
 
Object and component based middleware for distributed system development
Object and component based middleware for distributed system developmentObject and component based middleware for distributed system development
Object and component based middleware for distributed system developmentektabhalwara
 
NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...
NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...
NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...cscpconf
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jmsSridhar Reddy
 
Chat server nitish nagar
Chat server nitish nagarChat server nitish nagar
Chat server nitish nagarNitish Nagar
 
Client/Server Architecture By Faisal Shahzad
Client/Server Architecture By Faisal Shahzad Client/Server Architecture By Faisal Shahzad
Client/Server Architecture By Faisal Shahzad Faisal Shehzad
 

Mais procurados (20)

Soa unit iv
Soa unit ivSoa unit iv
Soa unit iv
 
Unit iii soa
Unit iii soaUnit iii soa
Unit iii soa
 
Client server computing
Client server computingClient server computing
Client server computing
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented Middleware
 
Design patterns in distributed system
Design patterns in distributed systemDesign patterns in distributed system
Design patterns in distributed system
 
Large Scale Deployment of SOA-P
Large Scale Deployment of SOA-PLarge Scale Deployment of SOA-P
Large Scale Deployment of SOA-P
 
Application Architecture
Application ArchitectureApplication Architecture
Application Architecture
 
What is in a Good Contract? Designing Interfaces for Distributed Systems
What is in a Good Contract? Designing Interfaces for Distributed SystemsWhat is in a Good Contract? Designing Interfaces for Distributed Systems
What is in a Good Contract? Designing Interfaces for Distributed Systems
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep DiveWSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
 
JDC2008 - Enterprise Integration and Service Oriented Design
JDC2008 - Enterprise Integration and Service Oriented DesignJDC2008 - Enterprise Integration and Service Oriented Design
JDC2008 - Enterprise Integration and Service Oriented Design
 
Object and component based middleware for distributed system development
Object and component based middleware for distributed system developmentObject and component based middleware for distributed system development
Object and component based middleware for distributed system development
 
NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...
NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...
NEW APPROACH TO DEVELOP THE MESSENGER APPLICATION: FROM CLIENTSERVER DESIGN T...
 
ISUG SSB Lior King
ISUG SSB Lior KingISUG SSB Lior King
ISUG SSB Lior King
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
Chat server nitish nagar
Chat server nitish nagarChat server nitish nagar
Chat server nitish nagar
 
Chat server
Chat server Chat server
Chat server
 
componenets of osb12c
componenets of osb12ccomponenets of osb12c
componenets of osb12c
 
Middleware Technologies ppt
Middleware Technologies pptMiddleware Technologies ppt
Middleware Technologies ppt
 
Client/Server Architecture By Faisal Shahzad
Client/Server Architecture By Faisal Shahzad Client/Server Architecture By Faisal Shahzad
Client/Server Architecture By Faisal Shahzad
 
Unit 02: Web Technologies (1/2)
Unit 02: Web Technologies (1/2)Unit 02: Web Technologies (1/2)
Unit 02: Web Technologies (1/2)
 

Destaque

Wizzo dutch posters
Wizzo   dutch postersWizzo   dutch posters
Wizzo dutch postersStratigo -
 
Wizzo 2010 - Typography - Logos
Wizzo 2010 - Typography - LogosWizzo 2010 - Typography - Logos
Wizzo 2010 - Typography - LogosStratigo -
 
diversity+inclusion=innovation (stryker medical)
diversity+inclusion=innovation (stryker medical)diversity+inclusion=innovation (stryker medical)
diversity+inclusion=innovation (stryker medical)Joe Gerstandt
 
Mini sites presentation
Mini sites presentationMini sites presentation
Mini sites presentationStratigo -
 
Evaluation & the Consumer 5
Evaluation & the Consumer 5Evaluation & the Consumer 5
Evaluation & the Consumer 5Jutka Czirok
 
IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...
IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...
IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...Text100
 

Destaque (7)

Wizzo dutch posters
Wizzo   dutch postersWizzo   dutch posters
Wizzo dutch posters
 
Wizzo 2010 - Typography - Logos
Wizzo 2010 - Typography - LogosWizzo 2010 - Typography - Logos
Wizzo 2010 - Typography - Logos
 
diversity+inclusion=innovation (stryker medical)
diversity+inclusion=innovation (stryker medical)diversity+inclusion=innovation (stryker medical)
diversity+inclusion=innovation (stryker medical)
 
Mini sites presentation
Mini sites presentationMini sites presentation
Mini sites presentation
 
Evaluation & the Consumer 5
Evaluation & the Consumer 5Evaluation & the Consumer 5
Evaluation & the Consumer 5
 
IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...
IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...
IBM Partnercamp 2009 - Social Media Präsentation: Zwitschern, bloggen, "YouTu...
 
Usii.3a notes
Usii.3a notesUsii.3a notes
Usii.3a notes
 

Semelhante a Patterns&Antipatternsof SOA

CBSE VS SOA Presentation
CBSE VS SOA PresentationCBSE VS SOA Presentation
CBSE VS SOA PresentationMaulik Parikh
 
CBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU PresentationCBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU Presentationmgp1560
 
Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsNathaniel Palmer
 
Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsNathaniel Palmer
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitectureABDEL RAHMAN KARIM
 
Soa Taking Theory Into Real World Application
Soa Taking Theory Into Real World ApplicationSoa Taking Theory Into Real World Application
Soa Taking Theory Into Real World ApplicationDavid Linthicum
 
Service-oriented Architecture with Respect to Reusability
Service-oriented Architecture with Respect to ReusabilityService-oriented Architecture with Respect to Reusability
Service-oriented Architecture with Respect to ReusabilityYazd University
 
Why Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational SoaWhy Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational SoaDavid Linthicum
 
The New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRLThe New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRLJorgen Thelin
 
SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)
SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)
SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)OpenBlend society
 
Migrating SOA
Migrating SOAMigrating SOA
Migrating SOACoi Xay
 
distributed system with lap practices at
distributed system with lap practices atdistributed system with lap practices at
distributed system with lap practices atmilkesa13
 
Taking A Look At Web Services
Taking A Look At Web ServicesTaking A Look At Web Services
Taking A Look At Web ServicesStacey Cruz
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureFaren faren
 
RabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docxRabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docxShakuro
 
Serverless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdfServerless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdfJohn Brian Ngugi Njuguna
 

Semelhante a Patterns&Antipatternsof SOA (20)

CBSE VS SOA Presentation
CBSE VS SOA PresentationCBSE VS SOA Presentation
CBSE VS SOA Presentation
 
CBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU PresentationCBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU Presentation
 
Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic Applications
 
Delivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic ApplicationsDelivering Process-Driven, Dynamic Applications
Delivering Process-Driven, Dynamic Applications
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Soa Taking Theory Into Real World Application
Soa Taking Theory Into Real World ApplicationSoa Taking Theory Into Real World Application
Soa Taking Theory Into Real World Application
 
SOA vs EDA
SOA vs EDASOA vs EDA
SOA vs EDA
 
Service-oriented Architecture with Respect to Reusability
Service-oriented Architecture with Respect to ReusabilityService-oriented Architecture with Respect to Reusability
Service-oriented Architecture with Respect to Reusability
 
Why Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational SoaWhy Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational Soa
 
Cc unit 2 updated
Cc unit 2 updatedCc unit 2 updated
Cc unit 2 updated
 
The New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRLThe New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRL
 
SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)
SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)
SOA architecture patterns, Matjaž Jurič (FRI/Univerza v Ljubljani)
 
Migrating SOA
Migrating SOAMigrating SOA
Migrating SOA
 
distributed system with lap practices at
distributed system with lap practices atdistributed system with lap practices at
distributed system with lap practices at
 
Taking A Look At Web Services
Taking A Look At Web ServicesTaking A Look At Web Services
Taking A Look At Web Services
 
Soa & Bpel With Web Sphere
Soa & Bpel With Web SphereSoa & Bpel With Web Sphere
Soa & Bpel With Web Sphere
 
Soa & Bpel With Web Sphere
Soa & Bpel With Web SphereSoa & Bpel With Web Sphere
Soa & Bpel With Web Sphere
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
RabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docxRabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docx
 
Serverless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdfServerless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdf
 

Mais de Mohamed Samy

Continuous Integration using TFS
Continuous Integration using TFSContinuous Integration using TFS
Continuous Integration using TFSMohamed Samy
 
Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Mohamed Samy
 
Making a Career in I.T. my 2 cents :)
Making a Career in I.T. my 2 cents :)Making a Career in I.T. my 2 cents :)
Making a Career in I.T. my 2 cents :)Mohamed Samy
 
Introducing Windows Azure
Introducing Windows Azure Introducing Windows Azure
Introducing Windows Azure Mohamed Samy
 
Introducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsIntroducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsMohamed Samy
 
Imagine cup- Architecture/Design talk
Imagine cup- Architecture/Design talkImagine cup- Architecture/Design talk
Imagine cup- Architecture/Design talkMohamed Samy
 
Whitepaper On Agile Implementation Outline
Whitepaper On Agile Implementation OutlineWhitepaper On Agile Implementation Outline
Whitepaper On Agile Implementation OutlineMohamed Samy
 
Alm Cairo Code Camp
Alm Cairo Code CampAlm Cairo Code Camp
Alm Cairo Code CampMohamed Samy
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignMohamed Samy
 
Microsft Dynamics AX Introduction
Microsft Dynamics AX IntroductionMicrosft Dynamics AX Introduction
Microsft Dynamics AX IntroductionMohamed Samy
 

Mais de Mohamed Samy (11)

Continuous Integration using TFS
Continuous Integration using TFSContinuous Integration using TFS
Continuous Integration using TFS
 
Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010
 
Making a Career in I.T. my 2 cents :)
Making a Career in I.T. my 2 cents :)Making a Career in I.T. my 2 cents :)
Making a Career in I.T. my 2 cents :)
 
Vsts 2
Vsts 2Vsts 2
Vsts 2
 
Introducing Windows Azure
Introducing Windows Azure Introducing Windows Azure
Introducing Windows Azure
 
Introducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsIntroducing Continuous Integration Using Vsts
Introducing Continuous Integration Using Vsts
 
Imagine cup- Architecture/Design talk
Imagine cup- Architecture/Design talkImagine cup- Architecture/Design talk
Imagine cup- Architecture/Design talk
 
Whitepaper On Agile Implementation Outline
Whitepaper On Agile Implementation OutlineWhitepaper On Agile Implementation Outline
Whitepaper On Agile Implementation Outline
 
Alm Cairo Code Camp
Alm Cairo Code CampAlm Cairo Code Camp
Alm Cairo Code Camp
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Microsft Dynamics AX Introduction
Microsft Dynamics AX IntroductionMicrosft Dynamics AX Introduction
Microsft Dynamics AX Introduction
 

Último

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

Último (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Patterns&Antipatternsof SOA

  • 1. Patterns and anti-patterns of SOA Presented by: Mohamed R. Samy Technical Architect, MVP
  • 2. What is Architecture anyway? The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships between them. The term also refers to documentation of a system's software architecture. Reference: Wikipedia What is an architectural style? Introduction
  • 4. What is an architectures’ goal? So what is SOA? A style of architecture that emphasizes standards based integration. Is it the best way? Is success guaranteed? Introduction contd.
  • 5. Standards based integration Friction free interaction/Integration Communication between system components The Goal of SOA
  • 6. Should loose coupling be everywhere? Implicit behaviour vs. Explicit behaviour Services as an interface to business processes. (That is how we should think about a service when we design it) The Hype
  • 7. Boundaries are explicit Services are autonomous Services share contract and policy not class Service compatibility is determined by policy The four Tenets of SOA
  • 9. 2 Tier (VB4-5-6) vs 3-Tier Com+ (Client in Egypt, Service in Mexico) In the architecture you have to know where the boundaries are. Practical Example: Egypt/ Libyan Border vs. Cairo/ Alex Their system vs Our system (A boundary) Lessons learned: Authentication, Authorization Communication overhead TENET I :Boundaries are Explicit
  • 11. Able to choose Self Governing Self sufficient Fax /Telephone between ministries When the computer is down, I can still get my license (Send it later by the mail) TENET II: Services are Autonomous
  • 12. Services Share Schema and Contract not Class
  • 13. XML not objects, specially not platform specific objects e.g. datasets We need to agree on 2 things: The protocol The policy Just what is required for the service to perform it’s function (Just enough validation) TENET III:Services Share Contract and Policy not Class
  • 14. IT department Policy like language of the system (Arabic – Russian – English) Policy like http/XML/SSL ports The requirements for the way the conversation is to be held E.g. WS- standards (Message encryption, which parts are encrypted, what algorithm we will use to encrypt) TENET IV: Service Compatibility is determined by Policy
  • 15. To understand the patterns we must take a look at the most common anti-patterns Patterns/Antipatterns of SOA
  • 16. Customer. ADD/Update/ Delete Why not? Is updating the address just an update or is it a business process? CRUDY interface
  • 17. CustomersList.MoveNext Who holds the list? Who controls the memory? Enumeration
  • 18. 1.CustomerObject.Setflagfordelete 2.CustomerObject. Delete Objects should not be left in an inconsistent state between message exchanges. However, this is dangerous but not wrong. Chatty Interface
  • 19. The perfect interface for all services: XmlDocument PerformOperation(XmlDocument input) Why not? Implicit behavior versus explicit behavior. You need to know what you send specifically and be generic about what you receive (Just enough validation.) Loosey Goosey
  • 20. To avoid this anti pattern ask 3 questions: 1.What does the service do? 2. What data does it need to do it? 3. What data does the service return? Loosey Goosey contd.
  • 21. A flag called “zeft”, “mido” , “soso” A house of cards Why implicit behavior is bad
  • 22. What if the service schema changes? What happens to the connected systems? Versioning contracts in .NET1.1 vs .NET2.0 [OptionalField VersionAdded = 2] Nickname Why is that important? Just Enough Validation
  • 23. The patterns Patterns and Anti Patterns- Part2
  • 24. Patterns Document Processor Idempotent Message Reservation Some important SOA patterns
  • 25. An architectural approach to creating systems built from autonomous services Integration as a fore-thought rather than an after-thought A service is a program you interact with via message exchanges Services are built to last Availability and stability are critical A system is a set of deployed services cooperating in a given task Systems are built to change Adapt to new services after deployment SOA
  • 26. How do you create a simple to use, well defined an interface? Pattern1: Document Processor
  • 27. Changing your drivers license, Giza Authority for Traffic Real world examples
  • 28. 1. Start with a process 2. Compose a workflow 3. Start Defining your message contracts, before your objects and entities(try to be atomic- avoid chatty interface) 4.Define operations Where to start
  • 29. 5. Group your operations into services Tips: 1. Do not use platform specific types e.g. datasets. 2. Decouple Internal vs. External objects 3. Use TDD so you know you are thinking about the service consumer, now you know how it feels. Where to start contd.
  • 30. Context You are building a web service Problem How do you create a simple to use, well defined an interface? Forces Your interface should Encourage document centric thinking Define a clear semantic in the contract Promote loose coupling through encapsulation of the implementation Be easy to consume from any platform (WS-I base profile) Represent a business process as a complete unit of work Pattern1: Document Processor
  • 31. Solution: Document Processor public FindCustomerByCountryResponse FindCustomersByCountry( FindCustomerByCountryRequest request) { // Do something.... } -Encourage document centric thinking by defining a schema (XSD) for request and response messages in your project -Generate objects from your schema to simplify development -Remember this is a boundary so don’t leak internals
  • 32. Do not leak internal abstractions
  • 34. Transition at the boundary
  • 35. Benefits Consumers think about sending and receiving business documents which are naturally more granular The boundary of the system involves conversion from internal structures to external documents The implementation details of the system are encapsulated The service is more consumable from other platforms and can evolve more easily Liabilities Performance will suffer with transfers of data from internal to external structures Resulting context
  • 36. Should I use the same schema for multiple services or should each service have its own schema? Opinion: Give each service its own schema Sharing schema makes it difficult to evolve each service independently and introduces unnecessary churn for service consumers Design Question
  • 37. How do I handle duplicate messages received at my service? Pattern2: Idempotent Message
  • 38. Context You are developing a web service for your SOA You heard that messages should be idempotent Problem How do you insure that messages are idempotent? Forces You cannot expect anything more from the sender than what the contract defines for your service You are working with a transactional database system with frequent updates Indempotent messages
  • 39. Sender tags message with a request ID Your contract can specify that this is required Your contract cannot insist that the ID is unique across time The ID tags a unit of work which will be done only once Receiver must check to see if the unit of work has already been done before doing it Then what? Solution
  • 40. Option1: return a cached response Option2: Process the message again. Option3: Throw an exception Solution Options
  • 41. You will have to cache responses for some period of time – how long? What if the current value is different than the cached value? What if the response was an error? What if the sender sends duplicate IDs for different units of work? Option1: Return a cached response
  • 42. Great for reads, what about writes? Should we withdraw $1000 from a checking account twice? Option2: Process the message again
  • 43. Did the sender get the original response? How does he get the original response if you are sending him and exception? Option 3: Throw and exception
  • 44. UOW ID can be a part of the request schema Implies duplicate handling is part of the business process UOW ID can be a custom SOAP header Implies duplicate handling is part of the message processing infrastructure Create a schema for the SOAP header Having a URI for immediate sender can be helpful to detect reentrancy Data changes should be traceable to a UOW ID Your cached responses may need to reflect what the response was at the time when the request was received Solutions
  • 45. Benefits Your service autonomy is increased by not having to rely on consumer to do the right thing You won’t fool yourself into thinking that reliable messaging will solve this problem Liabilities Your service will consume potentially large amounts of durable storage caching responses Your service will take a performance hit for cache management Pattern3: Indempotent message
  • 46. How do you maintain data consistency across a long running process? Pattern3: Reservation Pattern
  • 47. Context You are building a service oriented application You have a complex business process that you want to expose to your customers with a web service Problem How do you maintain data consistency across a long running process? Forces You cannot share a distributed transaction The business process requires several messages to complete The message exchange process could take anywhere from seconds to hours Reservation pattern
  • 48. Reservation pattern illustrated Reserve part: 49389 Qty: 200 Reservation ID: 14432 Expires: 2004-09-15 02:43:53Z Confirm reservation: 14432 PO #49839 Reservation: 14432 Receipt: 29389 PO #49839
  • 49. Know the concepts before you write the code SOA is not web services SOA is about standards based integration and friction free interaction between systems SOA is not a silver bullet Summary
  • 50. Web services WCF Biztalk ESB SOA Technologies
  • 51. www.arcast.tv (Webcasts) www.geekswithblogs.net/Mohamed (Cool tech blog) www.msdn.com/Architecture www.thevstsguy.com (under construction) www.msdn.microsoft.com/practices (P&P) References:

Notas do Editor

  1. -Think of how things were done on paperHow do we mimick that in our services?
  2. Internal objects can change as much as we like, External objects need to be versioned.Don’t just return the internal custimer object
  3. Web Services Interoperability Organization (WS-I base profile) a web service standard to encourage interoperability
  4. Move internal object data to your external objects at the boundary
  5. Unit of Work