|
Anne,
When
your message came in, I was in the middle of presenting a simple example to get
exactly to the same point. I'm reformulating it here in reference to
yours.
My proposed simple example
is a service-oriented lightbulb (to shed
some more light :-)
It
exposes an interface comprising the (self-explanatory) operations
'TurnOn', 'TurnOff' and 'Dim'. (This supposes the lightbulb has some
intelligence built in, which may seem absurd, but isn't.)Using WS-*, one would define a WSDL with a single portType comprising
the above three operations.
So, Function1 = TurnOn, Function2 =
TurnOff, Function3 = Dim (one more than in your
example).
Function1in = void, Function2in = void, Function3in =
Luminosity.
The interaction pattern may be either
request-response or one-way, depending on whether or not the service consumers
are supposed to be informed of the results of the requested operation. If not,
there are no outputs Function1out, Function2out and Function3out. If yes, all
three are a result value.
In addition, the portType could define a
Fault message, but let's keep it as simple as
possible.
Note that the operations are *not* meant
to be remote procedure calls: a 'TurnOn' request is an asynchronous SOAP message
and so is the corresponding response, if any. WS-Addressing is used to correlate
the response with the request. Depending on the environment,
various protocols can be used to transport these messages, including TCP
and UDP.
Note further that the operations are
supposed to be stateless.
Using the REST approach, following your
scheme one would define the resources:
and the light would be turned on, turned
off and dimmed by HTTP/POSTing a message to each of the
respective resources.
An alternative scheme would be to have
just one resource:
and
include the name of the operation in the POSTed
messages.
Or
one could HTTP/GET "queries" like http://example.lightbulb.net/TurnOn
and http://example.lightbulb.net/Dim?Luminosity=.75.
But how would one go
about to make request and response messages
asynchronous?
In any case, the fact
of having the lightbulb expose a "uniform interface" (GET, POST) doesn't make my
client application any simpler. This application is only interested in using the
functional interface of the lightbulb service: turning it on, turning it off,
dimming it -- these are the taks of the lightbulb's "business process". As
seen from the application, whether these tasks are invoked through SOAP messages
or through HTTP/POST messages is more of a plumbing issue than anything
else.
Note that, for the
sake of this discussion, my example is deliberately simplistic, but it
could easily be made more
complex.
As a side remark, let
me mention a few practical
issues.
1. The application
doesn't know beforehand the identity of the lightbulb it's going to
control and maybe it needs to control several lightbulbs, e.g. all those
found on the network within a certain scope or of a given type. This is why
WS-Discovery is needed -- with or without authentication and authorization
(WS-Security).
2. Maybe the lightbulb
is controlled by a given application while some other application needs to be
informed whenever the lightbulb's state changes. WS-Eventing serves such
purposes (again, with or without WS-Security). In addition, if these event
notifications are vital, WS-ReliableMessaging may be used to ensure event
delivery.
This shows how the
WS-* mechanisms can be composed in various ways according to the
application requirements, while using a common protocol substrate and
independently of implementation
platforms.
Harm.
__._,_.___
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
Title: Message
- Re: [service-orientated-architecture] Re: SOA R... Steve Jones
- Re: [service-orientated-architecture] Re: S... Anne Thomas Manes
- Re: [service-orientated-architecture] Re: SOA Refer... Stuart Charlton
- Re: [service-orientated-architecture] Re: SOA R... Steve Jones
- Re: [service-orientated-architecture] Re: S... Stuart Charlton
- Re: [service-orientated-architecture] R... Steve Jones
- Re: [service-orientated-architectu... Jan Algermissen
- Re: [service-orientated-architecture] R... Gregg Wonderly
- Re: [service-orientated-architectu... Stuart Charlton
- Re: [service-orientated-architecture] Re: SOA Reference ... Eric Newcomer
- RE: [service-orientated-architecture] Re: SOA Reference ... Harm Smit
- Re: [service-orientated-architecture] Re: SOA Refer... Mark Baker
- Re: [service-orientated-architecture] Re: SOA R... Anne Thomas Manes
- RE: [service-orientated-architecture] Re: S... Harm Smit
- Re: [service-orientated-architecture] R... Jan Algermissen
- Re: [service-orientated-architecture] R... Jan Algermissen
- Re: [service-orientated-architectu... Steve Jones
- Re: [service-orientated-archit... Jan Algermissen
- Re: [service-orientated-archit... Gregg Wonderly
- Re: [service-orientated-archit... Jan Algermissen
- Re: [service-orientated-archit... Gregg Wonderly
