On Wednesday 26 June 2002, Martin Chapman
<martin.chapman@oracle.com> wrote:
>
>Couple of points. In other contexts this is the static vs dynamic typing
>debate. Both have merits and have their place.
>
[snip]
>doesn't care. But when bar recieves the get/post it has to decode the
>contents and "route" the request to the implementation of baz, goo, or
>gurgle. If one of these doesn't exist the request fails. All that is
>happening here is that we have pushed the brittleness up one level. You
>*cannot* avoid the problem that there may be a request for a server
>function/feature/method that does not exist.
Nor can we fully avoid the problem that you're not really sure what
the `gurgle' function does. I suspect, however, that sooner or later
we'll end up with a meta-language describing the important features
of the semantics of certain requests[1] - in fact, WSDL has it now, in
the sense that you can document whether you were expecting a reply
or not.
So, rather than just `this service has baz, goo and gurgle', you'll
have a bit more information - `this service is an instance of the
pattern ModifyableAttribute, and has baz (instance of ReadAttribute),
goo (instance of WriteAttribute), and gurgle (instance of
HasSideEffectsOnAttribute). The name of the attribute for `baz' is
encoded in the parameters `herring' and `wombat'.'.
Once you have that much information, you can start to use the
interface (e.g. you can present the user with the ability to control
it) without really knowing much about what you're controlling[2].
WSDL will somewhat already do this for you, given a suitable set of
local naming conventions.
The interesting question now becomes just how you specify these
prototypes. The theoreticians would probably use communicating
automata and type theory, but I suspect the approach that's likely
to be taken is fairly literal and class-based.
What it would be nice to see is a hybrid of the two: a class-based
hybrid somewhat similar to Many-Sorted Polymorphic Typing
(though I think first-class classes in the type system might be
a better way of approaching object orientation) would be nice[3].
Of course, no-one has ever (to my knowledge) tried anything of
this sort on a wide scale. It works fine for generating
trivial user interfaces to automatically discovered services, but
only time will tell how well it scales.
Richard.
[1] <fx: flashback> In much the same way that ML was to be used to
describe the semantics of CPL.
[2] Of course, at least in user-facing terms, this is going to get
very fuzzy very quickly.
[3] Though note that most type systems that allow quantification and
implicit typing are going to lead to potential DoS attacks.