Arnon Rotem-Gal-Oz's Cirrus Minor
"Making IT work" - Musings of a Holistict Architect
Navigation for Arnon Rotem-Gal-Oz's Cirrus Minor - Using REST along other architecture styles
Content
Sidebar
Footer
August 21, 2008
@ 08:22 PM
Comments [1]
Using REST along other architecture styles
Following my latest post on
evolving the architecture
Dru asked me for more details on our RESTful control channels.
For one you can take a look at slide 25 of
my presentation on REST
which talks about the Sessions resource. The session resource returns an AtomPub feed of the current active sessions and then if you follow a link to a session you get the current status, the URIs of the participating resources etc.
I guess the more interesting questions are (especially in the light of all the on going
REST
debate
we
now
see
)
Why rely on REST for the control channel
Why not use REST for the whole system
So, why is REST a good option for the control channel?
the REST architectural style in general and REST implementation using web standards (HTTP, AtomPub etc.) in particular brings a lot of benefits in integration (what easy for humans to understand is easier to implement).
Another reason for REST (over HTTP) is standardization over languages and platforms. Any language and platform I've used has an implementation that allows sending and receiving HTTP messages. We have few components running on Linux and components running on Windows and we're planning even more heterogeneity down the road.
Lastly, REST allows for easy debugging and run-time interaction. This proved invaluable during system integration test where we could easily understand the current state of each of the components in the system as well as the general picture.
Ok, if everything is so good, why not use REST for the whole system? Well, because like any architecture or architectural style (especially, when incarnated in a technology), REST has things that it does well and things that it doesn't (personally, I don't buy the Only Good Thing(tm) for anything or as Brooks puts it there's no silver bullet).
Let's look at message exchange patterns for instance. REST over HTTP support the request/reply pattern.
This works extremely well in many business situation. For instance is we have an Order service (or resource for that matter) and we need to calculate the discount for a specific customer we can go to the Customer service and get her current status and check if she a VIP customer, senior citizen etc.
There are, however, places where it doesn't work as smoothly. Returning to our Order, lets consider what happen once the order is finalized and we need to both start handle it (notify the warehouse?) and Invoice it
The order service does not care about these notifications it isn't its business.
My favorite way to solve this is to introduce business events (incorporate Event Driven Architecture) so that the interested parties will get notified. Another common way to solve this is to introduce some external entity to choreograph or orchestrate it (BPM etc.) both options have different constraints and needs compared with REST. In my organization we have a lot of processes that lend themselves to event processing much better than they do REST over HTTP (though the implementation might end up aligned with the REST architectural style - I am not sure yet)
Another reason not to use REST is when you have to integrate with stuff that isn't RESTful, for instance we need to integrate with systems that use RTP and other such protocols so we are bound to that - and we are a startup with "green field" development. In an established enterprise the situation is much more complicated.
To sum up, in my opinion when you take a holistic view of a complete business you are bound to see places where different architectural principles are a good fit. Architecture styles (and architectural patterns) are tools you can use to solve the challenges.There are places where a hammer is a great fit, but it is also wise to make sure the toolset has more than just a hammer.
PS
It isn't that you can't do events with REST over HTTP. e.g You can implement the events as an ATOM Feed and have the "subscribers" check this feed every once in a while (the way this blog works). It can even check the HTTP header before getting the whole feed. Still push is a more natural implementation for this for various reasons like you don't have to know where to find the event source and you can more easily improve latency (when needed) etc.
Tags:
REST
|
SOA
|
Software Architecture
Related posts:
Evolving Architectures – Part I What’s Software Architecture
Keep the BIT – check system liveliness
More on WCF oddities
SOA – There could be only one…
SOA Patterns presentation on E-VAN (recording)
SOA Patterns on the next E-VAN (Oct. 5th 2009)
« Visual Studio 2008 Tip : Multiple startu...
|
Home
|
"97 Things" - Architect Axioms »
Sunday, September 28, 2008 5:53:51 AM (GMT Standard Time, UTC+00:00)
Good points.
Whenever I see the "Event Driven Architecture" model peering its head in the project during functional requirements, I prefer to use a workflow solution (WF). Obviously, not that it can't be done with REST, but currently its easier to do it differently (at least in WF).
Where I do love REST architecture is things like Business Intelligence. Low-REST read-only (or highly read only) APIs for large amounts of data for analytics fit that model real well.
Bart Czernicki
Comments are closed.
Navigation
Home
Papers, Articles & Presentations
SPAMMED Architecture Framework
SOA Patterns
About Me
Featured Presentations & Papers
REST introduction (ppt)
SOA Pattern Presentation (pdf)
Fallacies of Distributed Computing (pdf)
Getting SPAMMED for architecture (pdf)
OO Primer (ppt)
Use Case Methodology for large systems (pdf)
Software Architecture (ppt)
Service Oriented Architecture - Intro (ppt)
What is SOA anyway? (pdf)
(New) SOA Patterns Presentation (pdf)
More...
SOA Patterns Book
Published Patterns
Edge Component (pdf)
Gridable Service (pdf)
Service Firewall (html @ InfoQ)
Saga (pdf)
The Knot Antipattern (pdf)
Blogjecting Watchdog (pdf)
Reservation (pdf)
What I am reading
Subscribe to RSS headline updates from:
Tag Cloud
.NET (80)
A&D2007 (6)
Agile (26)
BI (2)
Cloud Computing (3)
dasBlog (1)
data (6)
Design (26)
ESB (2)
Everything (200)
Functional Languages (1)
General (66)
Google (1)
iPhone (1)
Java (9)
Mobile (3)
Mono (1)
new (4)
OO (15)
PaperLnx (6)
Papers (4)
Programming (1)
Project Management (11)
Q&A (2)
refactoring (1)
Requirements (2)
REST (21)
RIA (4)
ruby (8)
scalability (6)
SCRUM (2)
SOA (103)
SOA Patterns (49)
Software Architecture (197)
SPAMMED Process (33)
TDD (7)
Trends (4)
Trends (9)
WCF (8)
xsights (7)
Archives
January, 2010 (2)
December, 2009 (1)
November, 2009 (3)
October, 2009 (3)
September, 2009 (5)
August, 2009 (3)
July, 2009 (1)
June, 2009 (3)
May, 2009 (4)
April, 2009 (2)
March, 2009 (3)
February, 2009 (3)
January, 2009 (5)
December, 2008 (8)
November, 2008 (6)
October, 2008 (4)
September, 2008 (4)
August, 2008 (8)
July, 2008 (6)
June, 2008 (5)
May, 2008 (4)
April, 2008 (4)
March, 2008 (6)
February, 2008 (3)
January, 2008 (5)
December, 2007 (9)
November, 2007 (6)
October, 2007 (11)
September, 2007 (11)
August, 2007 (10)
July, 2007 (9)
June, 2007 (9)
May, 2007 (9)
April, 2007 (6)
March, 2007 (4)
February, 2007 (2)
January, 2007 (5)
December, 2006 (4)
November, 2006 (3)
October, 2006 (4)
September, 2006 (2)
August, 2006 (4)
July, 2006 (3)
June, 2006 (4)
May, 2006 (10)
April, 2006 (8)
March, 2006 (8)
February, 2006 (6)
January, 2006 (6)
December, 2005 (3)
November, 2005 (5)
October, 2005 (6)
September, 2005 (10)
August, 2005 (5)
July, 2005 (15)
June, 2005 (16)
All dates
All Posts
Contact the Author
Contact Arnon
Affiliations
Admin
Sign In