I have just started MongoDB + Java, and I am getting into queries, collections etc.
Since the databases I’m playing are really small, everything is on the main thread. But, in general, is it a good idea to put all mongo queries etc on another thread?
Officially the Java driver is thread safe. So you don’t need to worry much about threading. If you need high performance and aren’t too worried about data accuracy (e.g. logging hits to a web page) you can even enable
WriteConcern.NONEand the Java process will not even wait for Mongo to report a success.