LionOps

LionOps

Help with OTP and architectural design for a proxy MUD system

I’ve read the Mix & OTP section of the hex docs and semi-grok things. What I’m struggling with is how everything fits together in my use case, and advice/guidance is appreciated as I’m new to Elixir (and OTP).

I want to create a proxy system for a MUD. Normally, a mud client is used to make a telnet connection to a server; my system will sit in the middle acting as a pass-through while interpreting input from both the server and client.

There will only ever be one pair of connections, so at least for the socket management, I don’t need to worry about multiple simultaneous connections. (I think OTP will be useful for data processing where distribution makes sense.)

Using an umbrella project and wanting to have test coverage, does it make sense to have a telnet_client and telnet_server app? Combine them into a single proxy app? What OTP objects and strategies would you use?

Help is appreciated in how best to tackle this problem space and reason about it.

Marked As Solved

LostKobrakai

LostKobrakai

Deciding for multiple OTP applications should imo be made based on deployment circumstances and not code architecture decisions. There’s no real reason to go for multiple OTP applications if they don’t need to be independently deployed or shared between multiple systems – and things will be simpler if you have a single application. And you can always build the project in a way that spliting things up will be mostly moving files around and maybe a few search and replaces.

So unless you plan to deploy the server and client individually I’d suggest keeping things simple and put them in a single application – skip the umbrella.

As for what you’d use out of OTP’ish things I’d suggest looking at thousand_islands(/ranch) for the tcp server (with gen_tcp underneigh) and likely plain gen_tcp for the client side.

Also Liked

krasenyp

krasenyp

I’ve used umbrella applications both in personal projects, early in my career, and in professional setting. They’re almost never a good choice. I second Help with OTP and architectural design for a proxy MUD system - #2 by LostKobrakai.

Where Next?

Popular in Questions Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
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
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
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
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

Other popular topics Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
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

We're in Beta

About us Mission Statement