RE: Choreography and REST

"Martin Chapman" <[email protected]>
Newsgroups gmane.comp.web.services.ws-arch
Message-ID <[email protected]>
Firstly lets not argue the usefulness of the factory pattern:-)

Secondly in your example, I could get a c_obj from a
trader/uddi/directory, without 
there being any explicit make_c. There is  no systematic way to know
whether a c_obj provider must provide the factory 
or whether that is a private act and the object can be
advertised/discovered seperatley; nor whether once I create it it can be

shared or not. Without some syntax that ties them together you really do
have to look at comments/documentation (heaven forbid).

Just my personal opinion but I think design by contract/path experession
type thingy is a pre-cursor to a
choreography/orchestration/collaboration solution.

Martin.

> -----Original Message-----
> From: Paul Prescod [mailto:[email protected]] 
> Sent: Tuesday, August 13, 2002 12:23 PM
> To: Martin Chapman; [email protected]
> Subject: Re: Choreography and REST
> 
> 
> Martin Chapman wrote:
> > 
> >...
> > 
> > Maybe I have a different definition of choreography, but CORBA (and 
> > COM and c++ and java and c#) does have this problem. Given  the 
> > following:
> > 
> > Interface example {
> >     void a (in x:string);
> >     short b (inout y:short);
> >     boolean c(out temp:long);
> > };
> > 
> > How can anything know, and hence statically check, the correct 
> > invocation order(s)?
> 
> Thank you for coming up with some demonstration code. 
> Consider the following decomposition which statically and 
> explicitly enforces a particular correct ordering of method calls:
> 
> Interface example {
>   b_obj make_b(in x: string):
> }
> 
> Interface b_obj {
>   c_obj make_c(inout y:short);
>   example back_to_example(in blah:int);
> }
> 
> Interface c_obj {
>   boolean doit(out temp:long);
> }
> 
> This decomposition isn't just good because it removes the 
> need for a choreography language. Indeed, this is a minor 
> benefit. Actually the decomposition has many more important 
> benefits. Most crucial, the consumer of the service has much 
> more flexibility about its own composition. Because b_obj and 
> c_obj are now first-class objects, I can pass those to any 
> other component anywhere on the Internet and have it work 
> with them. I don't have to pass a "state" as some kind of 
> flag. To use WS buzzwords, my relationship with that other 
> component can be more "loosely bound" because I have less to 
> tell him about what's going on in the conversation.
> 
> Some other c_obj producer could proceed like this:
> 
> Interface z_obj {
>   c_obj short_cut_to_c_obj();
> }
> 
> So the relationship between the object types and the 
> choreography is very flexible and other components brought 
> into the mix care only about the former and not at all about 
> the latter.
> 
> In other words, by decomposing I have better opportunities 
> for reuse of the c_obj abstraction which translates in 
> networked systems into higher interoperability and less "glue code".
> 
> > ... Aside from unparsable comments
> > and documentation (if you're lucky), there is no extra information. 
> > The fact that the corba community didn't address this 
> problem doesn't 
> > mean to say it doesn't exist.
> 
> The CORBA community doesn't have the problem because it is so 
> easy to design around and in fact it is common to "solve" it 
> merely as a side effect of good object design. If you feel 
> you have a concrete case where this model does not work 
> properly, I would be interested in seeing it.
> 
> > What you need to do is augment interface definitions with extra 
> > information. Design by contract is one example, but also 
> there is the 
> > excellent work done by ANSA in the early 90s called  Path 
> Expressions 
> > [1], which people are only just re-inventing  (or is that 
> > re-discovering:)
> 
> Design by contract and path expressions are different than 
> choreography. I would be much more enthusiastic about "design 
> by contract for web services" than choreography for web services.
> -- 
> "When I walk on the floor for the final execution, I'll wear a denim 
> suit. I'll walk in there like Willie Nelson, John Wayne, Will Smith 
> -- Men in Black -- James Brown. Maybe do a Michael Jackson 
> moonwalk." Congressman James Traficant.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.