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

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
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
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
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
wernerlaude
In AR this is so simple @articles = current_user.articles How to do in Ecto? def index(conn, _params) do current_user = conn.assig...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
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
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
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
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
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