• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Hibernate Search In Action- JMS as index maintainer?

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I have a MOM based architecture, by using JMS to configure Queues to accept index-updation commands, store them in order or receival and process them to update the Index data Structure?

Is there a chance of the index getting corrupted due to multiple writes and how to aviod and maintain the coherency?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Can I have a MOM based architecture, by using JMS to configure Queues to accept index-updation commands, store them in order or receival and process them to update the Index data Structure?


Yes. See this.
 
author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using a MOM though JMS to do what I call asynchonous indexing is actually our recommended approach to cluster full-text searches with Hibernate Search
Chapter 10 covers this topic and demonstrates how to set that up in Java EE (JBoss AS 5 is used as an example).

Here is how it works, there are slave nodes and one master node.
All slaves contain your application and can execute full text queries based on a loca version of the Lucene index (hence fast).
When objects are changed, the changes are sent to the JMS queue instead of being applied to the Lcueen index.
The master node does listen to the JMS queue (it's an MDB usually) and apply the changes to the master index.
On a regular basis (configurable), slaves copy the new master index to get the updated version of the index. The copy is incremental so after the first time, the copy is quite minimal.
 
Dinesh Sundrani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Awesomeee! Thanks Paul and Emmanuel!

That's exactly what I wanted to know a way to avoid burdening the master index copy each and every time the updation is made, Rather work on the local copies, if any upadtes - send them to the MasterAwaited Queue and let the master do the work of sync when it has time to do so.

This very much addresses my concern (posted int he other thread) about having a ultra fast search engine rather than a very precisive one.
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic