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
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
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
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement