SapphireDb supports running in multiple instances. Each instance will synchronize with the other instances using different mechanisms.
If you only have a predefined (and small) number of instances and don't need dynamic scaling you can use this option. SapphireDb will sync changes through a http-interface and send them to all other known instances.
To install the package execute the following command in your package manager console
PM> Install-Package SapphireDb.HttpSync
You can also install the extension using Nuget package manager. The project can be found here: https://www.nuget.org/packages/SapphireDb.HttpSync/
To use the SapphireDb.HttpSync you have to make some changes in your Startup.cs-File.
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
HttpSyncConfiguration httpSyncConfiguration = new HttpSyncConfiguration(Configuration.GetSection("HttpSync"));
services.AddSapphireDb(...)
.AddContext<MyDbContext>(cfg => ...)
.AddHttpSync(httpSyncConfiguration);
}
public void Configure(IApplicationBuilder app)
{
//Add Middleware
app.UseSapphireDb();
app.UseSapphireHttpSync();
}
}Check out the documentation for more details: Documentation
SapphireDb - Server for Asp.Net Core
sapphiredb - JS client (JS, NodeJs, React, Svelte, ...)
ng-sapphiredb - Angular client
SapphireDb - MIT License
sapphiredb-js - MIT License