Multithreaded environment

Sep 21, 2015 at 12:03 PM
What is the best design to be used in an multi-threaded environment with dynamic view creation? I need to index something (5k-200K documents), I need to search on (mostly) integers, and then I will drop everything at the end (data/objects/etc). Sorry for asking this, but I haven't seen it documented anywhere and I would like to use this engine in my project.

What I did currently:
  • for each instance that perform the indexing/searching/deletion I have a separate instance of "RaptorDB.RaptorDB";
  • the "RaptorDB.Global.RequirePrimaryView = false;" call is made in the static constructor;
  • for each new search session initiated, I register 2-3 views and then I index data coming from different sources at the same time;
  • the searches are mostly done in parallel - the same 'instance' is used to provide answers to queries from different sources;
  • the drop occurs when everything is done;
I have run some small tests, seems to be ok - but as there is no 'official' statement on this, I would like you also to review this.

Thank you!
Sep 22, 2015 at 7:14 AM
Hi Dragosc!

Seems to be fine, if it works then it's official! :)
Sep 22, 2015 at 9:33 AM
Then it's official! ;-)