• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic