OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sca-assembly] Issue 94: Conversational services


You've mentioned shared context a few times now but that's not what we have today. What we have today is a form of magic that happens underneath the programmer, orchestrated by the middleware that is tightly bound to instance management on the provider side. Transactions are much more like a shared context model IMHO where there are explicit protocol flows (not app flows) to establish the context on all related entities in the system. Yes, there is magic in the shared context model also, but it is divorced from the programming model. This is the shared context model that I greatly prefer, but that which I know we don't have time to spec out because we'd have to solve the cross binding protocol message flow problems. All the proposals I've seen to date which include the runtime magic try to hack around a proper shared context model and end up exposing themselves in subtle ways all over the programming model. A proper shared context model would be much more workable (i.e. conceptually compatible) across disparate middlewares and SCA component types.

My second point is that I think we're losing sight of our primary objectives with SCA Java. SCA Java needs to be a simple PM. There are plenty of more complicated PMs in the world today that do all kinds of gear-head stuff like this. It's fine for them to do that and we have a way to integrate with then...it's called implementation type extensibility together with the recursive composition concept. For example, see SCA JEE, Spring, etc etc, there will be many more. SCA Java doesn't need to be all things to all people. It has no business trying to compete with other whiz bang ideas in the world. It's there to solve simple problems in limited situations.

more comments below

Dave Booz
STSM, BPM and SCA Architecture
Co-Chair OASIS SCA-Policy TC and SCA-J TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093 or 8-295-6093
e-mail:booz@us.ibm.com

Inactive hide details for Jim Marino ---12/22/2008 01:13:12 PM---On Dec 22, 2008, at 1:47 AM, Mike Edwards wrote: >Jim Marino ---12/22/2008 01:13:12 PM---On Dec 22, 2008, at 1:47 AM, Mike Edwards wrote: >


From:

Jim Marino <jim.marino@gmail.com>

To:

Mike Edwards <mike_edwards@uk.ibm.com>

Cc:

"'OASIS Assembly'" <sca-assembly@lists.oasis-open.org>

Date:

12/22/2008 01:13 PM

Subject:

Re: [sca-assembly] Issue 94: Conversational services






On Dec 22, 2008, at 1:47 AM, Mike Edwards wrote:
I would say conversations are much more restrictive then this. They are a specialization of stateful interactions which involve shared context between a client and a provider. For example, composite-scoped component implementations in Java are stateful but they aren't conversational. I think this is an important distinction as conversations were never meant to boil the "stateful applications" ocean and are instead meant to cater to specific, but common, use cases in application development.

This is not any more vague than transaction semantics such as those found in Spring, JEE and JPA. Most developers are fine with those, particularly JPA. Another slightly different example would be various Java web frameworks (and possibly frameworks in other languages) that implicitly create stateful objects such as shopping carts. In other words, there is precedent for this behavior that developers are aware of.

<dab> It is more vague than transactions. Transaction semantics are generally used at an interface level (i.e. all methods in the interface use the same transaction semantics), but this conversational stuff we have now is primarily a method specific idea...start, continue, end. There is a huge chasm between what we have today and transactions (or a shared context model). I still don't and never will buy the shopping cart use case for a SOA service. The shopping cart concept is a tight coupling idea. Before REST, that's what you needed. </dab>

A good idea would be to reinstate @beginsConversation, which caters to this case.
This can be handled through existing mechanisms although in the interest of simplification, I would be willing to eliminate this capability. Handling multiple conversations can get very complex, particularly around handling concurrency properly. Is there a use case you have in mind that you think will be very common? I believe there are ways to address the need for multiple ongoing conversations using existing mechanisms but it would be helpful to work from a concrete case. These mechanisms may involve more work for developers, but that may be acceptable given the complexity involved.

There is no reason why the client needs to create the id. It simply needs to provide one during invocations. The id is created by the domain out-of-band or piggy-backed on either the return of a synchronous operation or callback. It is important to note this makes clustered routing and failover much easier to implement and manage. In posts to the Java list a while back I drew up sequence diagrams of how id generation can be done which I could dig up and reproduce here if people are interested.

<dab> In a shared context model, the key to the shared context is generated by a context coordinator, not the client, not the provider, but a protocol level entity. Then each party that wishes to be a part of the context registers his interest with the coordinator. The coordinator then owns the lifecycle of the key. Perhaps this is what you mean by the Domain, I can't tell for sure. All parties registered in the context get notified when the context lifecycle changes. The context key is passed around in anyway that the app or middleware wants to do it. I don't see any of this in your proposals which why I'm confused about how this can be a shared context model. </dab>


It may also be worth noting that most conversational services I have seen don't return the ID as part of the application signature. For example, shopping carts generally don't have create methods or methods that pass cart ids as parameters or return values.
<dab> That's right. That's what I am calling magic. </dab>


IMO that would be a poorly designed service. If the service provider ends the conversation, the client should be made aware of it either implicitly as part of the application semantics or explicitly through notification (e.g. a return value or callback).

<dab> This kind of lifecycle change would be noticed by a shared context coordinator and sent to all interested parties. Piggybacking return flows or callbacks is more magic. Service providers need to own their own lifecycle and therefore need to be able to be independent from any consumers who use them and any providers they use. </dab>

The @ConversationalAttributes can be used to explicitly declare timeouts. One issue I have seen come up in practice is people forgetting to set conversation timeouts. This could be fixed by allowing vendors to implement default timeout values in the same way transactions are handled.
<dab> ok, we agree on something </dab>

We have had several large teams of engineers building applications for about a year-and-a-half using conversations extensively. We have found they have simplified handling some very complex use cases (e.g. large document processing) and are a natural fit for integrating SCA with key technologies such as JPA. Although the engineers working on these projects do not participate in the OASIS TCs, they have been some of the most vocal advocates of the importance of retaining the current conversational model. Some have said they would be willing to share their experience with the appropriate TCs.

It may also be worth pointing out that the state-of-the-art in Java and elsewhere is focusing on adding similar conversational semantics. For example, Seam, .NET, and the JAX-WS RI all support analogous conversational features.

<dab> That old addage about following your friends off the bridge comes to mind. I don't see any of the technologies you mention playing in the SOA game. They are lower level implementation technologies, and they are good in that space. That's not where SCA should be. </dab>


There is definitely room for improvement in the current model. However, based on my and other's experience implementing applications with it, I don't believe it is broken. If there is a better approach, I am also more than willing to listen and work on an alternative. I have proposed some changes to the existing model to the Java TC that attempt to address issues brought up by various people. These changes also aim to greatly simplify callbacks. Parts of the proposal have import to the Assembly TC but I wanted to start with the Java TC since most of the changes impact the Java programming model. In the interests of moving discussions forward would it be useful to:

1. Have me write up a short proposal for the changes relevant to the Assembly TC.
2. Ask some of the engineers that have used the existing model extensively if they would be interested in sharing their experiences with the TC. I can help with this.
3. Have someone volunteer to draft specific application use cases that highlight deficiencies in the current model. We could use these to decide if the model needs to be changed or the use cases could be accommodated by other mechanisms.
4. Have someone volunteer to draft a proposal for an alternative that preserves the important functionality provided by conversations. At various times, activity sets have been proposed as a replacement. This is interesting, however, one of my concerns is that it will either wind up being too complicated (e.g. like the manifestation in CORBA) or not much different than the existing model.

IMO, it will be very counterproductive for SCA if we simply remove the existing model which people are using to build applications today without first looking at why it is deficient in practice or understanding an alternative.

<dab> I have no doubt what-so-ever that there are developers who find what you've built to be useful. We also have a large base of developers that has never found a need for it while implementing services for banks, insurance companies, brokerages etc. What they used was something like the shared context model I alluded to above, and it's quite powerful. Comparing developer bases and customer experience is not going to get us anywhere on the technical issues. I see this breaking down in four ways, either we:
1) want some "magic" and we want to do it right - shared context model like transactions, OR we
2) want a purely application centric correlation capability, OR we
3) try to fix up what we have today, which is a hybrid of 1 and 2 and which is where I see your proposals fitting in, OR we
4) standardize nothing this time around and try again in the next version.

Until we get some kind of agreement on one of those 4 very basic directions, we'll just be spinning our wheels.
</dab>


Jim





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]