Getting the coordinator's address
by Tristan Tarrant
Dear all,
as per Sanne's suggestion, I am trying out a MuxRpcDispatcher with a custom
JGroupsChannelLookup class to stream data from the members to the
coordinator. In order to get the coordinator's address I go through the
following hoops:
cache.getAdvancedCache().getRpcManager().getTransport().getCoordinator().getJGroupsAddress().
which requires obtaining a clustered cache first.
the EmbeddedCacheManager interface exposes several methods to access the
local address, the address of all members and whether the local address is
also coordinator, but there is no method to get the cluster's coordinator
address. Would it be a crime to add a getCoordinatorAddress() method to the
EmbededCacheManager ?
Tristan
14 years, 3 months
AtomicMap and mutable objects
by Emmanuel Bernard
Hey Manik and all,
We had a talk at Devoxx on AtomicMap and tx isolation but its back to fuzzyness to me. can you help me reclarify.
Here is the scenario.
In Tx1
Map map = (AtomicMap) cache.get( key1 );
Date updateDate = map.get("date");
updateDate.setTime( System.currentTimeMillis() );
#cp 1
map.put("date", updateDate);
End of Tx1
In Tx2
Map map = (AtomicMap) cache.get( key1 );
Date updateDate = map.get("date");
#cp2
display(updateDate);
End of Tx2
Provided Date is mutable and assuming Tx1 and Tx2 run in the same node. Could it be that Tx2 display the new value of updateDate before Tx1 is committed. Or are you guys copying on read mutable objects?
Emmanuel
14 years, 3 months
CacheStore Value Mapping
by Tristan Tarrant
Dear all,
after adding the key mapping functionality to the Cassandra cache store, I
was thinking that it would be nice to have a similar feature for mapping
values to Cassandra's columns and column families (I don't know if these
concepts are familiar to you, but they roughly translate to columns in a
relational database). This means that instead of putting a binary blob into
the store, the data would be mapped in a more natural format. This could
also come in useful for the JDBC store.
This would obviously be done as part of 5.x.
Ideas & suggestions ?
Tristan
14 years, 3 months
JAXB/XML part for ISPN-244
by Galder Zamarreño
Hi Vladimir,
I'm working on https://jira.jboss.org/browse/ISPN-244 and I'm trying to figure out how to modify GlobalConfiguration class in order to enable XML configuration for this to be something along these lines:
<serialization marshallerClass="org.infinispan.marshall.VersionAwareMarshaller" version="1.0">
<marshallables>
<marshallable id="9" typeClass="acme.SomePojo" externalizerClass="acme.SomePojoExternalizer" />
<marshallable id="10" typeClass="acme.OtherPojo" externalizerClass="acme.OtherPojoExternalizer" />
</marshallables>
</serialization>
I have an initial implementation of the JIRA in https://github.com/galderz/infinispan/tree/ispn244 and in there you can see what i've done so far, but basically, I've simply added some API to GC get the core of the JIRA working. Now I need to figure out how to transform it to allow XML like shown above, or any other alternative that you might be able to think. Looking around, I hadn't found an example of such XML configuration and how it'd map to our code, but looking again, I think what you did for loaders/loader in Cache configuration might be similar? WDYT?
Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
14 years, 3 months
Key Mappers and ISPN-809
by Tristan Tarrant
Dear all,
a user has requested that the Cassandra cache store implement something akin
to the key2stringmapper that the jdbc driver has. Manik has rightly
suggested that we could move the mapper classes from the jdbc cachestore to
a higher level (core ?). While I believe this is 5.0 material, I am planning
to duplicate the system for the Cassandra cachestore for 4.2.x, but I want
to maintain backwards compatibility for users who already have keys. One
thing that the DefaultTwoWayKey2StringMapper does to recognize keys of
different types is that it adds a numeric prefix at the beginning of each
key to determine the type. This is fine for everything else, but I would
like strings to be stored as-is. What do you think if the BOM (Unicode
FEFF), followed by a type identifier, is prefixed at the beginning of each
key when it is not a string ?
Tristan
14 years, 3 months
Tree API module wiki
by Galder Zamarreño
I've just finished writing http://community.jboss.org/docs/DOC-16081
Anything that should change? Anything extra that should be included?
Scott, I believe you've played quite a bit with the tree module, so it'd be great to hear your feedback as a user :). Maybe we should add a section to explain when it makes sense to use the tree module API, i.e. to build a JNDI repo?
Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
14 years, 3 months