This is a high-performance distributed framework that integrates Actor, Event Sourcing, and Eventual consistency (see: http://dotnet.github.io/orleans/)
In the case is a simple transactionless transfer function
Install (mongodb or postgresql or mysql or sqlserver) and (rabbitmq or kafka).
Select the event persistence method and EventBus in Program.cs of the Ray.Host project.
varbuilder=newSiloHostBuilder().UseConfiguration(config).ConfigureApplicationParts(parts =>parts.AddApplicationPart(typeof(Account).Assembly).WithReferences()).ConfigureServices((context,servicecollection)=>{//Register postgresql as an event repositoryservicecollection.AddPostgreSQLStorage(config =>{config.ConnectionDict.Add("core_event","Server=127.0.0.1;Port=5432;Database=Ray;User Id=postgres;Password=XXXX;Pooling=true;MaxPoolSize=20;");});//Configure distributed transaction manager (not required, only need to be set if distributed transaction is required)servicecollection.AddPostgreSQLTxStorage(options =>{options.ConnectionKey="core_event";options.TableName="Transaction_TemporaryRecord";});servicecollection.PSQLConfigure();}).Configure<MongoConfig>(c =>c.Connection="mongodb://127.0.0.1:28888").Configure<RabbitConfig>(c =>{c.UserName="admin";c.Password="XXXX";c.Hosts=new[]{"127.0.0.1:5672"};c.MaxPoolSize=100;c.VirtualHost="/";}).ConfigureLogging(logging =>logging.AddConsole());Third, modify the configuration information of Ray.Client.
varconfig=ClientConfiguration.LocalhostSilo();varclient=newClientBuilder().UseConfiguration(config).ConfigureApplicationParts(parts =>parts.AddApplicationPart(typeof(IAccount).Assembly).WithReferences()).ConfigureLogging(logging =>logging.AddConsole()).Build();awaitclient.Connect();Fourth, start Ray.Host
Five, start Ray.Client