You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by j....@gmail.com on 2004/11/12 11:29:36 UTC

Order of events question

We are trying to use the event system, to perform some replication
between some nodes (translated versions of a master file actually)
The EventListner receives the events in some sorted fashion (based on
type) as opposed to the order they occured. Whats the rationale behind
this?

/Johal

Re: Order of events question

Posted by David Nuescheler <da...@gmail.com>.
hmm...

> I agree with Johal that the most natural ofter would have been the one
> in which they occured.

well, unfortunately things are bit more complicated.
in jsr-170 the observation is to reflect WHAT was 
changed in a repository and not HOW that change
was achieved. additionally all the changes are 
applied in an atomic fashion through save() or
the commit of a transaction.

especially since also subtrees of a repository 
can be saved() and operations can be 
reverted for example by moving a node from 
to a new location and then moving it back, 
and obviously there are operations like a delete 
that cause possibly a large number of events. 
defining the order of events becomes quite 
complicated and we were not able to come 
up with an application that would need a natural 
order of events that are produced by an atomic 
commit.

because we were not able to come up with
that application, i was wondering what application
johal built, that requires the chronologic order of 
events inside an atomic commit especially
since the transient space does require a 
particular order of operations to achieve a 
certain final result.

regards,
david
----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97

Re: Order of events question

Posted by Oliver Zeigermann <ol...@gmail.com>.
I agree with Johal that the most natural ofter would have been the one
in which they occured.

Oliver


On Sun, 14 Nov 2004 19:44:54 +0100, David Nuescheler
<da...@gmail.com> wrote:
> > Thanks for the answer.
> > We have implemented the "listener" in the "application layer" instead.
> >
> > /Johal
> 
> just out of curiosity... what sort order would you have
> needed/expected/suggested?
> 
> regards,
> david
>

Re: Order of events question

Posted by David Nuescheler <da...@gmail.com>.
> Thanks for the answer.
> We have implemented the "listener" in the "application layer" instead.
> 
> /Johal

just out of curiosity... what sort order would you have
needed/expected/suggested?

regards,
david

Re: Order of events question

Posted by j....@gmail.com.
Thanks for the answer. 
We have implemented the "listener" in the "application layer" instead.

/Johal
 
On Fri, 12 Nov 2004 12:01:28 +0100, Marcel Reutegger
<ma...@gmx.net> wrote:
> j.alkjaer@gmail.com wrote:
> 
> 
> 
> > We are trying to use the event system, to perform some replication
> > between some nodes (translated versions of a master file actually)
> > The EventListner receives the events in some sorted fashion (based on
> > type) as opposed to the order they occured. Whats the rationale behind
> > this?
> 
> The sort order of events is not specified in the jcr specification. in
> jackrabbit the sequence of actions modifying the (transient) workspace
> is not recorded. at the end of a transaction we simply have a more or
> less unordered set of actions that were taken on the workspace. Which
> means the events generated from those actions are not ordered either (in
> respect to when they occured).
> 
> regards
>   marcel
>

Re: Order of events question

Posted by Marcel Reutegger <ma...@gmx.net>.
j.alkjaer@gmail.com wrote:

> We are trying to use the event system, to perform some replication
> between some nodes (translated versions of a master file actually)
> The EventListner receives the events in some sorted fashion (based on
> type) as opposed to the order they occured. Whats the rationale behind
> this?

The sort order of events is not specified in the jcr specification. in 
jackrabbit the sequence of actions modifying the (transient) workspace 
is not recorded. at the end of a transaction we simply have a more or 
less unordered set of actions that were taken on the workspace. Which 
means the events generated from those actions are not ordered either (in 
respect to when they occured).

regards
  marcel