User Manual: Implementing Service Managers

Overview

This section describes the design concepts and patterns of the Service Manager approach. It also has a Cookbook style guide to implementing a Service Method.

See also, stereotype references for <<Service Manager>>, <<Service Method>>, and <<Activity>>.

Service Manager related Design Concepts & Patterns

Service Managers are at the heart of the openSEAL approach to Service Oriented Architecture (SOA). A service is basically the endpoint of a connection to some type of computer resource. This section provides information on the specification of services. In openSEAL, a Service Manager is a logical grouping of one or more Service Methods, generally grouped along functional lines. It is good design practice that the public interface and the implementation of all Service Managers be separated. The work performed by the Service Method is typically done by one or more Activities. These activities can include business rule validation, database access, message queue postings, in fact, any unit of work that your business application may perform. Since a Service Method is designed to be accessable publically (typically via .NET Remoting), it denotes a single transactional unit of work (in otherwords, transaction do not span multiple Service Methods).

Service Managers and Service Methods

Recommended charateristics:

  • Don't have one Service Method call another Service Method. Instead use, and reuse Activities when you find that a Service Method does work that is an aggregation of other Service Methods. (This is an example of how the design is service-oriented rather than object-oriented).
  • Separate Interfaces from Implementations.

 

Activities

An Activity is a class that implements IManagedResourceActivity and encapsulates a unit of work against a certain type of Managed Resource. Examples of Managed Resources include Relational Databases and Message Queues.

activities object model

Recommended charateristics:

  • Maintain a 1-to-1 correspondance between activities and Resources (in other words don't do a DB update and a Messge Queue post in one activity). This allows the IActivityExecutor to handle the transactions correctly and promotes reuse.
Database Agents

Database Agents are, you guessed it, Activities that are specifically designed to access Database Managed Resources. openSEAL has several base classes available for you to subclass and quickly include database access to your application.

Message Queue Agents

Message Queue Agents are the Message Queue equivalent to Database Agents. No prizes for guessing that! openSEAL has an abstract base class, BaseTransactionalMessageAgent, that you can extend from to access a message queue in a transactional context.

Other Activities

While enterprise applications typically rely heavily on Databases and Messaging, clearly these are not the only types of activities your application could want to do. In order to

Note to contributors: we encourage you to submit Activities that you think would be suitable for inclusion in the openSEAL libraries so that the whole community can to gain productivity. Learn more >>