gokdenizozkan

gokdenizozkan

How do I start reinventing the wheel by writing a simple web server, but not too low-level and still stay safe?

Hi people,
I hope you are doing well. I am new to Elixir, and I was intrigued by it when I watched a conference on how Elixir operated, and is able to serve high amount of requests, practically all at the same time and isolating them.

I want to tinker with Elixir, and I have two projects to tackle. One is simple, the other one is… probably not.

One of them is to develop an API consumer and send emails if certain conditions are met. No UIs. Pure logic.
The other one is a server for a small game I will make.

All of them are hobby projects. My main goal is to use and explore Elixir, and deepen my knowledge in networking. I like to reinvent the wheel until I feel some level of competency to start using abstractions/frameworks and stuff. I need suggestion on whether I should use a particular framework or not, and if I should, which one. But before going into that, I will share a quick background info about me:

  • I am a web developer working professionally for 1.5 years with C# ASP.NET WebForms, and .NET Core.
  • I know how to write Java, and Java Spring Boot.
  • Used Ruby, Rails, and Python before. (Though I have not used them for a while now.)

There are frameworks like Phoenix, and Ash. Since this is a hobby project, and my main goal is to deepen my skills and knowledge, maybe they are not a good fit. I have seen people suggesting to use Plugs, or Cowboy. Cowboy seemed interesting, but cannot tell if it is the right direction.

I desire to make things from scratch, but I feel like going too low-level would deter me. It is a matter of personal taste, I know, but I would like to get your suggestions.

Thank you for any insight you could share!

Most Liked

LostKobrakai

LostKobrakai

There’s a great video series by Andrea Leopardi if you want to get into lower level networking (tcp/udp):

He also has a book on the topic.

derek-zhou

derek-zhou

Welcome. I like to re-inventing wheels too; however, I prefer to understand how the existing wheel works first. For example, I still use Phoenix, but I have replaced many functionalities of Phoenix with my code to scratch my itches.

IloSophiep

IloSophiep

Slightly different but if you don’t really care about the “end result” but just want to experiment with some building blocks:

It might be fun to just build a simple TCP server and play around with that and “actors” and (binary) pattern matching. That’s basically a web server, isn’t it? Can go as simple or as hard with your network protocol as you like.

Should give you a sense of how programming and building something like that works out in Elixir.

Something similar is actually one of the introduction chapters of Elixir and specifically Mix / OTP: Task and gen_tcp — Elixir v1.20.2

Where Next?

Popular in Discussions Top

hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New
blackode
Elixir Upgrading is so Simple in Ubuntu and It worked for me Ubuntu 16.04 git clone https://github.com/elixir-lang/elixir.git cd elixir...
New
Qqwy
I would like to spark a discussion about the static access operator: .. For whom does not know: it is used in Elixir to access fields of...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19327 150
New
andre1sk
A big advantage to Elixir is all the distributed goodness but for many applications running on multiple nodes having integrated Etcd, Zoo...
New
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14027 124
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

Other popular topics Top

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
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
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
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
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
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
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement