rump13

rump13

Options for connecting two Elixir apps?

Hi all,

I’m playing with designing a multi-tenant SaaS pet project using the Control Plane / Application Plane model. There will probably be two main web apps (control and application planes) in Elixir/Phoenix. The control plane will run on a single node (private network, not accessible from the internet, separate DB), while the application plane will be multi-node (accessible from the internet, separate DB).

The question I have is how to enable communication between these two planes/apps. Most examples I’ve found focus on microservice architectures based on HTTP APIs. Others suggest message queues or event buses. Given the strengths of BEAM, I’m wondering:

What are the options BEAM-native or preferred mechanisms for loosely coupled communication between two Elixir applications?

Looking forward to insights from anyone who has tackled something similar!

Most Liked

cmo

cmo

If they’re not clustered, you’re outside of the BEAM native umbrella aren’t you? Then you can choose between HTTP, Websockets, grpc, etc.

I’ve used Phoenix channels to do multiple client to server connection using Slipstream. I wanted to know when they’re connected and channels provided the tools for that.

Last Post!

dimitarvp

dimitarvp

As @schneebyte points out, you absolutely do NOT want your control plane node joining the cluster of the application nodes; the BEAM VM excels at many things but refined access controls is not one of them – that new node will have full access. From your description it seems you don’t want that so indeed go with SQS or any other external and decoupled message-passing solution.

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New

Other popular topics Top

hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31494 112
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40042 209
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement