Giter Site home page Giter Site logo

donam-givita / protoactor-kotlin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asynkron/protoactor-kotlin

0.0 0.0 0.0 889 KB

Ultra-fast distributed cross-platform actor framework

Home Page: http://proto.actor

License: Apache License 2.0

Shell 0.57% Java 5.72% Kotlin 93.71%

protoactor-kotlin's 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

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.