Git Product home page Git Product logo

ray's Introduction

Ray

Join the chat at https://gitter.im/RayTale/Ray

This is a high-performance distributed framework that integrates Actor, Event Sourcing, and Eventual consistency (see: http://dotnet.github.io/orleans/)

Case start steps

In the case is a simple transactionless transfer function

  1. Install (mongodb or postgresql or mysql or sqlserver) and (rabbitmq or kafka).

  2. Select the event persistence method and EventBus in Program.cs of the Ray.Host project.

    var builder = new SiloHostBuilder()
        .UseConfiguration(config)
        .ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(Account).Assembly).WithReferences())
        .ConfigureServices((context, servicecollection) =>
        {
            //Register postgresql as an event repository
            servicecollection.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.

    var config = ClientConfiguration.LocalhostSilo();
    var client = new ClientBuilder()
        .UseConfiguration(config)
        .ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(IAccount).Assembly).WithReferences())
        .ConfigureLogging(logging => logging.AddConsole())
        .Build();
    await client.Connect();

Fourth, start Ray.Host

Five, start Ray.Client

ray's People

Contributors

u-less avatar dependabot[bot] avatar iericzheng avatar elanhasson avatar johnhao421 avatar sanych-sun avatar lfzm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.