phunsukh1

phunsukh1

Hi all,

I’m experimenting with using Bandit as the webserver and Postgrex directly for a REST API without any framework layer.

Background:

We have an older app with a lot of plain SQL that we want to transition incrementally. Keeping SQL as-is to reduce risk.

Our VP wants the team to learn Elixir and OTP, and he has a strong philosophy: you should know every line of code you write — no abstractions. Phoenix would be nice, but right now it’s not an option.

Is anyone running Bandit + Postgrex directly? If so, any tips on:

· What to look out for
· Issues you faced
· How you manage the connection pool

Thanks!

Showing Posts 1 to 10

FlyingNoodle

FlyingNoodle

I have a strong philosophy too:

If some higher up would tell me something like this I would update my CV and start looking.

phunsukh1

phunsukh1 OP

That’s an interesting take, though I’m really trying to gather practical insights about this approach rather than broader philosophy.
Any technical feedback would be helpful.

kevinschweikert

kevinschweikert

I understand that Phoenix does a lot for you but you could you at least consider using

FlyingNoodle

FlyingNoodle

OTP is already an abstraction. So why are you allowed to use OTP but not phoenix? Why not reinvent OTP as well while you are at it?

The point I’m trying to get across is that this endeavor will not be fruitful, and you will end up building a half-baked, semi broken version of phoenix. Critically: one that was built by a team who just learned Elixir.

Does that sound like a recipe for success to you?

phunsukh1

phunsukh1 OP

Thanks for the input. I think we’re working from different assumptions, so I’ll leave it there and focus on the technical side.

phunsukh1

phunsukh1 OP

Thanks for the suggestion — we’ll definitely explore Plug and see how it fits our setup.

LostKobrakai

LostKobrakai

Bandit only works with plug for handlers anyways. It doesn‘t have a separate bandit specific handler abstraction.

I‘d still go with ecto, even if you just use it as a means of having a repo to issue sql queries against. But it‘ll be a less harsch to move once you want to use more of the toolkit

hauleth

hauleth

That is stupid philosophy, because that is the reason why we have programming languages - to have abstractions. In modern computing it is that even when you write assembly directly you are using some form of abstraction on top of “real hardware” because of microcode.

Abstraction is there to make expressing ideas easier rather than focusing on internal workings of the stuff. Digging too much into details of how stuff works IMHO sometimes may harm your creativity, expressiveness, and sometimes even performance of your system.

NobbZ

NobbZ

NIH-syndrome?

To be honest, this philosophy usually ends up in having to keep more in the head than just using phoenix.

Sure, using “vanilla bandit” will also work, though depending on the scope of the application, you will eventually ending up writing your own abstractions, which any new team member had to learn, making their onboarding more complicated.

While with phoenix, you can just assume, developers know it, or will at least be able to a “blog in 15 minutes” tutorial before having their first day (or even. on their first day) and be able to understand the most important concepts.

phunsukh1

phunsukh1 OP

Edit:

Thanks everyone for the responses — I want to clarify the context. We’re exploring a greenfield Elixir service alongside our existing homegrown C application with embedded SQL. The team comes from that codebase, so auditability and traceability are baked into how we work. Keeping the stack small is a deliberate choice, not a gap in awareness

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
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
RemyXRenard
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
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
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
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews