Vaughn Bullard

All things that keep my interest

Dynamic Service Level Agreements

February 18th, 2008

Web service messages in a SOA environment can be measured for compliance to service level agreements. There are many tools and applications out on the market that allow the measurement and enforcement of these types of SLAs, but what happens when you have something out of the ordinary? For example, recently I had done some consulting for an organization that wanted to do dynamic service level agreements base on their services’ dynamic response times. My initial thought was “Huh? Why? That goes against the mantra of SLAs.” Then I thought about it for a minute as this kind of intrigued me.

So the problem domain was such that the client needed an SLA to dynamically adjust based upon a certain number of elements within a SOAP message. The client knew that based upon one element in a SOAP message that it took X amount of seconds for the web service to process that specific element. This is especially important if the service is waiting for a database or a transaction to process that message. (Why not an entity bean with an asynchronous messaging scenario is another story all together.) However, how would this be handled in a post-processed scenario?

I set out to figure this problem out. So what I did was to get the potential profile characteristics of this service and its potential messages. The service normally processing would have a baseline response time of 300 ms. The elements that were to be metered (for lack of a better term) would be an additional 400 ms for each element. The dynamic total response time would have to be a total of the baseline response time plus a calculation of all the number of elements times their 400 ms expected transaction time. So in simpler terms I came up with the following algorithm for doing dynamic SLA response times:

Total Response Time = Baseline Response Time + (# of Elements * Element Transaction Time)

In essence, if one had the baseline response time of 300 ms, 10 elements and 400 ms for each element, I would come up with the following result:

Total Response Time = 300 ms + (10 * 400)

Total Response Time = 300 ms + 4000 ms

Total Response Time = 4300 ms, or 4.3 seconds

I thought to myself, cool, got that one solved, then the client threw another wrench in my gear. “Well, those elements might have a different transaction profile, so element A will have a transaction time of 300 ms, element B-400 ms and element C-500 ms.” So I thought to myself that this would be no problem, it is a simple modification of the algorithm above.

Total Response Time = Baseline Response Time + (# of Elements A * Element Transaction Time) + (# of Elements B * Element Transaction Time) + (# of Elements C * Element Transaction Time)

Total Response Time = 300 ms + (10 * 300) + (7 * 400) + (5 * 500)

Total Response Time = 300 ms + 3000 ms + 2800 ms + 2500 ms

Total Response Time = 8600 ms, or 8.6 seconds

After thinking a lot about it, I ended up thinking that this was a pretty good idea. I was able to implement this with simple XPath element checking of the message-counting of the elements, doing the appropriate calculation and throwing alerts when a message transaction did not comply with the dynamic SLA. Not something I see everyday, but it definitely solved one of their business logic issues.

:Vaughn

Tags: time, dynamic service, transaction time, processing, environment, compliance, Transaction, soap, kind, client

What constitutes a ‘Web Service’?

December 9th, 2007

Ahhh,

Definitely the question of the hour and pretty much for the last two years. For those of us in the IT industry and SOA vendors in particular, there has been a continual struggle about what constitutes a Web Service. What is that “Service” in “Service Oriented Architectures”? I think that there are two camps of politicos present here – those who develop ‘Web‘ Services and those who develop ‘Web Services‘. “Wait a minute”, you ask, “you’re saying the same thing”. Am I? No, they are two camps that are trying to do similar things only in a different fashion. Hence the emphasis between ‘Web‘ Services and ‘Web Services‘. There are some subtle and not so subtle differences between the two.

One of my close friends, who is a database admin, asked me “Vaughn, if a service is on the web (meaning he can access it over HTTP) and I can access it, isn’t that a web service?” After he asked that question I realized that there is definitely ambiguity in the IT industry with its definition of “Web Services”. But first, let’s explore these camps, what they are doing and how they define what they think is a web service.

First, there is the camp that creates “Web Services“-both in Java, .NET or some other programming language. These “Web Services” are based on sending messages via SOAP over HTTP, a WSDL document and service consumers may or may not use a service registry to find the “Web Services“. They are based on a standardized messaging protocol, a standardized service description and a standardized way of finding the “Web Services“. It provides an almost totally standardized mechanism for service providers and consumers to offer and consume “Web Services“.

The second camp sort of creates “Web” Services from scratch. There is nothing wrong with this approach. They may or may not write their messaging protocol from scratch-although most variants in the sixty or so customers of mine that employ this mechanism, use XML over HTTP. Most of the the time, the description of the “Web” Service is defined internally or between consumers and providers. It may or may not be WSDL-based, but generally it involves a simple request/response messaging format that may or may not published and accessible. This is different than “Web Services” in the fact that dynamic runtime binding is just not an option. “Web Services” allow that kind of capability if keyed in conjunction with a service registry (UDDI).

In this camp, “Web” Services may be published onto a web page that describe the expected request and response formats without describing the operations. A lot of IT personnel who live in the secure world say that this is preferred, without actually trying to explore the capabilities of the standardized “Web Services“. One successful example of this camp being implemented is the Open Geospatial Consortium.

So, knowing the differences, which is better? I honestly would not say either one is better. I would say that the first camp delivers on a promise of open interoperability. Isn’t that kind of what one wants when designing a service oriented architecture? If you are a large company and you’re only going to share with your vendors and then defining your own service descriptions, messaging protocols and directories, then that may be fine. I just hope that your company or organization has deep pockets, because that’s what it will take.

A lot of software and hardware vendors, not really involved in SOA, from what I have seen, are pushing the ‘interoperability’ stick back to the customers-stating that ‘we support whatever XML representation’ you need. Their support generally consists simply of brokers or simple software interfaces that export or transform XML to your desired format-rather than building in the SOA-ready capabilities.

However, if you want standardize everything without having to actually create the standards, then you might want to go with the first camp. You’ll certainly benefit from not only the lessons learned of many customers before you, but also from the built-in support of the hardware and software vendors already building tools to support SOA.

I would love to hear any comments on how other SOA architects and developers are developing web services.

:Vaughn

Tags: different fashion, web service, ambiguity, xml, service providers, close friends, protocol, service oriented architectures, soap, service description