You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by James M Snell <ja...@us.ibm.com> on 2002/10/15 22:32:19 UTC

Async in Axis

FYI

- James Snell
     IBM Emerging Technologies
     jasnell@us.ibm.com
     (559) 587-1233 (office)
     (700) 544-9035 (t/l)
     Programming Web Services With SOAP
         O'Reilly & Associates, ISBN 0596000952

     Have I not commanded you? Be strong and courageous. 
     Do not be terrified, do not be discouraged, for the Lord your 
     God will be with you whereever you go.    - Joshua 1:9
----- Forwarded by James M Snell/Fresno/IBM on 10/15/2002 01:31 PM -----

James M Snell/Fresno/IBM
10/15/2002 12:34 PM

To
chappell@sonicsoftware.com, jmeritt@sonicsoftware.com, 
gdaniels@macromedia.com
cc

bcc
John Feller/Raleigh/IBM@IBMUS
Subject



Ok, if you refresh from cvs, there is a zip file called 
AxisInternalMessageExchange.zip in xml-axis/proposals that contains the 
updated interfaces (as per our discussion on IRC today and the raw 
prototype implementation.  The impl is more a test to prove the concepts 
and is not currently integrated into Axis.  In the zip, you will find a 
class called org.apache.axis.ime.internal.test.TestProvider.  This class 
implements the basic behavior that the Axis Engine and Transports will 
need to provide.  It needs quite a bit of cleaning up, simplifying and 
tweaking, but you'll get the basic idea.

Significant things to point out:

1. The event model was changed as discussed on IRC
2. Message receive operations are now gated with MessageWorkers as 
discussed on IRC
3. The MessageWorkerGroup class needs a lot of work to simplify and 
automate the thread management.  The goal is to make threading details as 
transparent as possible

Enjoy and let the bashing begin :-)

(btw, regarding "prior art", the Queued channel model implemented in the 
prototype was inspired by David Lea's util.concurrent library .... 
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html 
)....

- James Snell
     IBM Emerging Technologies
     jasnell@us.ibm.com
     (559) 587-1233 (office)
     (700) 544-9035 (t/l)
     Programming Web Services With SOAP
         O'Reilly & Associates, ISBN 0596000952

     Have I not commanded you? Be strong and courageous. 
     Do not be terrified, do not be discouraged, for the Lord your 
     God will be with you whereever you go.    - Joshua 1:9

Re: Async in Axis

Posted by Davanum Srinivas <di...@yahoo.com>.
James,

FYI,
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/juddi/juddi-0.5.1/src/org/juddi/uuidgen/SimpleUUIDGen.java?annotate=1.5

Thanks,
dims

