All Projects → wwj31 → dogactor

wwj31 / dogactor

Licence: GPL-3.0 license
Distributed Systems,Based on Actor Model

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to dogactor

Qpc
QP/C real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 379 (+441.43%)
Mutual labels:  actor-model, actor
Actor4j Core
Actor4j is an actor-oriented Java framework. Useful for building lightweighted microservices (these are the actors themselves or groups of them). Enhanced performance of message passing.
Stars: ✭ 48 (-31.43%)
Mutual labels:  actor-model, actor
Coobjc
coobjc provides coroutine support for Objective-C and Swift. We added await method、generator and actor model like C#、Javascript and Kotlin. For convenience, we added coroutine categories for some Foundation and UIKit API in cokit framework like NSFileManager, JSON, NSData, UIImage etc. We also add tuple support in coobjc.
Stars: ✭ 3,921 (+5501.43%)
Mutual labels:  actor-model, actor
reacted
Actor based reactive java framework for microservices in local and distributed environment
Stars: ✭ 17 (-75.71%)
Mutual labels:  actor-model, actor-framework
Fibry
The first Java Actor System supporting fibers from Project Loom
Stars: ✭ 146 (+108.57%)
Mutual labels:  actor-model, actor
Akka.net
Port of Akka actors for .NET
Stars: ✭ 4,024 (+5648.57%)
Mutual labels:  actor-model, actor
Actix
Actor framework for Rust.
Stars: ✭ 6,764 (+9562.86%)
Mutual labels:  actor-model, actor
Qpn
QP-nano real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 107 (+52.86%)
Mutual labels:  actor-model, actor
Xactor
Xactor is a rust actors framework based on async-std
Stars: ✭ 146 (+108.57%)
Mutual labels:  actor-model, actor
Qpcpp
QP/C++ real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 124 (+77.14%)
Mutual labels:  actor-model, actor
Orleans.CosmosDB
Orleans providers for Azure Cosmos DB
Stars: ✭ 36 (-48.57%)
Mutual labels:  actor-model, actor-framework
Sobjectizer
An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.
Stars: ✭ 172 (+145.71%)
Mutual labels:  actor-model, actor
quacktors
The quacking awesome Go actor model framework!
Stars: ✭ 14 (-80%)
Mutual labels:  actor-model, actor-framework
serverless-orleans
A demonstration of local development and debugging + serverless Azure deployment of a Dockerized Orleans application.
Stars: ✭ 21 (-70%)
Mutual labels:  actor-model
nact
nact ⇒ node.js + actors ⇒ your services have never been so µ
Stars: ✭ 1,003 (+1332.86%)
Mutual labels:  actor-model
kotlin-akka
Akka-Kotlin sample, and support library.
Stars: ✭ 25 (-64.29%)
Mutual labels:  actor-model
tutorial
Tutorials to help you build your first Swim app
Stars: ✭ 27 (-61.43%)
Mutual labels:  actor-model
GeekServer
基于.Netcore的开发效率高,性能强,跨平台,持久化层透明,支持不停服热更新的游戏服务器。Best for your unity game server!
Stars: ✭ 171 (+144.29%)
Mutual labels:  actor
reactor
🚀 Native Actors for Reason and OCaml
Stars: ✭ 70 (+0%)
Mutual labels:  actor-model
cyme
Celery Instance Manager
Stars: ✭ 50 (-28.57%)
Mutual labels:  actor-model

game server framework

a actor model framework written in Go. it has implemented server discovery using ETCD.

Getting Started

1.Installation

To start using dogactor, install Go and run go get:

$ go get -u github.com/wwj31/dogactor

2.Quick Start

Copy and paste the following code in your main files

package main

import (
	"fmt"
	"time"

	"github.com/wwj31/dogactor/actor"
	"github.com/wwj31/dogactor/tools"
)

type PingActor struct{ actor.Base }
type PongActor struct{ actor.Base }

func main() {
	system, _ := actor.NewSystem()
	ping := actor.New("ping", &PingActor{})
	pong := actor.New("pong", &PongActor{})
	system.Add(ping)
	system.Add(pong)

	<-system.CStop
	fmt.Println("stop")
}

// OnInit PingActor
func (s *PingActor) OnInit() {
	s.AddTimer("5h4j3kg4a3v9", tools.NowTime()+int64(1*time.Second), func(dt int64) {
		s.Send("pong", "this is data")
	}, -1)
}
func (s *PingActor) OnHandleMessage(sourceId, targetId string, msg interface{}) {
	switch msg {
	case 99999:
		fmt.Println(sourceId, targetId)
		fmt.Println()
	}
}

// OnHandleMessage PongActor
func (s *PongActor) OnHandleMessage(sourceId, targetId string, msg interface{}) {
	switch msg {
	case "this is data":
		fmt.Println(sourceId, targetId)
		s.Send(sourceId, 99999)
	}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].