Qqwy
I am creating an app where people can create items and put them into collections.
To give it a ‘single page app’-like feel, I want people to be able to click on an ‘edit’ icon and edit and update one of the items in-place.
Now there is a choice here to use AJAX to do the updating behind-the-scenes, or to use Phoenix Channels.
One advantage that channels might have, is that a user could listen to each item’s topic, and also be notified when another user makes a change in one of the items.
However, the application will contain hundreds of items per collection, meaning that users might subscribe to many, many topics while they browse through a collection. Would this pose a problem?
Also, I wonder what the best way would be to serialize a form while using Phoenix Channels.
What is the better option here?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex











Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
Each topic subscribed from a Phoenix Channel is a new process, so keep that in mind.
What I’ve done is have a single manager process, but the webpage sends messages to it saying ‘I want to be subscribed to this information’, it then internally calls
MyEndpoint.subscribe/3for each appropriate thing, which then all binds to ‘this’ one process, so no process spam then. I wish there were an interface to simplify this pattern as I use it a surprising amount, but it is very easy to do as it is.You can get a json of the form information via javascript, easy to pass that back over then.
You can even call that one parse function on
Plugto have it parse its special list and such syntax too.