Good ways to proxy distributed running elixir nodes

Hello!

I am going to be running a distributed package out with edge users.

The primary usage will be from a local webpage on their pc, but I am looking at ways to let them remotely control the setup in a safe way.

I already sketched up a solution where I pull down cloudflared binary (single file in what I think is Go), then create a tunnell that is a unique subdomain for the customer and then use cloudflare api to set up a tunnel, give key to the running system and then it sets up the tunnel through the vendored cli tool in a port linked to the beam so it cleans up on app exit.

However this feels a bit heavy handed and I am wondering if I am able to do this in a more native way.

Users enabling the remote/premium features will do so opt in and at that moment it will start phoning home to the hub with a websocket.

The only other feasible option I could think of is to encode all the action layer and just send the events to the remote server since the local webapp is just an abstraction on top of a core engine it communicates with using message passing (there is also a terminal ui). I havent really tried mapping up that and I am not sure if this is a feasible path for a one/two man team to do as opposed to the cloudflared solution I cooked up in fifteen minutes.

Suggestions welcome! Would be awesome to have something elixir native end to end.

1 Like