amnu3387

amnu3387

So I’m architecting a small system, where there will be 2 apps. One that is end-user facing only (public like app) and another that is admin only. The public one will be connected to a database containing pruned and cleaned up records while the admin one will be connected to both that database and another one. Now I would like that the admin app would be connected to the public facing one, able to use Erlang node comm, but not the other way around, so that the admin app could directly change state in the public one. This will be deployed in AWS EC2, I will open the node communication ports in the public one restricting the ip range to that of the admin one.

The reason for this is that the public facing app will contain views based on data from the pruned datasets, but the admins will be doing updates to the data monthly, so I want to re-use the views from the public facing app to output “previews” in the admin with data that hasn’t been yet persisted, to see if everything adds up correctly, this way preventing duplication of views. Does this seem like a reasonable idea? In my head it does.

If that is possible, how would I set up the cookies and node names and connect the admin app when it starts up?
The idea is that in case I end up with several public facing instances in the future, I would be able to retrieve their addresses registered in the loadbalancer and then automatically connect the admin to any N public apps.

Thanks for any insights

Showing Posts 1 to 4

blatyo

blatyo

Conduit Core Team

Hidden nodes are the closest thing I’m aware of: Distributed Erlang — Erlang System Documentation v29.0.2

Although, I would say its an abuse and there’s probably better way to do it.

amnu3387

amnu3387 OP

Thanks for the reference - yes I can simply add some routes in the public facing app and lock them to only admins - but if it was easy to prevent one node from connecting to the other one/executing any calls on the other one that would be nicer (at least for me conceptually) and I would use the opportunity to learn more about this.

Regarding node comm, if I get it right, they’ll both need to have the same cookie which means they’ll need to be technically open to connections (although I can just not open the relevant ports in AWS for the admin one, that would be relying on a detail and not inbuilt). But this seems like a pretty common use case no? One node being able to access the runtime of another but not the other way around? Or am I just looking at it wrongly?

dom

dom

Normally there’s no need for a VM-level mechanism to enforce that, since you control what code runs on each node. If you want security even when a node is compromised, then you can’t use the built-in Erlang distribution. See: Can I write a patch to increase the security of the Erlang distribution?

amnu3387

amnu3387 OP

It makes sense I think I was basically expecting the same kind of conceptual framework that goes on processes (ability to link, one sided, supervisors → workers, or similarly to ets public reads with private writes) to also be applicable at the node level, but there are probably real differences on how this would play out. Basically toying with the idea of how to control an app from another besides the regular http endpoints or writing my custom sockets/receives and implementing security for them. Thanks.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews