ETS in Phoenix

I am new to Phoenix.
I wanted to make use of ETS tables in my application. Basically, when a user joins a channel its details are stored in the table.
So basically when the user tries to Join the channel the table is already present.
Where should I create this table ?

1 Like

AFAIK there’s not a problem with creating it on your application start callback (lib/myapp/application.ex), if it should be destroy/recreated when a certain process is, then on that process initialisation would be more fit, it depends.

I’ve used in application start callback and it has worked fine for its purpose. Again depending on why you need it you might be re-doing something that already exists with registries, presence, etc