Volver al ranking

asynkron/protoactor-dotnet

C#proto.actor

Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin

actorsclusteringproto-actorakkadistributed-systemsdistributed-computing
Crecimiento de estrellas
Estrellas
1.9k
Forks
291
Crecimiento semanal
Issues
20
5001k1.5k
ene 2017mar 2020may 2023jul 2026
README

💬 Join our Slack channel

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:

Documentation

Additional root-level documents provide deeper insights into the project:

Test coverage

You can capture code coverage directly when running the test projects. The .NET SDK ships an XPlat Code Coverage data collector that works across platforms, so you do not need any third-party tooling for the basic workflow.

Quick coverage run

Run any test project with coverage enabled by passing the CollectCoverage property:

dotnet test /p:CollectCoverage=true

This uses the built-in collector and writes coverage data under the TestResults directory for the invocation.

Using coverlet.collector

For richer reporting support you can opt into the coverlet.collector package. Add it to the test project you want to analyze:

dotnet add package coverlet.collector

Then request coverage when running the tests:

dotnet test --collect:"XPlat Code Coverage"

This produces a .coverage file under TestResults/... that can be converted into other formats.

Alternative output formats

You can ask the collector to emit other formats such as Cobertura, lcov, or OpenCover. For example, to produce an lcov report:

dotnet test --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov

HTML reports

Feed the generated lcov or cobertura files into tools like ReportGenerator to build browsable HTML output. Install the global tool and point it at your coverage reports:

dotnet tool install -g dotnet-reportgenerator-globaltool
reportgenerator -reports:**/coverage.cobertura.xml -targetdir:coveragereport

Open the files in the coveragereport directory to inspect the results.

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
Repositorios relacionados
dotnet/orleans

Cloud Native application framework for .NET

C#MIT Licenseactor-modeldistributed-actors
docs.microsoft.com/dotnet/orleans
10.8k2.1k
rivet-dev/rivet

Rivet Actors are the primitive for stateful workloads. Built for AI agents, collaborative apps, and durable execution.

Rustcrates.ioApache License 2.0multiplayerrust
rivet.dev
5.7k200
asynkron/protoactor-go

Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin

GoGo ModulesApache License 2.0grpcactor-model
proto.actor
5.5k574
lunatic-solutions/lunatic

Lunatic is an Erlang-inspired runtime for WebAssembly

Rustcrates.ioApache License 2.0vmwebassembly
lunatic.solutions
4.9k149
ergo-services/ergo

An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.

GoGo ModulesMIT Licenseerlanggolang
ergo.services
4.6k184
puniverse/quasar

Fibers, Channels and Actors for the JVM

JavaMavenOtherjavajvm
docs.paralleluniverse.co/quasar/
4.6k562
actor-framework/actor-framework

An Open Source Implementation of the Actor Model in C++

C++BSD 3-Clause "New" or "Revised" Licenseactor-modelcaf
actor-framework.org
3.4k572
rivet-gg/rivet

🔩 Serverless for stateful backends

Rustcrates.ioApache License 2.0game-developmentmultiplayer
rivet.gg
3.2k80
orbit/orbit

Orbit - Virtual actor framework for building distributed systems

KotlinBSD 3-Clause "New" or "Revised" Licenseactorsactor-model
1.7k173
tqwewe/kameo

Fault-tolerant async actors for Rust that scale seamlessly

Rustcrates.ioApache License 2.0actorsdistributed
docs.page/tqwewe/kameo
1.4k79
cinemagoer/cinemagoer

Cinemagoer is a Python package useful to retrieve and manage the data of the IMDb (to which we are not affiliated in any way) movie database about movies, people and characters

HTMLGNU General Public License v2.0imdbmovies
cinemagoer.github.io
1.3k377
nactio/nact

nact ⇒ node.js + actors ⇒ your services have never been so µ

TypeScriptnpmApache License 2.0actor-modelnodejs
nact.xyz
1.1k44