# JuliaActors: a road to an Actors ecosystem

**URL:** <https://discourse.julialang.org/t/juliaactors-a-road-to-an-actors-ecosystem/49898>\
**Category:** Specific Domains\
**Tags:** concurrency, actors\
**Created:** [November 10, 2020, 9:15am UTC](https://discourse.julialang.org/t/juliaactors-a-road-to-an-actors-ecosystem/49898 "2020-11-10T09:15:55Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pbayer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pbayer/32/11675_2.png) [@pbayer](https://discourse.julialang.org/u/pbayer)\
**Post date:** [November 17, 2020, 9:40am UTC](https://discourse.julialang.org/t/juliaactors-a-road-to-an-actors-ecosystem/49898/4 "2020-11-17T09:40:29Z")

</div>

**Good news:** [Actors.jl](https://github.com/JuliaActors/Actors.jl) has been rewritten and is available as v0.1.1 from the Julia registry. It provides

- the basic functionality of the classical Actor Model and
- a minimal interface which allows other actor libraries to plugin the `Actors` API and their actors to communicate with each other.

> [@\[ANN\] YAActL 0.2, Yet Another Actor Library (built in Julia)](https://discourse.julialang.org/t/ann-yaactl-0-2-yet-another-actor-library-built-in-julia/48637/31):
>
> Defining a minimalistic interface for the classic model seems like a good start.

This proposal of @tisztamo turned out to work very well. In order to demonstrate how that works, I wrote a completely different toy actor library [SlowActors.jl](https://github.com/JuliaActors/SlowActors.jl) with about 100 lines of code. It uses the Actors API, can run the same examples as `Actors` and actors from both libraries can communicate with each other:

```julia
julia> using SlowActors

julia> raise(a, b) = a^b
raise (generic function with 1 method)

julia> query(act, a, b) = request!(act, a, b)
query (generic function with 1 method)

julia> A = Actors.spawn(Func(raise))
Link{Channel{Any}}(Channel{Any}(sz_max:32,sz_curr:0), 1, :local)

julia> B = spawn(Func(query, A))
Link{SlowActors.Mailbox}(SlowActors.Mailbox(Deque [Any[]], ...

julia> request!(B, 2, 2)
4

```

In that example “slow” actor B queries actor A to raise 2 by 2, takes back the result and delivers it. This works in either direction.

That means that we can start to connect our actor libraries around the `Actors` interface. How that works is described on the [integration page](https://juliaactors.github.io/SlowActors.jl/dev/integrate/) of `SlowActors`.

Now we can progress to step 2 above to provide `Actors` with a modern API, a registry, a supervision tree …

---

_[View the full topic](https://discourse.julialang.org/t/juliaactors-a-road-to-an-actors-ecosystem/49898)._
