Shrike
Hey,
I’m thinking about writing my first Elixir backend server, and I’ve been wondering if I should use Phoenix or a simple cowboy server for it.
What I’m going to do is have a simple api server which queries a db and most probably would send rest requests to another server when needed (this part of the architecture wasn’t decided yet)
This backend server would have to auth and in the future probably authorize users but it won’t handle the user session.
I wonder if Phoenix would be an overkill for such a simple backend server, as from my experience rails is.
Would appreciate any input.
Thanks,
Shrike
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
Anyone here using Honeybadger?
My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of
Bandit.HTTPError...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
Phoenix is primarily a set of plugs (and optionally a nice websocket handler) on top of cowboy, it can be as slim as you want it to be, and as such you should use it, just remove what you don’t need from your
endpointif you so wish, and you can grow it later if you need.Shrike
Thanks for the super fast reply.
It’s just when using ruby I found out that Sinatra was the best fit for this kind of servers, Rails just requires way too much fuss to make such simple severs.
Guess I’m still thinking ruby.
OvermindDL1
Yeah, Phoenix is not at all heavy, it is rather very lightweight, especially as you can pretty trivially pick and choose what of it you want to use. The default generated
endpointis showing off a lot of common features (not even all) and those you do not need to leave in if you don’t need them. Like if you don’t need static file hosting then remove that plug call, or if you don’t need a router then remove that call (finish up with a final single plug or so). Etc… etc… You can pick and choose and mix and match what you want.AstonJ
You haven’t seen nothing yet
According to legendary people like Dave Thomas (i.e PragDave) Phoenix is much more than a web framework
I know I’ve said this a million times on the forum now, but I highly recommend his Elixir course - it blew my mind, and is one of the best courses I have ever done
(In case anyone is wondering, no I am not on commission!! Wish I was though, I reckon I could sell his course all day long no sweat
)
OvermindDL1
Hear hear! It is a whole way of Structuring the program, it is well worth following.
AstonJ
Yup! It gets even more mind-bending when you factor that you can use more than one Phoenix layer in your app - can anyone imagine using more than one Rails ‘app’ in their apps? Nope, neither can I
Shrike
I’ll take your word and go through it before starting the work on the server, hopefully I won’t have to start with ruby and Sinatra and do a move later, time frame is going to be really short for this project.
AstonJ
Nice
I would recommend reading Programming Elixir first if you haven’t, though depending on your experience you may not need to (I would anyway though as it’s an excellent book, as it’s Elixir in Action).
Let us know how you get on
OvermindDL1
If time frame is super short then use what you know. ^.^;
If you want to learn something new, Elixir and Phoenix will get you going with something fast that will run very well though.
Shrike
Well this is going to be my first experience with Elixir but I’m not afraid to try new stuff.
Already did a move from Perl to Ruby without previous experience with Ruby on a production server.
The main decision maker would be how much time I’ll have for this server, Ruby + Sinatra would require a day or so Elixir most probably a week or so.
First iteration of this server wouldn’t need to be prefect it would just need to work and be secure. In the future it would need to be fast, but that’s a problem for the future;)
So the decision would be time, I do know and expect that in the second stage of this project it would need to be lighting fast Elixir is the perfect fit, and I want to have my first experience with Elixir when I can make mistakes and don’t have to worried about benchmarks.