--- James M Snell <ja...@us.ibm.com> wrote:
> Comments below...
> 
> - James Snell
>      IBM Emerging Technologies
>      jasnell@us.ibm.com
>      (559) 587-1233 (office)
>      (700) 544-9035 (t/l)
>      Programming Web Services With SOAP
>          O'Reilly & Associates, ISBN 0596000952
> 
>      Have I not commanded you? Be strong and courageous. 
>      Do not be terrified, do not be discouraged, for the Lord your 
>      God will be with you whereever you go.    - Joshua 1:9
> 
> David Chappell <ch...@sonicsoftware.com> wrote on 10/15/2002 06:30:12 
> PM:
> 
> > Hi James,
> > I have spent a couple of hours looking at the code so far.  Overall I
> > think its a good design to build on.  I have some observations and
> > questions -
> 
> > - MessageExchangeImpl.java - This should go on a todo list.
> > MessageExchangeCorrelator should have a way of generating/obtaining
> > something unique for an ID.
> 
> Yup... working on that... trying to find a good open source UUID library 
> or other id generation code
> 
> > - MessageChannel.java - Should put() check for dupes?  Should dupes be
> > illegal?
> 
> Have thought about it... not sure what the answer is.  At first blush, I'd 
> recommend that we not worry about dupes if only to keep things relatively 
> simple.  We can always revisit later if folks come back and say they 
> really need it.
> 
> > -- MessageChannel.select(key) nulls out values, including .next.
> > KeyedQueue.select(key) won't find things anymore if something is
> > 'removed' from the head or the middle somewhere.  Either somebody needs
> > to fix up the previous guy's .next befor moving on, or the 'slot' could
> > be reused if the values are null'd and the .next is maintained.  The
> 
> Whoops... ok, will fix that.
> 
> > parameter-less versions of these seem OK since they always pull from the
> > head and KeyedQueue.select() always resets head to its own next.  Is
> > this the code that was inspired by the link you have listed below?  It
> > looks a lot like something that I spent some time with that may have
> > also been inspired by the same guy.
> 
> Yup.  Doug (not David as I said in my last note) Lea's util.concurrent 
> package has a thing called a SynchronousChannel which implements a 
> synchronous FIFO buffer.  I made some modifications on the basic idea that 
> 1) makes the buffer asynchronous (put's no longer wait for read's) and 2) 
> make each item keyed and randomly selectable (allows us to take things out 
> of order).
> 
> > - Another todo -- What do we do about responses that never come back?
> > We need a cleanup strategy.  Come to think of it, I think I was the one
> > who volunteered to maintain the todo list.
> 
> Yup.. still stewing on that.  I just added an ASYNC_TODOS.txt file to the 
> xml-axis/proposals directory.
> 
> > - TestProvider.java -- SendListener.onMessageExchangeContext().  I'm not
> > sure who's role is what, but its late here on the east coast.  Why does
> > it get the request message and put it in the response message?  Is he
> 
> For no reason other than for testing purposes.  The exact behavior of this 
> component will differ depending on the protocol(s) being used to 
> send/receive messages.
> 
> > the pivot?  It would be cool if we could schedule a call to walk through
> > some of this after other interested parties have had a chance to look at
> > it.  I'm on the road most of Thursday but tomorrow and Friday are good
> > for me.
> 
> Friday is good for me.  I can set up the call.  Anybody who's interested, 
> let me know!
> 
> > Great stuff.  Talk to you soon.
> > Dave
> 
> > James M Snell wrote:
> > >
> > > FYI
> > >
> > > - James Snell
> > >      IBM Emerging Technologies
> > >      jasnell@us.ibm.com
> > >      (559) 587-1233 (office)
> > >      (700) 544-9035 (t/l)
> > >      Programming Web Services With SOAP
> > >          O'Reilly & Associates, ISBN 0596000952
> > >
> > >      Have I not commanded you? Be strong and courageous.
> > >      Do not be terrified, do not be discouraged, for the Lord your
> > >      God will be with you whereever you go.    - Joshua 1:9
> > > ----- Forwarded by James M Snell/Fresno/IBM on 10/15/2002 01:31 PM 
> -----
> > >
> > > James M Snell/Fresno/IBM
> > > 10/15/2002 12:34 PM
> > >
> > > To
> > > chappell@sonicsoftware.com, jmeritt@sonicsoftware.com,
> > > gdaniels@macromedia.com
> > > cc
> > >
> > > bcc
> > > John Feller/Raleigh/IBM@IBMUS
> > > Subject
> > >
> > > Ok, if you refresh from cvs, there is a zip file called
> > > AxisInternalMessageExchange.zip in xml-axis/proposals that contains 
> the
> > > updated interfaces (as per our discussion on IRC today and the raw
> > > prototype implementation.  The impl is more a test to prove the 
> concepts
> > > and is not currently integrated into Axis.  In the zip, you will find 
> a
> > > class called org.apache.axis.ime.internal.test.TestProvider.  This 
> class
> > > implements the basic behavior that the Axis Engine and Transports will
> > > need to provide.  It needs quite a bit of cleaning up, simplifying and
> > > tweaking, but you'll get the basic idea.
> > >
> > > Significant things to point out:
> > >
> > > 1. The event model was changed as discussed on IRC
> > > 2. Message receive operations are now gated with MessageWorkers as
> > > discussed on IRC
> > > 3. The MessageWorkerGroup class needs a lot of work to simplify and
> > > automate the thread management.  The goal is to make threading details 
> as
> > > transparent as possible
> > >
> > > Enjoy and let the bashing begin :-)
> > >
> > > (btw, regarding "prior art", the Queued channel model implemented in 
> the
> > > prototype was inspired by David Lea's util.concurrent library ....
> > > http://gee.cs.oswego.
> > edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
> > > )....
> > >
> > > - James Snell
> > >      IBM Emerging Technologies
> > >      jasnell@us.ibm.com
> > >      (559) 587-1233 (office)
> > >      (700) 544-9035 (t/l)
> > >      Programming Web Services With SOAP
> > >          O'Reilly & Associates, ISBN 0596000952
> > >
> > >      Have I not commanded you? Be strong and courageous.
> > >      Do not be terrified, do not be discouraged, for the Lord your
> > >      God will be with you whereever you go.    - Joshua 1:9
> 
> > --
> > Sonic Software - Backbone of the Extended Enterprise
> > --
> > David Chappell <ch...@sonicsoftware.com> Office: (781)999-7099
> > Mobile: (617)510-6566
> > Vice President and Chief Technology Evangelist, Sonic Software
> > co-author,"Java Web Services", (O'Reilly 2002)
> > "The Java Message Service", (O'Reilly 2000)
> > "Professional ebXML Foundations", (Wrox 2001)
> > --
> > 
> > [attachment "chappell.vcf" deleted by James M Snell/Fresno/IBM] 


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

Re: Async in Axis

Posted by James M Snell <ja...@us.ibm.com>.
Comments below...

- James Snell
     IBM Emerging Technologies
     jasnell@us.ibm.com
     (559) 587-1233 (office)
     (700) 544-9035 (t/l)
     Programming Web Services With SOAP
         O'Reilly & Associates, ISBN 0596000952

     Have I not commanded you? Be strong and courageous. 
     Do not be terrified, do not be discouraged, for the Lord your 
     God will be with you whereever you go.    - Joshua 1:9

David Chappell <ch...@sonicsoftware.com> wrote on 10/15/2002 06:30:12 
PM:

> Hi James,
> I have spent a couple of hours looking at the code so far.  Overall I
> think its a good design to build on.  I have some observations and
> questions -

> - MessageExchangeImpl.java - This should go on a todo list.
> MessageExchangeCorrelator should have a way of generating/obtaining
> something unique for an ID.

Yup... working on that... trying to find a good open source UUID library 
or other id generation code

> - MessageChannel.java - Should put() check for dupes?  Should dupes be
> illegal?

Have thought about it... not sure what the answer is.  At first blush, I'd 
recommend that we not worry about dupes if only to keep things relatively 
simple.  We can always revisit later if folks come back and say they 
really need it.

> -- MessageChannel.select(key) nulls out values, including .next.
> KeyedQueue.select(key) won't find things anymore if something is
> 'removed' from the head or the middle somewhere.  Either somebody needs
> to fix up the previous guy's .next befor moving on, or the 'slot' could
> be reused if the values are null'd and the .next is maintained.  The

Whoops... ok, will fix that.

> parameter-less versions of these seem OK since they always pull from the
> head and KeyedQueue.select() always resets head to its own next.  Is
> this the code that was inspired by the link you have listed below?  It
> looks a lot like something that I spent some time with that may have
> also been inspired by the same guy.

Yup.  Doug (not David as I said in my last note) Lea's util.concurrent 
package has a thing called a SynchronousChannel which implements a 
synchronous FIFO buffer.  I made some modifications on the basic idea that 
1) makes the buffer asynchronous (put's no longer wait for read's) and 2) 
make each item keyed and randomly selectable (allows us to take things out 
of order).

> - Another todo -- What do we do about responses that never come back?
> We need a cleanup strategy.  Come to think of it, I think I was the one
> who volunteered to maintain the todo list.

Yup.. still stewing on that.  I just added an ASYNC_TODOS.txt file to the 
xml-axis/proposals directory.

> - TestProvider.java -- SendListener.onMessageExchangeContext().  I'm not
> sure who's role is what, but its late here on the east coast.  Why does
> it get the request message and put it in the response message?  Is he

For no reason other than for testing purposes.  The exact behavior of this 
component will differ depending on the protocol(s) being used to 
send/receive messages.

> the pivot?  It would be cool if we could schedule a call to walk through
> some of this after other interested parties have had a chance to look at
> it.  I'm on the road most of Thursday but tomorrow and Friday are good
> for me.

Friday is good for me.  I can set up the call.  Anybody who's interested, 
let me know!

> Great stuff.  Talk to you soon.
> Dave

> James M Snell wrote:
> >
> > FYI
> >
> > - James Snell
> >      IBM Emerging Technologies
> >      jasnell@us.ibm.com
> >      (559) 587-1233 (office)
> >      (700) 544-9035 (t/l)
> >      Programming Web Services With SOAP
> >          O'Reilly & Associates, ISBN 0596000952
> >
> >      Have I not commanded you? Be strong and courageous.
> >      Do not be terrified, do not be discouraged, for the Lord your
> >      God will be with you whereever you go.    - Joshua 1:9
> > ----- Forwarded by James M Snell/Fresno/IBM on 10/15/2002 01:31 PM 
-----
> >
> > James M Snell/Fresno/IBM
> > 10/15/2002 12:34 PM
> >
> > To
> > chappell@sonicsoftware.com, jmeritt@sonicsoftware.com,
> > gdaniels@macromedia.com
> > cc
> >
> > bcc
> > John Feller/Raleigh/IBM@IBMUS
> > Subject
> >
> > Ok, if you refresh from cvs, there is a zip file called
> > AxisInternalMessageExchange.zip in xml-axis/proposals that contains 
the
> > updated interfaces (as per our discussion on IRC today and the raw
> > prototype implementation.  The impl is more a test to prove the 
concepts
> > and is not currently integrated into Axis.  In the zip, you will find 
a
> > class called org.apache.axis.ime.internal.test.TestProvider.  This 
class
> > implements the basic behavior that the Axis Engine and Transports will
> > need to provide.  It needs quite a bit of cleaning up, simplifying and
> > tweaking, but you'll get the basic idea.
> >
> > Significant things to point out:
> >
> > 1. The event model was changed as discussed on IRC
> > 2. Message receive operations are now gated with MessageWorkers as
> > discussed on IRC
> > 3. The MessageWorkerGroup class needs a lot of work to simplify and
> > automate the thread management.  The goal is to make threading details 
as
> > transparent as possible
> >
> > Enjoy and let the bashing begin :-)
> >
> > (btw, regarding "prior art", the Queued channel model implemented in 
the
> > prototype was inspired by David Lea's util.concurrent library ....
> > http://gee.cs.oswego.
> edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
> > )....
> >
> > - James Snell
> >      IBM Emerging Technologies
> >      jasnell@us.ibm.com
> >      (559) 587-1233 (office)
> >      (700) 544-9035 (t/l)
> >      Programming Web Services With SOAP
> >          O'Reilly & Associates, ISBN 0596000952
> >
> >      Have I not commanded you? Be strong and courageous.
> >      Do not be terrified, do not be discouraged, for the Lord your
> >      God will be with you whereever you go.    - Joshua 1:9

> --
> Sonic Software - Backbone of the Extended Enterprise
> --
> David Chappell <ch...@sonicsoftware.com> Office: (781)999-7099
> Mobile: (617)510-6566
> Vice President and Chief Technology Evangelist, Sonic Software
> co-author,"Java Web Services", (O'Reilly 2002)
> "The Java Message Service", (O'Reilly 2000)
> "Professional ebXML Foundations", (Wrox 2001)
> --
> 
> [attachment "chappell.vcf" deleted by James M Snell/Fresno/IBM] 

Re: Async in Axis

Posted by David Chappell <ch...@sonicsoftware.com>.
Hi James,
I have spent a couple of hours looking at the code so far.  Overall I
think its a good design to build on.  I have some observations and
questions - 

- MessageExchangeImpl.java - This should go on a todo list. 
MessageExchangeCorrelator should have a way of generating/obtaining
something unique for an ID.

- MessageChannel.java - Should put() check for dupes?  Should dupes be
illegal?
-- MessageChannel.select(key) nulls out values, including .next.
KeyedQueue.select(key) won't find things anymore if something is
'removed' from the head or the middle somewhere.  Either somebody needs
to fix up the previous guy's .next befor moving on, or the 'slot' could
be reused if the values are null'd and the .next is maintained.  The
parameter-less versions of these seem OK since they always pull from the
head and KeyedQueue.select() always resets head to its own next.  Is
this the code that was inspired by the link you have listed below?  It
looks a lot like something that I spent some time with that may have
also been inspired by the same guy.  

- Another todo -- What do we do about responses that never come back? 
We need a cleanup strategy.  Come to think of it, I think I was the one
who volunteered to maintain the todo list.

- TestProvider.java -- SendListener.onMessageExchangeContext().  I'm not
sure who's role is what, but its late here on the east coast.  Why does
it get the request message and put it in the response message?  Is he
the pivot?  It would be cool if we could schedule a call to walk through
some of this after other interested parties have had a chance to look at
it.  I'm on the road most of Thursday but tomorrow and Friday are good
for me.

Great stuff.  Talk to you soon.
Dave

James M Snell wrote:
> 
> FYI
> 
> - James Snell
>      IBM Emerging Technologies
>      jasnell@us.ibm.com
>      (559) 587-1233 (office)
>      (700) 544-9035 (t/l)
>      Programming Web Services With SOAP
>          O'Reilly & Associates, ISBN 0596000952
> 
>      Have I not commanded you? Be strong and courageous.
>      Do not be terrified, do not be discouraged, for the Lord your
>      God will be with you whereever you go.    - Joshua 1:9
> ----- Forwarded by James M Snell/Fresno/IBM on 10/15/2002 01:31 PM -----
> 
> James M Snell/Fresno/IBM
> 10/15/2002 12:34 PM
> 
> To
> chappell@sonicsoftware.com, jmeritt@sonicsoftware.com,
> gdaniels@macromedia.com
> cc
> 
> bcc
> John Feller/Raleigh/IBM@IBMUS
> Subject
> 
> Ok, if you refresh from cvs, there is a zip file called
> AxisInternalMessageExchange.zip in xml-axis/proposals that contains the
> updated interfaces (as per our discussion on IRC today and the raw
> prototype implementation.  The impl is more a test to prove the concepts
> and is not currently integrated into Axis.  In the zip, you will find a
> class called org.apache.axis.ime.internal.test.TestProvider.  This class
> implements the basic behavior that the Axis Engine and Transports will
> need to provide.  It needs quite a bit of cleaning up, simplifying and
> tweaking, but you'll get the basic idea.
> 
> Significant things to point out:
> 
> 1. The event model was changed as discussed on IRC
> 2. Message receive operations are now gated with MessageWorkers as
> discussed on IRC
> 3. The MessageWorkerGroup class needs a lot of work to simplify and
> automate the thread management.  The goal is to make threading details as
> transparent as possible
> 
> Enjoy and let the bashing begin :-)
> 
> (btw, regarding "prior art", the Queued channel model implemented in the
> prototype was inspired by David Lea's util.concurrent library ....
> http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
> )....
> 
> - James Snell
>      IBM Emerging Technologies
>      jasnell@us.ibm.com
>      (559) 587-1233 (office)
>      (700) 544-9035 (t/l)
>      Programming Web Services With SOAP
>          O'Reilly & Associates, ISBN 0596000952
> 
>      Have I not commanded you? Be strong and courageous.
>      Do not be terrified, do not be discouraged, for the Lord your
>      God will be with you whereever you go.    - Joshua 1:9

-- 
Sonic Software - Backbone of the Extended Enterprise
--
David Chappell <ch...@sonicsoftware.com> Office: (781)999-7099
Mobile: (617)510-6566
Vice President and Chief Technology Evangelist, Sonic Software
co-author,"Java Web Services", (O'Reilly 2002)
"The Java Message Service", (O'Reilly 2000)
"Professional ebXML Foundations", (Wrox 2001)
--