yolo007wizard

yolo007wizard

Single File Elixir Architecture

I just discovered single file Elixir scripts and its love at first sight:
https://github.com/wojtekmach/mix_install_examples/

Crazy how simple and OP these look. Now I’m wondering how far it can go.

I’m imagining these script files as serverless functions, and then have a pub/sub queue route events to them for an event processing system. Bad or elegant? What are trade offs with performance and traditonal mix app etc?

Most Liked

lud

lud

There is basically no difference between single or multiple files. Calls to functions from the same module are faster than calls to other modules but it is not really important.

If you have 10k lines of code in your file you will probably have several modules, so you’d better split the file for the codebase to be clean.

There are many solutions to write an event processing system in elixir, but I doubt using serverless functions would be very interesting. This is more a Node/PHP thing.

Where Next?

Popular in Discussions Top

PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
eteeselink
Hi all, In the last days, two things happened: A blog post titled “They might never tell you it’s broken” made the rounds. It’s about ...
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement