[infinispan-dev] [ISPN-116] Async cache store: aggregation of multiple changes on a single key
Galder Zamarreno
galder.zamarreno at redhat.com
Thu Jul 9 06:11:22 EDT 2009
On 07/07/2009 12:02 PM, Mircea Markus wrote:
> Galder Zamarreno wrote:
>> Hi,
>>
>> Re: https://jira.jboss.org/jira/browse/ISPN-116
>>
>> I can see two ways of providing such feature:
>>
>> 1. Rather than using a queue, using a data structure similar to the
>> one used in the data container so that when a newer value for a key
>> already present in the queue is present, the value can be swapped (map
>> like lookup required on the key so that O(1) is maintained) while
>> maintaining queue-like FIFO operations required to empty it.
> Is the FIFO order required? We apply the 'final state' when we do the
> flush of the structure, I don't think the order of the operation is
> relevant.
> If this is the case, our structure might be a Map, with null values for
> removed keys, as a convention.
Hmmmm, very good point. In my mind, I was thinking that even in async
mode, we should still apply the changes in the order they came but tbh,
the moment you do this asynchronously, you lose the confirmation that it
actually happens and hence, the order is probably irrelevant.
Once again, thanks very much Mircea for such useful feedback!!
Using just a map would simplify things greatly.
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
More information about the infinispan-dev
mailing list