Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
s4ke opened this issue Jun 30, 2015 · 4 comments
Open

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

s4ke opened this issue Jun 30, 2015 · 4 comments

Comments

@s4ke
Copy link
Member

s4ke commented Jun 30, 2015

bit-flags for each server in the UpdateSource

@s4ke
Copy link
Member Author

s4ke commented Jun 30, 2015

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

@s4ke
Copy link
Member Author

s4ke commented Jun 30, 2015

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
Copy link
Member Author

s4ke commented Jul 3, 2015

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
Copy link
Member Author

s4ke commented Jul 3, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant