项目作者: apache

项目描述 :
Apache Dubbo Erlang Implementation.
高级语言: Erlang
项目地址: git://github.com/apache/dubbo-erlang.git
创建时间: 2018-10-17T11:27:38Z
项目社区:https://github.com/apache/dubbo-erlang

开源协议:Apache License 2.0

下载


dubboerl

Apache Dubbo Erlang Implementation.

Build Status
codecov

Feature list

The following features are supported.

  • Zookeeper registry center (√)
  • Dubbo Protocol (√)
  • Serialize
    • Hessian serialize (√)
    • Json serialize (√)
  • Erlang project as consumer or provider (√)
  • Sync and Async invoker (√)
  • Random loadbalance (√)
  • Connection pools (√)
  • Support protocol,cluster,loadbalance,registry and filter extension point.

Start

Import

Add dubblerl to rebar.config with your project

  1. {deps, [
  2. {dubboerl, {git, "https://github.com/apache/dubbo-erlang.git", {branch, "master"}}}
  3. ]}.

Step1

Use erlanalysis tool transfer java interface to erlang lib. And add the lib to you project app dir.

Step2

configure dubbo reference.

in sys.config add dubboerl config.
For example:

  1. {dubboerl,[
  2. {application,<<"testdubboerl">>},
  3. {protocol, {dubbo, [{port, 20882}]}},
  4. {registry,zookeeper},
  5. {zookeeper_list,[{"127.0.0.1",2181}]},
  6. {serialization,hessian},
  7. {consumer,[
  8. {<<"org.apache.dubbo.erlang.sample.service.facade.UserOperator">>,[]}
  9. ]},
  10. {provider,[
  11. {user_impl,userOperator,<<"org.apache.dubbo.erlang.sample.service.facade.UserOperator">>,[]}
  12. ]}
  13. ]}

Step4

Init dubboerl application context when your project start.

  1. dubboerl:init().

Step5

Call the interface method.

  1. Request = #userInfoRequest{requestId = 123, username = "testname"},
  2. userOperator:queryUserInfo(Request,#{sync=> true}).

Sample

Reference the demo project dubboerl_demo

More Documents

Reference Docs