You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Art Gramlich <ar...@gramlich-net.com> on 2005/02/21 05:50:32 UTC

[javaflow] Some thoughts on the Continuation class

I had a couple thoughts on this class that I'd like to throw out there.

First, I thought it might make some sense to make a interface for 
Continuation
to implement.  Something along the lines of IContinuation, so that we 
can
reference continuations in a different classloader without loading the 
continuation
class itself.

The other one is a little deeper and more involved.  After playing 
around for a while,
it looks like by making a deep copy of a continuation, it can be made 
to act like a full
multishot continuation.  I wonder if it would make sense to somehow 
integrate this.
What I was working on doesn't really require this, but I could see 
someone writing a
seaside-like framework wanting this.

I would be interested in discussing this and have a vague ideas on 
possible implementations.

Art Gramlich


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [javaflow] Some thoughts on the Continuation class

Posted by Art Gramlich <ar...@gramlich-net.com>.
On Feb 21, 2005, at 1:26 AM, Torsten Curdt wrote:

>> First, I thought it might make some sense to make a interface for
>> Continuation
>> to implement.  Something along the lines of IContinuation, so that we 
>> can
>> reference continuations in a different classloader without loading the
>> continuation
>> class itself.
>
> Hm... just wondering whether it you really need access to any
> methods from the Continuation interface from a different
> classloader. Could you come up with a possible usecase?

I was thinking more of enforcing the type in a class loaded by the 
parent
classloader instead of calling the methods.  Right now, I'm just using 
Object
in my testing.  Not a big deal to me either way though.  Just a thought.

>
>> The other one is a little deeper and more involved.  After playing
>> around for a while,
>> it looks like by making a deep copy of a continuation, it can be made 
>> to
>> act like a full
>> multishot continuation.  I wonder if it would make sense to somehow
>> integrate this.
>> What I was working on doesn't really require this, but I could see
>> someone writing a
>> seaside-like framework wanting this.
>
> IIUC what you mean then you want restart the flow
> at the same position twice or more times?!
>
> This is already possible. Have a look at the testcases.

Yup.  That's what I'm doing.  The thought crossed my mind that it might
be interesting to have that functionality more embedded in the library.
Again, not a big deal.

>
>> I would be interested in discussing this and have a vague ideas on
>> possible implementations.
>
> A cool extension would be to change the
> continuations (the Stack class) to use a
> differential approach.
>
> ...which would make them much smaller.


This would be very cool.  Again, I'm still pretty new to the code, but 
digging
around in my free time at home.  Thanks again for the hard work on all 
of this.


>
> cheers
> --
> Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [javaflow] Some thoughts on the Continuation class

Posted by Torsten Curdt <tc...@apache.org>.
> First, I thought it might make some sense to make a interface for
> Continuation
> to implement.  Something along the lines of IContinuation, so that we can
> reference continuations in a different classloader without loading the
> continuation
> class itself.

Hm... just wondering whether it you really need access to any
methods from the Continuation interface from a different
classloader. Could you come up with a possible usecase?

> The other one is a little deeper and more involved.  After playing
> around for a while,
> it looks like by making a deep copy of a continuation, it can be made to
> act like a full
> multishot continuation.  I wonder if it would make sense to somehow
> integrate this.
> What I was working on doesn't really require this, but I could see
> someone writing a
> seaside-like framework wanting this.

IIUC what you mean then you want restart the flow
at the same position twice or more times?!

This is already possible. Have a look at the testcases.

> I would be interested in discussing this and have a vague ideas on
> possible implementations.

A cool extension would be to change the
continuations (the Stack class) to use a
differential approach.

...which would make them much smaller.

cheers
--
Torsten