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

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews