All Projects → ainterface → ainterface

ainterface / ainterface

Licence: Apache-2.0 license
Runs an Erlang node on an ActorSystem of Akka.

Programming Languages

scala
5932 projects
erlang
1774 projects

Projects that are alternatives of or similar to ainterface

young-crawler
scala结合actor编写的分布式网络爬虫
Stars: ✭ 15 (-65.91%)
Mutual labels:  akka
akka-cluster-sample
A sample Akka Cluster application that uses ZooKeeper for service discovery
Stars: ✭ 13 (-70.45%)
Mutual labels:  akka
akka-persistance-ignite
Akka persistance plugin implementation with Apache Ignite
Stars: ✭ 20 (-54.55%)
Mutual labels:  akka
simplexspatial
The Reactive Geospatial Server
Stars: ✭ 17 (-61.36%)
Mutual labels:  akka
akka-persistence-dynamodb
DynamoDBJournal for Akka Persistence
Stars: ✭ 85 (+93.18%)
Mutual labels:  akka
endless
Scala library to describe sharded and event sourced entities using tagless-final algebras
Stars: ✭ 70 (+59.09%)
Mutual labels:  akka
Every Single Day I Tldr
A daily digest of the articles or videos I've found interesting, that I want to share with you.
Stars: ✭ 249 (+465.91%)
Mutual labels:  akka
Quark
Quark is a streaming-first Api Gateway using Akka
Stars: ✭ 13 (-70.45%)
Mutual labels:  akka
telepooz
Functional Telegram Bot API wrapper for Scala on top of akka, circe, cats, and shapeless
Stars: ✭ 26 (-40.91%)
Mutual labels:  akka
Akka.Persistence.MongoDB
MongoDB support for Akka.Persistence
Stars: ✭ 30 (-31.82%)
Mutual labels:  akka
akka-http-quickstart-java.g8
akka.io
Stars: ✭ 17 (-61.36%)
Mutual labels:  akka
pea
分布式压测引擎. A distributed stress tool based on gatling
Stars: ✭ 43 (-2.27%)
Mutual labels:  akka
Akka.Logger.Serilog
Akka.NET logging integration for Serilog library
Stars: ✭ 22 (-50%)
Mutual labels:  akka
akka-react-cloudant
A Soccer Dashboard created by scraping EPL website using Akka backend and ReactJS frontend and IBM Cloudant for object storage. IBM Cloud Foundry is used to host both frontend and backend app.
Stars: ✭ 21 (-52.27%)
Mutual labels:  akka
kamon-akka
Kamon Instrumentation for Akka
Stars: ✭ 44 (+0%)
Mutual labels:  akka
akka-persistence-s3
akka-persistence journal/snapshot plugin for AWS S3(support aws sdk for java v2)
Stars: ✭ 19 (-56.82%)
Mutual labels:  akka
akka-cqrs-activator
Issue tracker PoC application written in Scala (Akka) and JavaScript (React) that demonstrates event sourcing and CQRS
Stars: ✭ 33 (-25%)
Mutual labels:  akka
akka-streams-interleaving
Akka Streams example of how to interleave Sources with priorities
Stars: ✭ 28 (-36.36%)
Mutual labels:  akka
akka-cluster-on-kubernetes
Sample project for deploying Akka Cluster to Kubernetes. Presented at Scala Up North on July 21, 2017.
Stars: ✭ 35 (-20.45%)
Mutual labels:  akka
akka-persistence-foundationdb
A replicated Akka Persistence journal backed by FoundationDB
Stars: ✭ 43 (-2.27%)
Mutual labels:  akka

Ainterface

Build Status

Ainterface provides APIs to communicate with Erlang processes, like Jinterface. And APIs of Ainterface are designed to integrate Akka with Erlang seamlessly.

Notice

Since Ainterface is an experimental project, there is no guarantee that APIs will not be changed.

TODO

  • Published(non hidden) mode support
  • Short node names support
  • Non distributed mode support
  • Provides binary pattern matching for ByteString

Usage

Dependency

You should add the following dependency.

libraryDependencies += "com.okumin" %% "ainterface" % "0.1"

Configuration

In application.conf,

akka {
  ainterface {
    # The name of root actor of ainterface-system.
    root-name = "ainterface-system"

    init {
      # -name
      # Makes the Erlang runtime system into a distributed node and configure the name.
      name = "node-name-your-application"

      # -setcookie
      # Sets the magic cookie of the node to Cookie.
      # If `setcookie` is not specified, `$HOME/.erlang.cookie` is used.
      #setcookie = ""
    }
  }
}

Example

First, start an Erlang node and EPMD.

$ erl -name mofu
Erlang/OTP 17 [erts-6.2.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V6.2.1  (abort with ^G)
([email protected])1>

Set up Ainterface.

scala> val config = com.typesafe.config.ConfigFactory.parseString("""
     | akka {
     |   loglevel = "ERROR"
     |   ainterface {
     |     root-name = "ainterface-system"
     |     init.name = "ainterface-sample" // the node name
     |   }
     | }
     | """)
config: com.typesafe.config.Config = Config(SimpleConfigObject({"akka":{"ainterface":{"init":{"name":"ainterface-sample"},"root-name":"ainterface-system"},"loglevel":"ERROR"}}))

scala> val system = akka.actor.ActorSystem("sample", config)
system: akka.actor.ActorSystem = akka://sample

scala> akka.ainterface.AinterfaceSystem.init(system) // initialize

Start an echo server with the registered name echo.

scala> val echo = system.actorOf(akka.actor.Props[ainterface.EchoActor])
echo: akka.actor.ActorRef = Actor[akka://sample/user/$a#1942167954]

You can send messages from the Erlang node to Akka! The echo server returns his pid and hello message.

([email protected])1> {echo, '[email protected]'} ! {self(), hello}.
{<0.38.0>,hello}
([email protected])2> flush().
Shell got {<6209.1.0>,hello}
ok

The other examples are here.

License

Apache 2.0

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].