Interface IDistributedDataStore
Represents a data store that works with large distributed systems that support OLTP-style processing and provide data querying, caching, partitioning/sharding, failover and replication. These systems are designed to handle billions of rows that need to be accessed by millions of active concurrent users, so the design is specific to this model that scales horizontally. There is no need to use this technology for medium and smaller data stores as it imposes specific requirements on how application is written/interacts with the backend system. This technology is based on the idea of Parcels - an atomic unit of data change. Parcels get replicated between hosts for failover and performance reasons. Note: NFX library does not provide the implementation for this technology, only marker interfaces so developers can plan for distributed backends in future
Inherited Members
Namespace: NFX.DataAccess.Distributed
Assembly: NFX.dll
Syntax
public interface IDistributedDataStore : IDataStore, IApplicationComponent, IDisposable
Remarks
The structure of distributed data store:
+------------------------------------------------------------------------------------------------------------+ | Data Store | | +-------------------------------------------------------------------------+ +---------------------+ | | | Bank = N 1 (Schema A) | | Bank = N 2 | | | | +----------+ +--------------------------------------------------------+ | | (Schema A) | | | | | Area | + Area "UserData" | | ... | | | | | | "common" | +-----------+-----------+-----------+-----------+--------+ | | | | | | | | + Shard 1 | Shard 2 | Shard 3 | Shard 4 | | | | | | | +----------+ | | | | | | +---------------------+ | | | +-----------+ | | | | +---------------------+ | | | +----------------------+ | +-----------+ | | | Bank = N X | | | | |Area "clinicalData" | | | | | | | (Schema B) | | | | | /doctors | | | | | | ... | | | | | | /codes | | | | | | | | | | | | /diagnoses | | | +-----------+ | | | | | | +----------------------+ | | | +---------------------+ | | | +-----------+ | | | +-------------------------------------------------------------------------+ | +------------------------------------------------------------------------------------------------------------+ Distributed data stores hold single or multiple named data banks instances: Bank = global data bank name, a named instance of a distributed database. Banks are logical isolation containers in large datasets. Store implementations may use it for physical isolation as well. Every bank implements a particular schema - a structure suitable for some business purpose. A store may support multiple schemas, but every particular database bank implements only one schema. Named instances of database banks with the same schema may be used to house data for different clients or environments. Bank name example: "PROD-Data", "DEV-Data", "EnterpriseA", "CustomerX" etc.
Every Bank is further broken down by Areas that can be accessed/addressed by their names. Areas contain shards that partition large volumes of data horizontally, they define how data is partitioned and where it is stored
Properties
SchemaNames
Returns names of database bank schemas supported by the store. Every bank implements a particular schema
Declaration
IEnumerable<string> SchemaNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
BankNames(String)
Returns names of database bank instances in the store that implement the specified schema
Declaration
IEnumerable<string> BankNames(string schemaName)
Parameters
Type | Name | Description |
---|---|---|
System.String | schemaName |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
GetBank(String, String)
Returns Bank object by name within schema
Declaration
IBank GetBank(string schemaName, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | schemaName | |
System.String | name |
Returns
Type | Description |
---|---|
IBank |