TwistingTwists
I know that Whatsapp uses some custom implementation of ejabberd. - which is used for messaging between two clients.
Since Phoenix PubSub also has that bi-directional communication over websockets,it CAN work be used in realtime (soft realtime, not accurate to the 1/100 of a second) .
I am confused between XMPP vs Phoenix PubSub. My questions are ![]()
- For what use cases XMPP is strictly better than Phoenix PubSub?
- What are the differences between ejabberd vs Phoenix PubSub ?
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
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
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
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #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)
hauleth
These are completely orthogonal things.
Phoenix.PubSubis an helper library for exchanging messages between Erlang nodes.It is not comparable at all.
TwistingTwists
Thanks for clarification.
I guess my question is :
cmo
Check out the docs for PubSub and Channels. I think you may be conflating the two.
hauleth
No,
Phoenix.PubSubdo not use WS, it do not use Phoenix at all. It is my biggest gripe with that library, that there isphoenixin its name. It is completely independent from any web or Phoenix technology. It uses defined transport (by defaultpgwhich uses Distributed Erlang), but it can use any other messaging technology out there.These also are orthogonal. WebSocket is more like transport protocol (like TCP, but a little bit higher level as it utilises TCP underneath) and XMPP is data protocol (more like HTTP).
Technically - yes, but it would be IMHO a little bit pointless, as it would introduce a lot of overhead with encoding and decoding all that XMLs. So instead it would be better to use for example Kafka or PostgreSQL
LISTEN/NOTIFY.TwistingTwists
I will read more about protocols.
Thank you so much for clarifications.
derek-zhou
I sense some X/Y problem here. It would probably be better if you state what objective you want to achieve first, so other people can make recommendations for you to choose from.
TwistingTwists
Thanks @derek-zhou
Indeed an X/Y problem. (thanks for naming it for me)
What I wanted - to make a simple chat application. with tracking.
I already achieved chat and tracking using
Phoenix.Presence.Then I came across ejabberd. And was confused as it also enables chatting and messaging. I did the same thing without it.
Why would I need to use ejabberd at all ?
Why bother with XMPP ? Phoenix uses websockets which are working great for me sofar.
Ejabberd felt like something ‘meant for’ chat application and I am completely unaware about why or why not to use it instead of simple phoenix app.
derek-zhou
Ejabberd or XMPP in general is meant for an industrial strength chat application with a rich and extensible set of functionalities, on a federated network governed by multiple entities. You may or may not need that.
Using Phoenix Liveview one put together a simple chat application quickly. I have one too:
I do not even use PubSub/Presence. There is more than one way to do it
TwistingTwists
What is a good indication that one needs to use ejabberd and it gives some clear benefits to other approaches ?
hauleth
When you need protocol (because you want to exchange messages with systems that are out of your control) go with ejabberd. If you want internal system communication then
Phoenix.PubSubis a solution.