Proto Actor for Go

Proto Actor -- 适用于 Go、C# 和 Java/Kotlin 的超快速分布式 actors。「Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin」

Github星跟踪图

Go Report Card
GoDoc
Build Status
Coverage Status
Sourcegraph

Join the chat at https://gitter.im/AsynkronIT/protoactor

Cross platform actors

Introducing cross platform actor support between Go and C#.

Can I use this?
The Go implementation is still in beta, there are users using Proto Actor for Go in production already.
But be aware that the API might change over time until 1.0.

Sourcecode - Go

This is the Go repository for Proto Actor.

The C# implementation can be found here https://github.com/AsynkronIT/protoactor-dotnet

Design principles:

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

Build on existing technologies - There are already a lot of great tech for e.g. networking and clustering, build on those.
e.g. gRPC streams for networking, Consul.IO 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.

Ultra fast remoting, Proto Actor currently manages to pass over two million messages per second between nodes using only two actors, while still preserving message order!
This is six times more the new super advanced UDP based Artery transport for Scala Akka, and 30 times faster than Akka.NET.

:> node1.exe
2016/12/02 14:30:09 50000
2016/12/02 14:30:09 100000
2016/12/02 14:30:09 150000
... snip ...
2016/12/02 14:30:09 900000
2016/12/02 14:30:09 950000
2016/12/02 14:30:10 1000000
2016/12/02 14:30:10 Elapsed 999.9985ms
2016/12/02 14:30:10 Msg per sec 2000003 <--

History

As the creator of the Akka.NET project, I have come to some distinct conclusions while being involved in that project.
In Akka.NET we created our own thread pool, our own networking layer, our own serialization support, our own configuration support etc. etc.
This was all fun and challenging, it is however now my firm opinion that this is the wrong way to go about things.

If possible, software should be composed, not built, only add code to glue existing pieces together.
This yields a much better time to market, and allows us to focus on solving the actual problem at hand, in this case concurrency and distributed programming.

Proto Actor builds on existing technologies, Protobuf for serialization, gRPC streams for network transport.
This ensures cross platform compatibility, network protocol version tolerance and battle proven stability.

Another extremely important factor here is business agility and having an exit strategy.
By being cross platform, your organization is no longer tied into a specific platform, if you are migrating from .NET to Go,
This can be done while still allowing actor based services to communicate between platforms.

Reinvent by not reinventing.


Why Actors

batman

  • Decoupled Concurrency
  • Distributed by default
  • Fault tolerance

For a more indepth description of the differences, see this thread Actors vs. CSP

Building

You need to ensure that your $GOPATH variable is properly set.

Next, install the standard protocol buffer implementation and run the following commands to get all the necessary tooling:

go get github.com/AsynkronIT/protoactor-go/...
cd $GOPATH/src/github.com/AsynkronIT/protoactor-go
go get ./...
make

After invoking last command you will have generated protobuf definitions and built the project.

Windows users can use Cygwin to run make: www.cygwin.com

Testing

This command exectutes all tests in the repository except for consul integration tests (you need consul for running those tests). We also skip directories that don't contain any tests.

go test `go list ./...

主要指标

概览
名称与所有者asynkron/protoactor-go
主编程语言Go
编程语言Go (语言数: 4)
平台Linux, Mac, Windows
许可证Apache License 2.0
所有者活动
创建于2016-04-17 19:08:14
推送于2024-08-22 20:23:45
最后一次提交
发布数4
最新版本名称0.4.0 (发布于 )
第一版名称0.1.0 (发布于 )
用户参与
星数5.3k
关注者数203
派生数547
提交数2.5k
已启用问题?
问题数322
打开的问题数51
拉请求数457
打开的拉请求数36
关闭的拉请求数330
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?