Is MongoDB usable as shared memory for a parallell processing / multiple-instances application? Is MongoDB usable as shared memory for a parallell processing / multiple-instances application? database database

Is MongoDB usable as shared memory for a parallell processing / multiple-instances application?


Yes, MongoDB will meet your needs. I think the following aspects of your description are particularly relevant in your DB selection decision:

1. An update happens every 3 seconds

MongoDB has a database level write-lock (usually short lived) that blocks read operations. This means that you want will want to ensure that you have enough memory to fit your working set, and you will generally not run into any write-lock issues. Note that bulk inserts will hold the write lock for longer.

If you are sharding, you will want to consider shard keys that allow for write scaling i.e. distribute writes on different shards.

2. Shared storage for multiple processes

This is a pretty common scenario; in fact, many MongoDB deployments are expected be accessed from multiple processes concurrently. Unlike the write-lock, the read-lock does not block other reads.

3. Warm redundancy

Supported through MongoDB replication. If you'd like to read from secondary server(s) you will need to set the Read Preference to secondaryPreferred in your driver.