meraj_enigma

meraj_enigma

Elixir/Phoenix Channel based chat application

Hello,

I am currently investigating into writing a real time chat application in Elixir/Phoenix. I have a few queries before I jump into choosing a particular technology. Please see and answer my below queries -

  1. Is WebSocket the standard for writing real time chat applications or can I use gRPC or is there any better transport mechanism?

  2. How does Elixir/Phoenix Channel compares to other technologies or services like

    • Firestore
    • Pusher
    • Anycable
    • Action Cable
  3. If I decide to go with Elixir/Phoenix Channel, how can I run multiple instances of chat application on Kubernetes pods? Can someone points me to any document/article on this deployment part?

  4. Is there any hidden problem using WebSocket with multiple instances of chat applications that I should know about - like security/stability/scalability/performance?

Awaiting some response.

Thanks,
-Meraj

First Post!

meraj_enigma

meraj_enigma

Came across this article - WebSockets, caution required!

Even though a bit old would like to know where WebSockets in general but Phoenix Channels in particular stands with respect to the views expressed in above link.

Thanks!

Most Liked

kokolegorille

kokolegorille

Websocket is one of the reason why I started Phoenix, coming from Rails…

1 If You use Phoenix, it might… but You can use other protocol
2. Firestore. Pusher. Anycable are all external services. Actioncable… Phoenix channel, hmmm, cannot be compared
3. Distribution is one aspect of the BEAM, but it’s not easy to setup
4. Websocket is just the transport

Sorry to tell, but a chat app is just the hello world application in Phoenix. If Rails promotion video is about building a blog in 15 minutes, Phoenix one could be how to build a chat in 15 minutes.

Websocket is just the transport, but Elixir has building blocks for chat application.

You should really try to build one. And You will see it’s easy because of the tools the BEAM provides.

There was a lecture about building a chat in Erlang before Phoenix even existed, unfortunately it is outdated now.

https://pragprog.com/screencast/v-kserl/erlang-in-practice

The article You posted is about Ruby…

Update: I guess You can make it in less than 15 minutes… :slight_smile:

meraj_enigma

meraj_enigma

Hi @kokolegorille, thanks for your reply.

Regarding point 3 - I have come across the below articles -

Looks like using Redis Pub/Sub it’s not that complicated to setup. However, using PG2 adapter can be a bit complicated.

Thanks.

kokolegorille

kokolegorille

These posts have been made by @alvises :slight_smile:

Last Post!

alvises

alvises

I’d suggest to go for, at the beginning, with the default PG2 adapter avoiding to maintain a redis server as well.

Where Next?

Popular in Questions Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130579 1222
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44608 311
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44167 214
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement