Skip to main content

What is a Service in an SOA?


A Service in an SOA meets the following criteria:


·                            Multiple-use

·                            Non-context-specific

·                            Composable with other components

·                            Encapsulated i.e., non-investigable through its interfaces

·                            A unit of independent deployment and versioning

A Service is written to a specification. It does not matter what the specification is: COM, Java Beans, WSDL, etc., as long as it adheres to the specification. It is only by adhering to the specification that it becomes a Service and gains features like reusability and so forth.
The idea in OO (Object Orientation) is that software should be written according to a mental model of the actual or imagined objects it represents.
Services, by contrast, makes no such assumptions, and instead state that software should be developed by gluing prefabricated components together much like in the field of electronics or mechanics.
When a Service is to be accessed or shared across execution contexts or network links, some form of serialization (also known as marshalling) is employed to turn its interfaces into a bitstream.
It takes significant effort and awareness to write a Service that is effectively reusable. The Service needs:


·                            to be fully documented;

·                            more thorough testing;

·                            robust input validity checking;

·                            to pass back useful error messages as appropriate;

·                            to be built with an awareness that it will be put to unforeseen uses;

·                            a mechanism for compensating developers who invest the (substantial) effort implied above.



No big deal to agree with these statements, is it? Now read, for fun, the definition of a
Software Component where I took these text fragments from while replacing "software component" by "Service".

So, is a software component a Service and is CBD (Component Based Development) the same as building a Service Oriented Architecture? Not quite, it is the other way around: A Service in an SOA (as SOA is currently understood) is a software component, but a component with a strong business function constraint. SOA is an instance of a component based architecture. So building an SOA has always to do with CBD, but CBD has not always to do with building an SOA as we understand an SOA.
The idea that software should be componentized, built from prefabricated components (like Services), was first published in Douglas McIlroy's address at the NATO conference on software engineering in Garmisch, Germany, 1968 titled Mass Produced Software Components. A very interesting reading. Some quotes:

·                           

Comments

Popular posts from this blog

Asynchronous Vs. Synchronous Communications

Synchronous (One thread):   1 thread -> |<---A---->||<----B---------->||<------C----->| Synchronous (multi-threaded):   thread A -> |<---A---->| \ thread B ------------> ->|<----B---------->| \ thread C ----------------------------------> ->|<------C----->|

WebSphere MQ Interview Questions

What is MQ and what does it do? Ans. MQ stands for MESSAGE QUEUEING. WebSphere MQ allows application programs to use message queuing to participate in message-driven processing. Application programs can communicate across different platforms by using the appropriate message queuing software products. What is Message driven process? Ans . When messages arrive on a queue, they can automatically start an application using triggering. If necessary, the applications can be stopped when the message (or messages) have been processed. What are advantages of the MQ? Ans. 1. Integration. 2. Asynchrony 3. Assured Delivery 4. Scalability. How does it support the Integration? Ans. Because the MQ is independent of the Operating System you use i.e. it may be Windows, Solaris,AIX.It is independent of the protocol (i.e. TCP/IP, LU6.2, SNA, NetBIOS, UDP).It is not required that both the sender and receiver should be running on the same platform What is Asynchrony? Ans. With messag

Advantages & Disadvantages of Synchronous / Asynchronous Communications?

  Asynchronous Communication Advantages: Requests need not be targeted to specific server. Service need not be available when request is made. No blocking, so resources could be freed.  Could use connectionless protocol Disadvantages: Response times are unpredictable. Error handling usually more complex.  Usually requires connection-oriented protocol.  Harder to design apps Synchronous Communication Advantages: Easy to program Outcome is known immediately  Error recovery easier (usually)  Better real-time response (usually) Disadvantages: Service must be up and ready. Requestor blocks, held resources are “tied up”.  Usually requires connection-oriented protocol