Explaining the SOA/REST impedance mismatch
-
Upload
william-martinez-pomares -
Category
Career
-
view
1.036 -
download
0
Transcript of Explaining the SOA/REST impedance mismatch
AGENDA
Needs and Architectural Styles
Application Types
Mismatches!
Vice versa: The Service As A Resource option
2011 William Martínez Pomares Avantica Technologies UCR 2
NEEDS AND ARCHITECTURAL STYLES
2011 William Martínez Pomares
Avantica Technologies UCR4
Styles are created to support needs
Styles define actors, component types, relations
Styles impose restrictions, constrains
Styles are the why and a macro how
Styles chosen for application types and needs
APPLICATION TYPES
2011 William Martínez Pomares
Avantica Technologies UCR5
Distributed
Networked
Integrated
DISTRIBUTED APPLICATION
oApplication as a
Whole
o Tight connections
o High speed
communication
o Strong coupling
o Reuse of Parts
Optional
2011 William Martínez Pomares
Avantica Technologies UCR6
NETWORKED APPLICATION
• Application as a Composition of Nodes
• Weak coupling
• High cost communication
• User aware of composition
• Reuse of Parts is common
2011 William Martínez Pomares
Avantica Technologies UCR7
INTEGRATED APPLICATION
• Application as an Integration of Whole Applications
• Standard Interfaces
• Low frequency of interaction
• Higher level processes
• Reuse of Parts is rule
• Large distribution
2011 William Martínez Pomares
Avantica Technologies UCR8
SOA SOLVES…
2011 William Martínez Pomares
Avantica Technologies UCR9
SOA – Large Distributed System*
• Legacy
•Heterogeneous
•Complex
• Imperfect
•Redundant
•Business service, process oriented*Nicolai M. Josuttis, SOA in Practice, OREILLY
REST SOLVES
2011 William Martínez Pomares
Avantica Technologies UCR10
REST - Large Grain Hypermedia Transfer *
•Low Entry-barrier
•Extensibility
•Distributed Hypermedia
• Internet-scale
•Anarchic Scalability
• Independent Deployment
*Roy Thomas Fielding, Architectural Styles and the Design of Network-based
Software Architectures, 4
SOA SOLUTION
2011 William Martínez Pomares
Avantica Technologies UCR11
Client
Service
Service
Service
Client
Repository
Flo
w
REST SOLUTION
2011 William Martínez Pomares
Avantica Technologies UCR12
Client
Client
Server
Server
Server
COMPARING… MISMATCH!
SOA
• Messaging: Send data to a service for processing. RPC?
• No operation in protocol
• Business as a process, not as data
• Processes as resources
• Discoverable by repository, centralized
• No flow control. External or out of band
• Business semantics
REST
• Messaging: Send/Receive representation. No RPC.
• Finite Operation set in protocol
• Not about business
• Datum as resources
• Discoverable by link, distributed
• Hypermedia as the State Engine
• Mixed semantics
2011 William Martínez Pomares
Avantica Technologies UCR13
REST – SOA MATCH UP
2011 William Martínez Pomares
Avantica Technologies UCR14
Different Application Types
Both Use Uniform Interface, just Different one!
Each style can use the other internally
Use implies impedance mismatch
Client and server have different tasks
None is easier!
SOA AND REST WEB SERVICES
2011 William Martínez Pomares
Avantica Technologies UCR15
REST as Special Service construction architecture
• Large distributed data
•Hypermedia related or Insensible to format transformation.
•Relaxed Security
• Independent evolution requirement
•Non processing intensive
•Non sensitive to performance hits, cacheable.
REST AND SERVICE AS A RESOURCE
2011 William Martínez Pomares
Avantica Technologies UCR16
WSA and the Resource View
•A Service has an ID
•Get will return the services description doc (SDC).
•SDC contains links with flow and document semantic rules
• (Call SDC the WSDL)
•Service Usable in any RESTful Interaction
CONCLUSION
2011 William Martínez Pomares
Avantica Technologies UCR17
Two styles, Not incompatible
Check semantics and business abstraction level
Use SOA for business oriented, centralized control needs
Use REST for data oriented, dynamic topology needs
Study carefully interactions and mismatch cost