Scalang是一个Scala的封装,可以轻松的编写服务来跟Erlang接口。
示例代码:
classMyProcess(ctx:ProcessContext)extendsProcess(ctx){overridedefonMessage(msg:Any){log.info("received%s",msg)}}valpid=node.spawn[MyProcess]("my_process")//sendtothepidnode.send(pid,"heythere")//sendtotheregnamenode.send("my_process","youwannaparty?")
评论