abhinavs

abhinavs

Hi all,

I’m trying to create a business intelligence tool in Elixir. It’s a multi-tenant app, and users can submit their database credentials so that queries are executed on their database. I will also persist these credentials in my own database (by encrypting them)

This might seem a very n00b question - however, I haven’t been able to figure out how to go about doing it.

I did try to see how livebook does it, it seem to be using a library called kino_db which does work for a session. However, I’m not sure if these credentials are persisted and are even used in the background for offline data reporting.

Any pointers on how to go about doing it will be great. To start with I’m willing to restrict the scope to Postgres and BigQuery.

Thanks,
Abhinav

Showing Posts 1 to 4

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Hey @abhinavs can you elaborate as to where you are stuck? Is it the encryption and storage in postgres that has you stuck? Are you unclear on how to use these credentials to start new database connections? What are you stuck on?

abhinavs

abhinavs OP

Thanks for asking. I’m stuck on how to start new database connections.

I’m used to creating the usual Phoenix app in which database configuration settings are provided in the config file. I’m not sure how to create these db connections dynamically (that are user supplied) and maintain them.

I might be overthinking too, however, I have questions about how to manage these separate pools of DB connections, and security practices.

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Gotcha! For starting repos dynamically you can do Replicas and dynamic repositories — Ecto v3.14.0. Depending on what you are doing with those, it may be easier to just use Postgrex directly Postgrex — Postgrex v0.22.2 at that point as well.

BigQuery doesn’t do connections in that same way at all. There you’d be making HTTP requests.

abhinavs

abhinavs OP

Thanks a lot, Ben. Let me explore Postgrex.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
csmr
Hi all, I’m new here and would like to hear peoples views on my Elixir/Phoenix based game-engine! :smiley: Mutonex gamedesign was finish...
New
perzanko
Do we have maintainer of absinthe-graphql/dataloader here? We have a PR that we’d like to merge to the library. Relatively small additive...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
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
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews