Hi Sanne,<br><br>I think Lucene dir works ok. I improved it following suggestions and fixed bugs that came up.<br>Now I&#39;m doing some performance tests, and would like to compare it with other Directories.<br>To do it, I&#39;ve created web app, that inserts and queries data (one insert and one query per request).<br>
With JMeter I&#39;m simulating dozens of request inserting and quering data simultaneously.<br>I don&#39;t have experience with performance test. if you have some suggestions how to better do it plese send me.<br><br>I hope on Monday I will send patch.<br>
<br>Cheers,<br>Lukasz<br><br><br><div class="gmail_quote">2009/9/12 Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne.grinovero@gmail.com">sanne.grinovero@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Łukasz,<br>
what are the news about the Lucene Directory?<br>
I&#39;m very eager to test it, and have some time to help you if needed.<br>
<br>
Is there an updated patch to see?<br>
<br>
How are you testing it? Maybe I could help on that?<br>
<br>
Also we&#39;re going to need some &quot;glue&quot; to integrate the first part of your work<br>
(the jgroups backend) with the second part (the directory), as the jgroups<br>
backend will need to choose a single node to be used for indexwrites; if this<br>
node is removed from the cluster a new one should be elected.<br>
Manik had commented about this:<br>
&quot;One way to do this is to use the JGroups coordinator as the master...&quot;<br>
but since then the discussion on this was discontinued.<br>
<br>
Sanne<br>
<br>
<br>
2009/8/26 Łukasz Moreń &lt;<a href="mailto:lukasz.moren@gmail.com">lukasz.moren@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi, thanks for comments ant tips. I&#39;m improving it.<br>
&gt; Yes, I was checking with profiler tool and hashcode - even not so heavy -<br>
&gt; was called often summary took some time.<br>
&gt; There is one test where multiple threads can read or write from/to different<br>
&gt; cache instances. However I think would be good to do some real test e.g.<br>
&gt; with JMeter on sample app.<br>
&gt;<br>
&gt;<br>
&gt; 2009/8/26 Manik Surtani &lt;<a href="mailto:manik@jboss.org">manik@jboss.org</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi there - all looks good.  Some comments:<br>
&gt;&gt;<br>
&gt;&gt; Summary documentation - is this going to be published on a wiki page or<br>
&gt;&gt; something somewhere?  Especially the Infinispan bit?  I think people will<br>
&gt;&gt; find this info very useful...<br>
&gt;&gt; CacheKey - if this class is what everything is going to be used in the<br>
&gt;&gt; cache, for performance you should cache the hashcode.  Calculate it once and<br>
&gt;&gt; then cache it as an instance variable.  If this class is immutable it can be<br>
&gt;&gt; done on construction, even.  Infinispan uses hashcode() a lot.  :-)  But<br>
&gt;&gt; then again, depending on how many entries live in the cache, the overhead of<br>
&gt;&gt; an extra int for every entry may be heavy ...<br>
&gt;&gt; LockCacheKey - is probably more performant if this is implemented as a<br>
&gt;&gt; boolean flag on CacheKey.  Then you won&#39;t need to look at the class type<br>
&gt;&gt; when working out hashcodes<br>
&gt;&gt; Have you written any stress or performance tests?<br>
&gt;&gt;<br>
&gt;&gt; Cheers<br>
&gt;&gt; Manik<br>
&gt;&gt; On 23 Aug 2009, at 22:53, Łukasz Moreń wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt; Yes, I can adjust the patch next days. I&#39;ve just noticed that I send<br>
&gt;&gt; summary in not friendly format :), better one is now attached.<br>
&gt;&gt; There is explanation for yours questions below.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2009/8/23 Emmanuel Bernard &lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hey Lukasz,<br>
&gt;&gt;&gt; Your patch looks quite good and pass tests on my side.<br>
&gt;&gt;&gt; I encourage others to check out the patch before we apply it (ideally<br>
&gt;&gt;&gt; another person form HSearch and one person from infinispan.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Lukasz, I have a few questions/remarks though before applying it. Can you<br>
&gt;&gt;&gt; answer / adjust the patch?<br>
&gt;&gt;&gt; IndexWriterSetting<br>
&gt;&gt;&gt; Why move to return Object in parsing from the initial int?<br>
&gt;&gt;<br>
&gt;&gt; IndexWriterSetting has to set up MergeScheduler in IndexWriter. Before,<br>
&gt;&gt; parsing was responsible for number conversion from String to int. Now I have<br>
&gt;&gt; to parse class name, and build/return MergeScheduler from it.<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Move DPHelper#createInfinispanCacheManager to IDP<br>
&gt;&gt;&gt; this is not something that can be shared as it creates a hard dependency<br>
&gt;&gt;&gt; on infinispan otherwise.<br>
&gt;&gt;&gt; in createInfinispanCacheManager<br>
&gt;&gt;&gt; Don&#39;t log in error the fact that xml is not used if a default config is<br>
&gt;&gt;&gt; used. Just log in trace at best.<br>
&gt;&gt;&gt; Rename InfinispanCacheManagerConfigurationImpl to<br>
&gt;&gt;&gt; DefaultInfinispanCacheManagerConfiguration or even better with a name<br>
&gt;&gt;&gt; describing nicely the behavior of the infinispan config.<br>
&gt;&gt;&gt; in InfinispanIndexOutput, is it possible to get writeBytes bigger than<br>
&gt;&gt;&gt; buffer size? If yes, does newCheck creates the appropriate numbers of<br>
&gt;&gt;&gt; chunks?<br>
&gt;&gt;<br>
&gt;&gt; Yes it is possible. Writing process is divided into stages, during every<br>
&gt;&gt; stage can be written max: buffer_size bytes. At the end of the stage its<br>
&gt;&gt; checked if necessary is new chunk, if so new chunk is created.<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; InfinispanDirectoryProvider<br>
&gt;&gt;&gt; put the configuration proeprties available in the<br>
&gt;&gt;&gt; InfinispanDirectoryProvider javadoc.<br>
&gt;&gt;&gt; I think the default cache name should be &quot;Hibernate Search&quot; instead of<br>
&gt;&gt;&gt; &quot;HSInfinispanCache&quot;. We know it&#39;s in infinispan :)<br>
&gt;&gt;&gt; what&#39;s the try catch opening and closing an IW about? It looks weird.<br>
&gt;&gt;<br>
&gt;&gt; IW is opened with create=true parameter, first index have to be<br>
&gt;&gt; initialized/created. Always next IW is opened with create=false parameter,<br>
&gt;&gt; then data is appended to exisitng index. Similar things are done in other<br>
&gt;&gt; DP&#39;s.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; in stop()<br>
&gt;&gt;&gt; you don&#39;t close the CacheManager? How is that?<br>
&gt;&gt;<br>
&gt;&gt; Yes. Should be closed.<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; InfinispanCacheManagerConfigurationImpl<br>
&gt;&gt;&gt; What does &quot;Infinispan-Cluster&quot; correspond to? Why this name? Shouldn&#39;t it<br>
&gt;&gt;&gt; be &quot;Hibernate Search cluster&quot;?<br>
&gt;&gt;&gt; Is it safe to override the GlobalConfiguration? What if JBoss AS use<br>
&gt;&gt;&gt; infinispan to run?<br>
&gt;&gt;<br>
&gt;&gt; This name is used to distinguish cluster used by HSearch - All nodes with<br>
&gt;&gt; the same name form a group. Yes, rather &quot;Hibernate Search cluster&quot; is better<br>
&gt;&gt; name. It is safe to modify GlobalConfiguration, there can be set up<br>
&gt;&gt; configuration for CacheManager like communication way (JGroups or something<br>
&gt;&gt; else), stack configuration for JGroups, etc.; where Configuration is used to<br>
&gt;&gt; configure specific cache. I think just the infinispan cluster name on JBoss<br>
&gt;&gt; AS have to be different from HSearch, then they will be independent.<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Why the use of DummyTransactionManagerLookup. Doesn&#39;t Infinispan guess<br>
&gt;&gt;&gt; the right TM depending on the environment? e in JBoss As use the JBoss one<br>
&gt;&gt;&gt; etc?  I think GenericTransactionManagerLookup does that.<br>
&gt;&gt;<br>
&gt;&gt; Yes right, I was testing it with DummyTM and forgot to change it later.<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; InfinispanCacheManagerConfiguration<br>
&gt;&gt;&gt; some javadoc on the methods would be useful. I don&#39;t know what do<br>
&gt;&gt;&gt; implement here.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Is there a better name for Metadata? Like FileMetadata maybe?<br>
&gt;&gt;<br>
&gt;&gt; Better FileMetadata or maybe FileHeader.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Where is ispn-cache-default-conf.xml used? For tests only? If not: is it<br>
&gt;&gt;&gt; possible to use a programmatic version instead and what is &quot;It&#39;s a movie<br>
&gt;&gt;&gt; cache&quot;?<br>
&gt;&gt;<br>
&gt;&gt; Yes in tests only so far. However it can be used as a provided default<br>
&gt;&gt; configuration. I will send maybe question to infinispan group about best<br>
&gt;&gt; configuration parameters. &quot;It&#39;s a movie cache&quot; it&#39;s the name for cache<br>
&gt;&gt; configured in ispn-cache-default-conf.xml. In tests in this cache are stored<br>
&gt;&gt; indexes for entity Movie. Indexes for all other entities are stored in<br>
&gt;&gt; default HSInfinispanCache.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Emmanuel<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Begin forwarded message:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; From: Łukasz Moreń &lt;<a href="mailto:lukasz.moren@gmail.com">lukasz.moren@gmail.com</a>&gt;<br>
&gt;&gt;&gt; Date: 21 août 2009 02:11:03 HAEC<br>
&gt;&gt;&gt; To: Emmanuel Bernard &lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;<br>
&gt;&gt;&gt; Subject: GSoC patch with Infinispan Directory Provider<br>
&gt;&gt;&gt; I&#39;m sending patch and piece of documentation - not much but necessary<br>
&gt;&gt;&gt; information are included.<br>
&gt;&gt;&gt; There are some todos but I didn&#39;t manage to finish it yet.<br>
&gt;&gt;&gt; I changed maven jgroups dependency to 2.8.beta2, before version was<br>
&gt;&gt;&gt; clashed with used by infinispan.<br>
&gt;&gt;&gt; In pom file there was dependency on hibernate common annotations<br>
&gt;&gt;&gt; 3.2.shapshot. It should&#39;t be 3.5?<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt; Lukasz<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &lt;GSoC2009_summary.pdf&gt;_______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Manik Surtani<br>
&gt;&gt; <a href="mailto:manik@jboss.org">manik@jboss.org</a><br>
&gt;&gt; Lead, Infinispan<br>
&gt;&gt; Lead, JBoss Cache<br>
&gt;&gt; <a href="http://www.infinispan.org" target="_blank">http://www.infinispan.org</a><br>
&gt;&gt; <a href="http://www.jbosscache.org" target="_blank">http://www.jbosscache.org</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
</div></div></blockquote></div><br>