TwistingTwists
Ejabberd vs PubSub - use cases and differences?
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 ?
Most Liked
hauleth
These are completely orthogonal things.
- XMPP is a protocol, just like HTTP or WebSocket
- ejabberd is an implementation of server for such protocol in Erlang. Just like Cowboy is an implementation of server for HTTP/WebSockets.
Phoenix.PubSubis an helper library for exchanging messages between Erlang nodes.
It is not comparable at all.
hauleth
No, Phoenix.PubSub do not use WS, it do not use Phoenix at all. It is my biggest gripe with that library, that there is phoenix in its name. It is completely independent from any web or Phoenix technology. It uses defined transport (by default pg which 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
Last Post!
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.PubSub is a solution.
Popular in Questions
Other popular topics
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
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









