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

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
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
RemyXRenard
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
velrest
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
samoloth
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
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
FlyingNoodle
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

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews