--- In [email protected], "jeffjvroom" <[EMAIL PROTECTED]> wrote:
> > But the assembler doesn't know what fills are active, either.
> > Or am I missing something? The assembler can keep track of a
> > client's initial use of a fill (by saving the fillParams argument
> > to the assembler's fill method), but can the assembler get
> > notification when the fill is no longer being used (e.g., when
> > the client goes away)?
> 
> Yes, this is the case.  The auto sync mechanism is what keeps track 
> of which fills clients are looking at specifically.  You would have 
> to duplicate this logic and it is not trivial.  To solve this 
> generally is a bit tricky - you need to watch when fills are made, 
> associate them with a session and remove that when the session 
> expires.

It's a little worse than that, because you could have multiple
sessions using the same fill, right? So you would need to keep
track of which sessions reference a fill and only remove the fill
when the last session had closed.

I imagine that clustering only adds another set of problems on
top of this too. Is there an example of using manual sync in
a clustered environment somewhere?

> > In my application, the fills have a sort value, meaning
> > that the new item could be in different positions in
> > different fills anyway, so what I think the client should
> > do is to just start the fill over again when an item is
> > created. How would the assembler notify the client that
> > it should do that? (That is, how do I get something
> > similar to a refreshFill method returning EXECUTE_FILL
> > in the auto-sync case?)
> 
> Again, we just don't have a great way to "refresh" an entire
> sequence when auto sync is false.  It sounds like you really
> need the auto-sync=true with the "paged fill" support. 

Desperately :-) What I'm thinking of doing is have the new item
added at position 0, and have the client check, when an item is
inserted at position 0, if the item is "less than or equal to"
(according to the sort being used) the item in position 1. If
it's not, the client would just call the fill again to get the
new item in its proper position. Does that make sense?

/jeff

Reply via email to