-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Sun Aug 16, 2015 5:20 am 
Beginner
Beginner

Joined: Sun Aug 16, 2015 3:21 am
Posts: 27
Hi,

Before I start, I would like to thanks all who has answered a lot of questions on this forum, and that helped me a lot to use Hibernate Search.

I have got Hibernate Search (3.4.2) configured with Infinispan (5.1.6.FINAL), JGroups (3.0.11), Infinispan Lucene Directory (5.1.6.FINAL).

I am using JDBC Cache store to store all indexes all the time in database.

My Question:
1. What should be the value of ignoreModifications flag for slave nodes. Does it matter on slave node? I am using cache loader for slave as well to load indexes state from database. But definitely don't want slave to write into indexes.

I used bit higher version of Inifinispan and JGroups because there were some issues I faced around clustering (especially JGroups discovery).

I will appreciate the quick response. Many many thanks.


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Sun Aug 16, 2015 10:47 am 
Beginner
Beginner

Joined: Sun Aug 16, 2015 3:21 am
Posts: 27
Just to add one more thing... I need to know if I say JDBC Cache Store is "shared" then when this sequence of events

1. Slave updated entity and message sent to Master via JMS backend
2. Master updates the cache and the cache store...
3. Cache is synchronised with Slave nodes.
4. At this point will slave tries to update in DB as well?


I am waiting people to jump in an answer please (especially Hibernate Team). Many many thanks.


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Wed Aug 26, 2015 8:09 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
may I suggest you do a significant version upgrade? Both the Hibernate and Infinispan versions are very old, especially if you want to use this feature as it was highly experimental back then and I would not recommend to store the indexed clustered on that version, we later fixed many bugs and improved performance very significantly.

About ignoreModifications: you should not enable that option: a slave node will never write to the index, but as part of the Infinispan cluster it might be in charge of pushing updates to the database on behalf of other nodes.

About a shared CacheStore: it's related to the previous question. Essentially Infinispan works like this: for each entry in the cache, a different node might be responsible as "primary owner" of the entry. This responsibility role is distributed using the hash function across each node, so any node running Infinispan might need to write toe the database, but each entry will be written by one node only (unless there's a node failure during a write, and another node will take over and retry).

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Thu Aug 27, 2015 5:46 am 
Beginner
Beginner

Joined: Sun Aug 16, 2015 3:21 am
Posts: 27
Thanks a lot. I saw your name on most of the replies and was hoping you would jump in to clarify things for me. Thanks Again.

Re: Upgrade
The reason why I am using these versions, is because we are using Hibernate 3. I am looking to upgrade to the latest version of Hibernate Search possibly 5.3.0 but in next phase.

ignoreModifications and shared cache store
Sorry I am still confused here.

So you are saying that the value for slave nodes should always be true? OR simply don't have that attribute at all? And for Master node the value should be true all the time?


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Thu Aug 27, 2015 5:48 am 
Beginner
Beginner

Joined: Sun Aug 16, 2015 3:21 am
Posts: 27
One more little thing:

Should we got for Hibernate Search 4.4.6 (Means not exactly to 5.X) or should go for what is available as LATEST?

Just asking in terms of stability vs features. At the moment whatever we have got in terms of features is okay, but as you mentioned fixes of issues and improvements added later on... Will 4.4.6 be good enough?

Many Thanks Again.


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Thu Aug 27, 2015 6:58 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Regarding versions of Infinispan:
the project evolves very fast, and the team will always maintain only the last two major versions (approximately). So for example now they are working to create Infinispan 8, that means that all new features and improvements get merged in the 8 branch, and all bugs which get fixed in these months are merged in 8 and backported to 7. So you occasionally will see a new 7.2.x maintenance release, but bugfixes won't be ported to Infinispan 6 or 5, so unless you already have a system using the older version and it's running fine, avoid the older versions.
Occasionally someone needs a fix on an older version and the Infinispan team might be helpful, but you have to help out and pursue it, or in worst case backport and build your own version. At least unlike proprietary solutions you have options ;)

So in the Infinispan case you probably want to use version 7.2.x today, and I would consider it stable as it contains all known fixes. Older versions might work fine too, but they might be affected by a known issue and not have been patched, so "older" doesn't mean "more reliable".

Regarding versions of Hibernate:
the pattern is similar: older doesn't mean more stable. Of course the latest version might have some issues which evaded our tests, but generally speaking you don't want to use a too old version, and we only release a version as .Final when we all agree that it's ready.
We also don't maintain such old versions, especially if we think nobody is still using them. We monitor for example download statistics (and forums), and Hibernate Search 3 (and Hibernate ORM 3) are no longer worth our time to backport fixes to; at this very moment I'm considering stopping maintenance on Hibernate Search 4.x too.

So I'd recommend you use one of the 5.x versions of Hibernate Search. We generally highlight the "recommended" branches here: http://hibernate.org/search/downloads/

ignoreModifications
In summary: don't enable such options, don't mention the attribute at all in your configuration files. Generally speaking the defaults are safe, and some options are dangerous or reserved for very specific use cases.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Tue Sep 01, 2015 7:10 am 
Beginner
Beginner

Joined: Sun Aug 16, 2015 3:21 am
Posts: 27
Thanks a lot again.

I was looking at Cassandra as Cache Store behind Infinispan.

If we see Lucene as document based and NoSQL also is document based storage... Is it better to use Cassandra cache store behind Infinispan? Will it work better than FileSystem or RDBMS cache store?

Thanks in advance for replies...


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Wed Sep 09, 2015 7:47 am 
Beginner
Beginner

Joined: Sun Aug 16, 2015 3:21 am
Posts: 27
Hi,

Sorry to bother you again...

I can see many cache store implementations are available. I am just looking for is there any benefit to go to NoSQL from JDBC Cache store???

I van see MongoDB and Cassandra both cache stores are available. By the look of it they give impression to work faster... is it right?


Top
 Profile  
 
 Post subject: Re: Hibernate Search Infinispan - Slave - ignoreModifications?
PostPosted: Thu Sep 10, 2015 7:30 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Yes it's likely that MongoDB and Cassandra could be faster than the JDBC one, but they are also harder to setup and maintain so you should see if the difference is worth it.

Infinispan being purely in-memory will be orders of magnitude faster than any of these anyway, so if you enable and async store it might not matter what performance the CacheStore you're using provides as long as it's sufficient to not get behind too much on the enqueued work.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.