aseigo
I am finally back with another episode of Exploring Elixir. Sorry for the long wait! My August was split between vacation and starting a new adventure at work, so EE got punted for the month. Back to weekly episodes now though …
In episode 6, we look at using Ecto and Triplex to create multitenant applications. Even for those who have used these tools before, there may be a couple tips in there for you yet, such as how to get the prefix to use from inside a Triplex migration ..
Hope you enjoy, as always!
Trending in Screencasts
Several weeks ago I was nerd snipped by browsers support for View Transitions API and took to myself to see how that goes in LiveView. Af...
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
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
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
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #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)
petersonfs
@kelvinst get a look
kelvinst
Triplex author here! Really glad to see you enjoyed it to the point of making a video using it!
Your video is really awesome! It has a really nice overview for who wonders what does it do.
I was working on an article/tutorial of how to use it (@BarelyFunctional asked for it), but got no time to finish it yet! I promise I’ll work on it soon…
About the use of prefixes on migrations, that’s a nice catch. I actually had this problem but forgot to document my solution. Just a little thing you probably missed: there is a function that gets the prefix of the running migration for you -
Ecto.Migration.prefix/0. It does exactly what you do, but without that much work!Thanks @aseigo for all your work!
aseigo
Dang, I completely missed that somehow. Been there since 2.0 as well! Will update the repo later to simplify with this .. thanks, both for this tip but also the library!
kelvinst
It happens with everyone, more than it should, but that’s the way it is.
You’re welcome!
aseigo
BTW … it is quite difficult to find triplex on hex.pm. It does not mention the magic term “multitenant” or “multitenancy” anywhere in the description, which is probably what many people search for (one such person already popped up in the comments on Reddit, in fact).
hex.pm mangles the markdown in the README.md description which doesn’t help any either. Even then, as someone who did not come to Elixir from Ruby, the reference and link to Apartment didn’t really help me find it, either.
You may wish to consider tweaking the descriptions on github and especially hex.pm to make it more discoverable?
kelvinst
Sure! Any suggestion?
kelvinst
I’ve opened this PR with a new description, what do you think?
https://github.com/ateliware/triplex/pull/39
aseigo
Perhaps something like:
“A simple and effective way to build multitenant applications on top of Ecto. Keep data specific to each tenant (group of users) separate in the database using standard Ecto functions. Triplex includes mix tasks as well as a simple tenant management API to simplify defining and managing tenants.”
?
kelvinst
Looks great! It’s good to have native english speakers that are willing to help! Thanks!
praveenperera
@kelvinst Also adding some more topics on the github repo might help as well. Maybe “multitenant” , "SaaS, “apartment”.