Skip to content

Latest commit

 

History

History

README.md

SapphireDb.HttpSync - Http sync module for SapphireDb

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.

Installation

Install package

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/

Register services and update pipeline

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();
  }
}

Documentation

Check out the documentation for more details: Documentation

Implementations/Packages

Server

SapphireDb - Server for Asp.Net Core

SapphireDb.RedisSync

SapphireDb.HttpSync

Client

sapphiredb - JS client (JS, NodeJs, React, Svelte, ...)

ng-sapphiredb - Angular client

Author

Morris Janatzek (morrisjdev)

Licenses

SapphireDb - MIT License

sapphiredb-js - MIT License