• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

asynkron/protoactor-kotlin: Ultra-fast distributed cross-platform actor framewor ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

asynkron/protoactor-kotlin

开源软件地址(OpenSource Url):

https://github.com/asynkron/protoactor-kotlin

开源编程语言(OpenSource Language):

Kotlin 93.7%

开源软件介绍(OpenSource Introduction):

Build Status Download Coverage Status stability-experimental

Proto.Actor Kotlin

Ultra-fast, distributed, cross-platform actors. This is the Kotlin repository for Proto.Actor.

Stability

It's used in production but doesn't have the same adoption and stability as the C# and Go implementations.

How to build

./gradlew build

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.

Inprocess Ping-Pong results:

Dispatcher		Elapsed		Msg/sec
300			273		116885925
400			217		147426522
500			150		213037390
600			85		375979638
700			87		364621820
800			83		381552772 <-- 380+ mil msg/sec

Modules

Dependencies

Package dependencies

Getting started

The best place currently for learning how to use Proto.Actor is the examples.

Hello world

build.gradle.kts

repositories {
    jcenter()
}

dependencies {
	implementation("actor.proto:proto-actor:latest.release")
}

App.kt

import actor.proto.*

fun main() {
	val prop = fromFunc { msg ->
		when (msg) {
			is Started -> println("Started")
			is String -> {
				println("Hello $msg")
				stop(self)
			}
			is Stopping -> println("Stopping")
			is Stopped -> println("Stopped")
			else -> println("Unknown message $msg")
		}
	}

	val pid = spawn(prop)
	send(pid, "Proto.Actor")
	readLine()
}

Release management

Stable release are published to https://bintray.com/asynkronit/protoactor-kotlin and linked to jcenter. Anyone of the repositories below will do.

repositories {
   	maven("https://dl.bintray.com/asynkronit/protoactor-kotlin")
}
repositories {
   	jcenter()
}

Snapshot

Commits on the master branch are deployed as snapshots to https://oss.jfrog.org/artifactory/oss-snapshot-local/actor/proto/ and can be consumed by adding the following configuration to your gradle file:

repositories {
    repositories {
        maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
    }
}

dependencies {
    compile 'actor.proto:proto-actor:0.1.0-SNAPSHOT'
}

Publishing a new version

When a tag is created e.g. v0.1.0 Travis will build and publish the packages to Bintray.

Support

Many thanks to JetBrains for support!

Also thanks to ej-technologies.com for their Java profiler - JProfiler




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap