Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOA architecture data access

In my SOA architecture, I have several WCF services.
All of my services need to access the database.

Should I create a specialized WCF service in charge of all the database access ?
Or is it ok if each of my services have their own database access ?

In one version, I have just one Entity layer instanced in one service, and all the other services depend on this service.
In the other one the Entity layer is duplicated in each of my services.

The main drawback of the first version is the coupling induced.
The drawback of the other version is the layer duplication, and maybe SOA bad practice ?

So, what do so think good people of Stack Overflow ?

like image 767
Roubachof Avatar asked Nov 03 '09 18:11

Roubachof


People also ask

What are the 3 types of architecture in SOA?

There are three roles in each of the Service-Oriented Architecture building blocks: service provider; service broker, service registry, service repository; and service requester/consumer.

What is SOA in data management?

A service-oriented architecture (SOA) is a business-centric architectural approach that supports integrating business data and processes by creating reusable components of functionality, or services. Traditionally, the identification of services has been done at a business function level.

What is SOA explain with its architecture?

Service-oriented architecture (SOA) is a type of software design that makes software components reusable using service interfaces that use a common communication language over a network.

What are the 3 main layers in an SOA layered architecture?

Three of the layers address the implementation and interface with a service (the Operational Systems Layer, the Service Component Layer, and the Services Layer). Three of them support the consumption of services (the Business Process Layer, the Consumer Layer, and the Integration Layer).


1 Answers

Just my personal opinion, if you create a service for all database access then multiple services depend on ONE service which sort of defeats the point of SOA (i.e. Services are autonomous), as you have articulated. When you talk of layer duplication, if each service has its own data to deal with, is it really duplication. I realize that you probably have the same means of interacting with your relational databases or back from the OOA days you had a common class library that encapsulated data access for you. This is one of those things I struggle with myself, but I see no problem in each service having its own data layer. In fact, in Michele Bustamante's book (Chapter 1 - Page 8) - she actually depicts this and adds "Services encapsulate business components and data access". If you notice each service has a separate DALC layer. This is a good question.

like image 186
Ta01 Avatar answered Oct 06 '22 00:10

Ta01