[infinispan-dev] Dynamic externalizer configuration - WAS Re: Cache startup

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] Dynamic externalizer configuration - WAS Re: Cache startup

Galder Zamarreno
Eduardo,

I understand your concerns but doing something like you say is anything but trivial cos you'd have to deal with potential race conditions between trying to deserialize a custom object and making sure the externalizer has been configured.

For example, imagine the case where Node A sets up the Externalizers slightly earlier than Node B, and Node A sends a replication message with the custom object. If Node B has not yet set the externalizer, it will fail.

So, I can only see something like this working if the configuration is something that's done in an atomic fashion across the cluster, which would complicate how configuration is handled.

I'll have a think over it in the next few days though to see if I can come up with something else.

It'll be interesting to hear what others have to say about this too.

Cheers,

On Feb 10, 2011, at 12:33 PM, Eduardo Martins wrote:

> That is a bummer, cause global configuration setup needs to be done
> before cache starts, so no chance of adding Externalizers with the
> Cache instance already created. IMHO it will also make everything more
> complicated with the usual model of getting a cache already
> pre-configurated from manager, like done currently in AS5 for JBC, and
> then applying more configuration. Well, will need to rework the whole
> startup model.
>
> The DCM getStatus() returns RUNNING after getting cache.
>
> -- Eduardo
> ..............................................
> http://emmartins.blogspot.com
> http://redhat.com/solutions/telco
>
>
>
> On Thu, Feb 10, 2011 at 9:33 AM, Galder Zamarreño <[hidden email]> wrote:
>> Yeah, that's expected cos you can't get a cache without starting it. We're likely to provide such functionality in the near future (https://issues.jboss.org/browse/ISPN-627)
>>
>> In the code that you showed, could you check one thing? If you get a DefaultCacheManager without starting it, after getting the cache, what's DCM returning to getStatus() method call?
>>
>> On Feb 9, 2011, at 4:45 PM, Eduardo Martins wrote:
>>
>>> cache = new DefaultCacheManager(globalConfiguration,
>>>                               configuration, false).getCache()
>>>
>>> The cache is returned already started, is this the expected behavior?
>>>
>>> -- Eduardo
>>> ..............................................
>>> http://emmartins.blogspot.com
>>> http://redhat.com/solutions/telco
>>
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>>
>>

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev