Doorgaan naar hoofdcontent

SOA Service Design Principles by example

First some context

I a project i had to couple a PeopleSoft system with Planon.
PeopleSoft is a HRM system used to store information about employees (in this case) and Planon is a facility management tool so that employees can order facilities.
When a employee is employed within the company, this employee has to added to the HRM system and this employee has to be authorised within the Planon system.
In the past this synchronization was done (as you see often) through a CSV file.
In the new architecture this kind of synchronization has to be done through a ESB (Enterprise Service Bus). In this case the Oracle Service Bus.

Service Naming

I wanted to add a new Service for this, so the first thing you do it to come up with a Service Name.
A couple of mistakes you often see is:
* The name is the same as the project name.
This is of course not done, because in a couple of months this name is forgotten and has nothing to with the functionality of the service at all (most of the time).
So the Discoverablity service design principle is also jeopardized.
* The name is the same as the name of the system (in this case Planon).
This goes against one of the overall goal of Service Oriented Architecture, namely vendor diversity.
In case you happen to change the system, the name of the service is useless but already Service Consumer may use the service.

The name I have chose is FacilityManagementAuthorisation.
The reason is that the functionality of this service is about authorising employees within the facility management system.
So this is the service naming design part, next is the Loose Coupling.

Loose Coupling

We use the Oracle Service Bus to decouple the service interface of the service from the actual implementation.
The OSB has the concepts of ProxyServices and BusinessServices.
If you ever worked with Planon and its webservices you may have noticed that these webservices are exactly that, without considering service oriented principles.
They are generated straight from the database tables and for each entity a webservice is generated.
For example you have a Person entity that contains information about the employees.
Before you can create Person entities you have to use the Session webservice to login.
Then change some Person attributes, Save, logout.
This is not the way you want to expose this as a Service. This is not the correct Abstraction. This way you would create a Service Contract - Implementation coupling.

So what should be done instead. This is where BPEL comes in! This is a technical orchestration language that is used to chain some backend calls to the Planon webservice.
In this case i created the following Service Interface:
* authoriseEmployee( Employee ), This operation authorises an Employee within the facility management system.
* removeEmployee( EmployeeNr ), This operation removes the employee from the facility management system.

I hope this small blog item gives you some insight in the choices you have to make when delivering SOA Services.
Comments and Additions are welcome!

Reacties

  1. Good example, I like the design principles. Why didn't you use Osb instead of Bpel?

    BeantwoordenVerwijderen
  2. I used the OSB to expose the Service. The Service itself is implemented using BPEL.
    Otherwise when using OSB only you end up by doing some callouts to the Planon webservice and that is typically BPEL functionality (in my opinion).

    BeantwoordenVerwijderen

Een reactie posten

Populaire posts van deze blog

Microservices mindmap

"The tree" - See also   my photo page When you are fairly new within the Microservices land, there are a lot of terms fired at you. So also for my own understanding i have made a mindmap. I think it has a good status now, so that i can share it with you. As always feedback is very welcome ! You can download the mindmap here .

OSB 10gR3 and SWA and MTOM

This blog is about using soap with attachments and the use of MTOM within the OSB (10gR3). A service is created that accepts a soap with attachment (DocumentService) and translates it to a service that accepts a binary element. MTOM is used for performance reasons for the second. Some notes: * For the use of attachments you need RPC-style document instead of the usual document-style. This due to the fact that the document-style limits a message to a single . * A service can not have both SWA and MTOM within OSB. First a WSDL is setup for the DocumentService: The $attachments variable holds the attachments and the body holds the attachment data. Also other data is stored within the attachment element (see h...

Cloud to Cloud Application Integration

A lot of applications have integration possibilities, so do cloud applications. The question I got from a customer is whether to have a point-to-point integration with Cloud applications or to go through their ESB solution. This blog describes some considerations. Context The customer has a HRM application in which job vacancies are managed. Furthermore that system also handles the full applicant process flow. They also have another cloud application that handles the job vacancies. This application posts the jobs to social sites and other channels to promote the vacancies. Furthermore this application has some intelligence for job seekers to advice some new vacancies based on previous visits or profiles. The job vacancies need to be sent to the Vacancies application and applicant information needs to be sent to the HRM application, when a job seeker actually applies for a job. Furthermore status information about the job application is als...