[infinispan-dev] REST server paths and tree adapter

Manik Surtani manik at jboss.org
Mon Dec 21 05:57:51 EST 2009


On 21 Dec 2009, at 09:22, Michael Neale wrote:

> Quick Q: should I be using the tree cache "adapter" for the web/REST
> cache - given that keys often take the form of a /foo/bar style of
> path?

Is this for the REST API into Infinispan?  If so, the path structure passed in is purely conceptual to the user.  E.g., 

	http://server/infinispan/cacheName/mykey --> Key "mykey" in cache "cacheName".
	http://server/infinispan/cacheName/my/key --> Key "my/key" in cache "cacheName".

Is there any need for relationships in paths, e.g., to be able to determine that http://server/infinispan/cacheName/my/key is a child of http://server/infinispan/cacheName/my etc?

> What are pros/cons of using the tree cache adapter? (can you get
> listings of entries based on partial paths etc?)

The tree adapter will always be slower than the map API.  And, when writing, would be O(n) based on how deep the target node is (since parents need to be locked).  What do you mean by partial paths?  

Cheers
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org








More information about the infinispan-dev mailing list