Interfaces between distributed OTP applications

Fri Jan 29 17:27:20 CET 2010

I hate to repost, but maybe somebody can answer?
thanks in advance

On Jan 26, 10:36 am, ZZZZZZZZZZZZZZZZ <zvi.avra...@REDACTED> wrote:
> Hi,
> the OTP Design Principles states, that OTP Applications are set of
> loosely-coupled components, while modules inside single application
> are tightly coupled.
> Let's say I have two distributed OTP applications:  "client" and
> "server", both running on different Erlang nodes/hosts.
> Let's say "server" application uses gen_server, which exposes public
> function API.
> The "client" applications calling functions in public API of
> gen_server in "server" application.
> What's the proper way to express this in OTP?
> 1. For simplicity, just add dependency on "server" application in
> "client" application's .app file. Start both on "server" node.
> 2. Don't use public API functions in "server". Send messages directly
> to "server" using gen_server:call / cast.
> 3. Add third application: "server_api" or "server_if" with single
> module defining public API wrappers around gen_server messages
> protocol. Then "client" application will be depended on "server_api"
> application, and not the "server" itself.
> 4. Any other ideas?
> thanks in advance,
> Zvi
> ________________________________________________________________
> erlang-questions mailing list. See
> erlang-questions (at)

More information about the erlang-questions mailing list