GithubHelp home page GithubHelp logo

kristinn-stefansson / akkling Goto Github PK

View Code? Open in Web Editor NEW

This project forked from horusiath/akkling

0.0 1.0 0.0 785 KB

Experimental F# typed API for Akka.NET

License: Apache License 2.0

Batchfile 0.11% F# 99.81% Shell 0.07%

akkling's Introduction

Akkling

This is the experimental fork of Akka.FSharp library, introducing new features such as typed actor refs, and also simplifying existing Akka.FSharp API. The main reason for splitting from official API is to be able to introduce new (also experimental), but possibly breaking changes outside existing Akka release cycle.

Read wiki pages for more info.

Get's started

For more examples check examples section.

Obligatory hello world example:

open Akkling

use system = System.create "my-system" <| Configuration.defaultConfig()
let aref = spawnAnonymous system <| props(actorOf (fun m -> printfn "%s" m |> ignored))

aref <! "hello world"
aref <! 1 // ERROR: we have statically typed actors here

Another example using stateful actors:

open Akkling

use system = System.create "my-system" <| Configuration.defaultConfig()

type Message =
    | Hi
    | Greet of string

let rec greeter lastKnown = function
    | Hi -> printfn "Who sent Hi? %s?" lastKnown |> ignored
    | Greet(who) ->
        printfn "%s sends greetings" who
        become (greeter who)

let aref = spawn system "greeter" <| props(actorOf (greeter "Unknown"))

aref <! Greet "Tom"
aref <! Greet "Jane"
aref <! Hi

Maintainer(s)

akkling's People

Contributors

horusiath avatar vasily-kirichenko avatar mrinaldi avatar quartusdev avatar swoorup avatar object avatar forki avatar pmbanka avatar cotyar avatar mebrein avatar shmew avatar daniellittledev avatar

Watchers

James Cloos avatar

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.