Live data from Hacker News

Building a chat app in 8 minutes with Phoenix

elixircasts.io

11–20 of 37 posts

Re: Building a chat app in 8 minutes with Phoenix

#11

You can't do a build-X-in-low-Y-minutes trope when X involves implementing 30+ line classes. EDIT: This comment was not appropriate, I apologize.

Seems more like a succinct tutorial vs a "look how easy and fast this is". There are definitely alternatives with less code.

Re: Building a chat app in 8 minutes with Phoenix

#12

Great screencast, Alex! The best tools are the ones you don’t even notice, and Elixir is an absolute pleasure. You get to focus on the problem with little ceremony. Chat is a really interesting application of Channels, too. It’s especially interesting to me as my team and I are working on a hosted API called Chatkit that makes it equally easy to add real-time chat to your applications, no matter what technology you’r…

Libraries exist for Swift and JavaScript for sure but honestly the implementation in vanilla JS wasn’t that hard.

Re: Building a chat app in 8 minutes with Phoenix

#13

Great screencast, Alex! The best tools are the ones you don’t even notice, and Elixir is an absolute pleasure. You get to focus on the problem with little ceremony. Chat is a really interesting application of Channels, too. It’s especially interesting to me as my team and I are working on a hosted API called Chatkit that makes it equally easy to add real-time chat to your applications, no matter what technology you’r…

You should read Discord’s experience with Elixir if you haven’t already [1]. They didn’t use Phoenix channels though AFAIK.

Also the Phoenix channel implementation uses CRDTs behind the scenes from what I gather. They make problems like user presence much more tractable [2].

1: https://blog.discordapp.com/scaling-elixir-f9b8e1e7c29b 2: https://github.com/phoenixframework/phoenix/blob/master/guid...

Re: Building a chat app in 8 minutes with Phoenix

#14
I’ve been writing an API in Phoenix for a high message volume high user count application and it’s pretty amazing how little code I have been writing thus far.

Some concepts are a bit weird like GenServer but it completely decouples your application from your state.

Writing tests was intuitive and one of the few times I’ve been doing TDD that really felt faster than manual testing.

Re: Building a chat app in 8 minutes with Phoenix

#15
post #14

I’ve been writing an API in Phoenix for a high message volume high user count application and it’s pretty amazing how little code I have been writing thus far. Some concepts are a bit weird like GenServer but it completely decouples your application from your state. Writing tests was intuitive and one of the few times I’ve been doing TDD that really felt faster than manual testing.

Elixir turns from wonderful to magical once you grasp the GenServer concept and learn about its extensions, namenly GenStage. The producer/consumer pattern and the back-pressure logic will allow you to build incredibly scalable, resilient systems. When I first saw it in action, I was mesmerized.

Re: Building a chat app in 8 minutes with Phoenix

#16
post #14

I’ve been writing an API in Phoenix for a high message volume high user count application and it’s pretty amazing how little code I have been writing thus far. Some concepts are a bit weird like GenServer but it completely decouples your application from your state. Writing tests was intuitive and one of the few times I’ve been doing TDD that really felt faster than manual testing.

Just finished reading "Functional Web Development with Elixir, OTP, and Phoenix" and I really like it. It gave me a better understanding of GenServer/OTP:

https://pragprog.com/book/lhelph/functional-web-development-...

Re: Building a chat app in 8 minutes with Phoenix

#18

Great screencast, Alex! The best tools are the ones you don’t even notice, and Elixir is an absolute pleasure. You get to focus on the problem with little ceremony. Chat is a really interesting application of Channels, too. It’s especially interesting to me as my team and I are working on a hosted API called Chatkit that makes it equally easy to add real-time chat to your applications, no matter what technology you’r…

Thanks! I'm glad you liked it.
Post reply on HN