Arnon Rotem-Gal-Oz's Cirrus Minor
"Making IT work" - Musings of a Holistict Architect
Navigation for Arnon Rotem-Gal-Oz's Cirrus Minor - Stateless services - The state is out there
Content
Sidebar
Footer
May 18, 2008
@ 10:54 PM
Comments [0]
Stateless services - The state is out there
[It has been a little rough last week between a looming milestone @ work and my son fracturing his elbow @ home but hopefully I'll be back to the regular schedule this week]
Stateless services are da bomb right? they are easy to scale (since they have no state you can deploy as many as you like) they are easy to reuse (no state - no baggage) and what not.
The only problem with that is that the state doesn't really go away. Stateless services just suffer from
NIMBYism
("Not in my back yard") when it comes to state. A stateless service needs to be stateful when it performs it action and since the state is not there, it has to get it from somewhere
There are basically two approaches to getting the state into the stateless service
The common way is to make the state someone else's problem (usually that would spell a database). With this approach the stateless service perform queries (database or otherwise) to get the state from the 3rd party. This is problematic in many ways e.g.
You need to pay network tax for getting the state (remember the
fallacies of distributed computing..
)
If that someone else is a single source (such as a database) it can easily become a barrier for scalability (I wrote about the RDBMS problem in the
RDBMS is dead
). If it isn't a single source you need to go to multiple sources so you have the network problem multiplies
You need to pay network tax for putting the state back at the state repository
The other way to get the state is to put the state on the message - or the "document" approach. This approach is superior to the previous one as you get to piggyback the data on the request. This is a good example of stateless communications*, which as a side effect, can save the stateless service the problems mentioned above.
The "state on the message" approach works when the handling of messages is serialized. ie. only one "station" in the flow can make changes to the state at any one time. Unfortunately this only works for a subset of the interactions you can have. Inj most cases multiple consumers need to get to the same data or coordinate
You can also combine the two approaches and sometimes get good reults.
Another way altogether is to look at stateful services which I'll talk about in the next post
* Many times people fail to make the distinction between stateless services and stateless communications - I'll expand on that in another post.
Tags:
scalability
|
SOA
|
Software Architecture
Related posts:
Software Architecture Seminar by Rick Kazman
Messaging subscriptions - per Message vs. Topics
Architect Soft Skills - PDF version
Architect Soft Skills
Eventing in WCF
Architecture - It is always a tradeoff
« SOA Patterns can save you time, money
|
Home
|
Should you use type inference in C# (var... »
Comments are closed.
RSS/Subscribe
Navigation
Home
Papers, Articles & Presentations
SPAMMED Architecture Framework
SOA Patterns
About Me
Search
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)
Use Cases Methodology for large systems (ppt)
Software Architecture (ppt)
Service Oriented Architecture - Intro (ppt)
What is SOA anyway? (pdf)
O/R Mapping: Why/When (pdf)
Order my SOA Patterns Book
Published Patterns
Edge Component (pdf)
Gridable Service (pdf)
Service Firewall (html @ InfoQ)
Saga (pdf)
What I am reading
Subscribe to RSS headline updates from:
Tag Cloud
.NET (66)
A&D2007 (6)
Agile (22)
BI (2)
Cloud Computing (2)
dasBlog (1)
data (5)
Design (21)
ESB (2)
Everything (200)
Functional Languages (1)
General (62)
Google (1)
Java (7)
Mobile (2)
new (4)
OO (11)
PaperLnx (6)
Papers (3)
Project Management (8)
Q&A (1)
refactoring (1)
Requirements (2)
REST (15)
RIA (4)
ruby (8)
scalability (6)
SCRUM (2)
SOA (79)
SOA Patterns (33)
Software Architecture (175)
SPAMMED Process (33)
TDD (5)
Trends (2)
Trends (8)
WCF (2)
xsights (2)
Archives
December, 2008 (4)
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