Open skyhit opened 6 years ago
I think we should stick to elastic search because it has REST-based interface, and tuned for a search that's what we need most.
For duplicates, there are many practices to avoid that https://qbox.io/blog/minimizing-document-duplication-in-elasticsearch
For initial load, the code should take care of the index is already populated.
@cwdcwd your comments
@sushilshinde you misundersand my approach, the final goal is not changed, it is going to populate the elasticsearch indexes.
what I am suggesting is the way to populate the elasticsearch indexes.
the main part will be thread which is running all the time, the pickup the changed challenge ids or match ids from Redis cache, and populate the indexes.
but there can be different ways to update the challenge ids and match ids in Redis cache, like a endpoint, which can be used purposely if we see some data in index is not updated, and we can force an update by pushing the challenge id into Redis cache, and the job in 1 will pick it up and populate the indexes.
it can be a cronjob will be monitoring the changes.
it can be other ways which just push the challenge ids and match ids into Redis cache
I would like to improve the service to use Redis as a unique queue for cronjob to populate index.
the refactoring will be like
the current architecture, we need to adjust the environment variables, in order to do the initial load
@sushilshinde @ajefts Let me know your thought about this approach.