meraj_enigma

meraj_enigma

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

Showing Posts 1 to 8

meraj_enigma

meraj_enigma OP

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!

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 OP

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:

meraj_enigma

meraj_enigma OP

Thanks for the great articles @alvises

sb8244

sb8244

Author of Real-Time Phoenix

WebSocket is a great transport mechanism and is what I’d recommend generally across the board today. Phoenix has its own protocol on top of WebSockets, but you could implement something like gRPC messages if you wanted. I have never needed to do that.

Redis PubSub works great, but I wouldn’t shy away from the out-of-the-box pg implementation. It’s really not bad to setup in Kubernetes.

There can be lots of caveats with any technology, WebSocket included. Real-Time Phoenix tries to capture those gotchas as much as possible.

meraj_enigma

meraj_enigma OP

Thanks @sb8244. I agree with you. I will try to read your book :slight_smile:

alvises

alvises

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

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
Blokh
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
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
kszambelanczyk
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
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews