NDatabase Scaling

Jan 20, 2013 at 9:50 PM

Hi. This is such a great project! Thank you.

What are the options for scaling in the future? Are you thinking about replication and/or sharding?

Jeremy

Coordinator
Jan 21, 2013 at 6:26 AM

Thanks :)

Regarding the scaling of NDatabase -> I could refer to MongoDB (so the similar plan exist for NDatabase)

Replication
MongoDB supports master-slave replication. A master can perform reads and writes. A slave copies data from the master and can only be used for reads or backup (not writes). The slaves have the ability to select a new master if the current one goes down.
Load balancing
MongoDB scales horizontally using sharding.[9] The developer chooses a shard key, which determines how the data in a collection will be distributed. The data is split into ranges (based on the shard key) and distributed across multiple shards. (A shard is a master with one or more slaves.)
MongoDB can run over multiple servers, balancing the load and/or duplicating data to keep the system up and running in case of hardware failure. Automatic configuration is easy to deploy and new machines can be added to a running database.

File per particular class

Another option which I want to provide (that requires to change how data are stored in binary file) is possibility to keep class instances in different files, so file could define only set of particular class instances referring to other files blocks regarding other class references. Sill, when we have too many instances of one class (hard to achieve, because references are taking the same space as int) we still could use sharding to have more files specified for particular class instances.