Friday, December 10, 2004


Service Layers

Not all services are the same. Like objects, I think of services being focused on particular concerns within the enterprise architecture. Outer layers are primarily concerned with process and interacting with external actors. Inner layers are concerned with entity management and coordination.

At the innermost layers you have services that maintain what Pat Helland calls resource data. Resource data record the state of essential, long-term enterprise entities – like products, customers, employees, and money. Ideally each entity would be guarded by one service. And that service would support simple interfaces to create, retrieve, update and delete (CRUD) entities. They “guard” the data by enforcing the appropriate security policy and business rules.

Unfortunately, not all of the information about an entity is managed by single service, or located in a central place, or has identical business and security constraints. So in real enterprises we find that data about a single entity is distributed. Take employees, for example, some information about employees is manage by the HR department, and some by payroll department, and some by the security department.

This creates the need for a service layer concerned with managing aggregated entities. These services provide a single interface to enterprise entities, hiding the partitioning from the outer layer of services. They distribute updates and aggregate retrievals, creating the impression of a simple entity. And they coordinate creation and deletion of entities among its partitions. For example, hiring or firing an employee must be coordinated among the HR, payroll, and security departments.

Above the entity layers, we find the workflow layer. The services in this layer manage long-term enterprise processes, like order processing, loan approval, hiring or firing an employee, or month end closing of the accounts. Like entity services, workflow services manage persistent data - the state of the process. But, unlike entities, workflows are expected to terminate eventually. With this layer we transition from the static to the dynamic. It is here that many of the governance and compliance rules are enforced.

If the entity layer dependencies are trees, the workflow layers are graphs. An enterprise’s processes are typically highly interdependent. And so are their services. It may be difficult to manage these interdependencies. If they become sufficiently complex, then some way must be found to layer the workflows between primitive processes and higher–level processes.

Finally, there is the interface layer. This layer is focused on interacting with the outside world. This includes interaction in the form of applications that interact with humans and choreographies that interact with the services in other organizations. I think of these services as implementing “Use Cases” or sessions. They serve as interfaces to the workflow and entity layers.

This page is powered by Blogger. Isn't yours?