D4no0

D4no0

Moving roles to postgres

I was watching this conference and I was wondering if that approach is really more scalable. In that conference the guy shows an approach where you migrate all logic related to roles and the data that can be accessed to postgres. In my opinion the downsides are:

  1. Harder to migrate new changes on an existing database.
  2. Writing raw queries in SQL.
  3. Debugging queries(since I didn’t try it, I’m not sure if ecto logs the trasnaction correctly)
  4. Possible performance degradation.

However there are some big advantages also:

  1. Move all the logic related to roles to postgres.
  2. Clear readable code without convoluted queries.

So my question is: would you move your roles logic to postgres, and if no why?

Most Liked

Last Post!

tjdam

tjdam

I just found this talk and it blew my mind. I wasn’t even aware that Postgres had all of these features (newbie here).

So the first thing he says is that hopefully you create a role for your application, which most people don’t. I’ve been using the postgres default, as he mentioned. What is the issue with that, though? And what would be a better approach to take?

Where Next?

Popular in Discussions Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
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
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
crispinb
On reading dhh’s latest The One Person Framework it strikes me that Phoenix with LiveView is already pretty much this. However, never hav...
New
matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New

Other popular topics Top

New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
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
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
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42576 114
New

We're in Beta

About us Mission Statement