Hotware / Hibernate-Search-GenericJPA

Hibernate-Search with the JPA provider you want
http://hotware.github.io/Hibernate-Search-GenericJPA/
GNU Lesser General Public License v2.1
5 stars 3 forks source link

think of a way to create an Update System that doesn't need a master #77

Open s4ke opened 9 years ago

s4ke commented 9 years ago

bit-flags for each server in the UpdateSource

s4ke commented 9 years ago

that way the updates don't need to be distributed in a backend. => no JMS/JGroups needed.

s4ke commented 9 years ago

Selection whether we already did the update can be done via:

power := 2^your_id; your_id = 0,...,63

WHERE mod(handledField / power, 2) >= 1.0 AND mod(handledField / power, 2) < 2;

problem is that this might be quite bad performance wise.

s4ke commented 9 years ago

org.hibernate.search.genericjpa.searchfactory.triggers.createstrategy=create is a must in such an environment. drop-create will break things, but if a user does a massindexing right after a new node starts, that would be fine. but that's just a bit much to ask. so we should clearly advertise "create" for this mode.

s4ke commented 9 years ago

Another way would be having a special table for each node and then store the ids of all the updates we already have processed there. This would be less error prone than the bit flag approach, but would consume a bit more memory. (for N nodes on the same database you would have N extra tables). Query time for the updates would be impacted a little as well.