Chapter 15. Technical Details

IN EACH SOA, THERE ARE SOME TECHNICAL ASPECTS TO IMPLEMENT (OR AT LEAST TO THINK ABOUT). This chapter presents and discusses those that are fundamental enough that you should be familiar with them, because sooner or later you will have to deal with them.

Services and State

Often descriptions of SOA claim that services should (ideally) be stateless. However, what is meant by “stateless” or “stateful” in the context of services can be a source of confusion. One reason is that there is always some state involved, even with stateless services. The key questions are where and for how long this state is kept. In addition, whether a service is stateful is a matter of perspective. Services may be stateless from a business point of view and stateful from a technical point of view, and vice versa. This section looks closely at the issue of “state” in the context of services, clarifying the terminology and discussing different approaches used in practice.

Stateless Services

Conceptually, a stateless service is a service that does not maintain any state between different service calls. That is, after the service call is over, all local variables and objects that have been created temporarily to run the service are thrown away. Note that we’re talking about the data of the service itself, which is neither the process or application that calls the service nor the backend system(s) on which the service operates. The service is stateless when all the data of the service ...

Get SOA in Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.