Coder Social home page Coder Social logo

waynemunro / protoactor-dotnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asynkron/protoactor-dotnet

2.0 3.0 0.0 17.59 MB

Proto Actor - Ultra fast distributed actors for Golang and C#

Home Page: http://proto.actor

License: Apache License 2.0

C# 98.00% PowerShell 0.18% Shell 0.06% Dockerfile 0.03% HTML 1.67% CSS 0.06%

protoactor-dotnet's Introduction

Proto.Actor

Ultra-fast, distributed, cross-platform actors.

Bootcamp Training

https://github.com/AsynkronIT/protoactor-bootcamp

Stats

Alt

Installing

Using NuGet Package Manager Console:

PM> Install-Package Proto.Actor

Source code

This is the .NET repository for Proto Actor.

Other implementations:

Design principles

Minimalistic API - The API should be small and easy to use. Avoid enterprisey containers and configurations.

Build on existing technologies - There are already a lot of great technologies for e.g. networking and clustering. Build on those instead of reinventing them. E.g. gRPC streams for networking, Consul for clustering.

Pass data, not objects - Serialization is an explicit concern - don't try to hide it. Protobuf all the way.

Be fast - Do not trade performance for magic API trickery.

Getting started

The best place currently for learning how to use Proto.Actor is the examples. Documentation and guidance is under way, but not yet complete, and can be found on the website.

Hello world

Define a message type:

internal record Hello(string Who);

Define an actor:

internal class HelloActor : IActor
{
    public Task ReceiveAsync(IContext context)
    {
        var msg = context.Message;
        if (msg is Hello r)
        {
            Console.WriteLine($"Hello {r.Who}");
        }
        return Task.CompletedTask;
    }
}

Spawn it and send a message to it:

var system = new ActorSystem();
var context = system.Root;
var props = Props.FromProducer(() => new HelloActor());
var pid = context.Spawn(props);

context.Send(pid, new Hello("Alex"));

You should see the output Hello Alex.

Sample application

https://github.com/asynkron/realtimemap-dotnet

Contributors

Made with contributors-img.

Partners, Sponsors, and Contributor Companies

Name Role
Asynkron AB Founder and owner of Proto.Actor
Helleborg AS Core contributor team
Ubiquitous AS Core contributor team
Ahoy Games Core contributor team
Etteplan Contributing tutorials, documentation

protoactor-dotnet's People

Contributors

adamhathcock avatar alexeyzimarev avatar alexpantyukhin avatar allcontributors[bot] avatar cpx86 avatar damian-p avatar denizpiri avatar dependabot-preview[bot] avatar dependabot[bot] avatar dpavsrtrl avatar goblinfactory avatar halotron avatar jasprem avatar jrouaix avatar jstnlef avatar marcinbudny avatar markewer avatar masteryee avatar mergify[bot] avatar mhelleborg avatar pblachut avatar potterdai avatar raskolnikoov avatar redss avatar rogeralsing avatar sudsy avatar tomliversidge avatar urossmolnik avatar vchirikov avatar woksin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.