Live data from Hacker News

Building a chat app in 8 minutes with Phoenix

elixircasts.io

21–30 of 37 posts

Re: Building a chat app in 8 minutes with Phoenix

#21
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.

You seem to be on the right track. I am sure you'll find success.

Re: Building a chat app in 8 minutes with Phoenix

#23

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 likely want to read this, and my comment there:

https://opkode.com/blog/slacks-bait-and-switch/#comment-3799...

Re: Building a chat app in 8 minutes with Phoenix

#24
post #9

I'm in the very early stages of building what will be a pretty large web app with Phoenix and so far I really like it. I have a lot of prior Rails / Flask experience and minimal Elixir experience but you can still figure things out for the most part. It's kind of funny but, even at this Elixir newbie stage I feel more confident reading and tracing most Elixir code vs Ruby.

Yeah, it's interesting, I've had the same experience. There's not so much magic lurking beneath the surface. Things are relatively easy to track down when you do need to figure things out; otherwise, things are pretty intuitive.

And when it comes to performance, threads and queueing, not having to deal with duct-tape and gum solutions like Resque (Ruby's "One Ring" (I love it and I hate it)) makes such a big difference.

Re: Building a chat app in 8 minutes with Phoenix

#25
post #20

Has anyone used gen stage / flow for their jobs / small - medium projects ? What are some examples where this could be used ? Game server ? I found an example on YouTube about using it in an automation warehouse but that seems too niche to implement

Peter Hastie, of sports-news site Bleacher Report, gave a talk at Erlang & Elixir Factory (2017) about GenStage (and Flow) -- there's a description of the talk and an embedded YouTube video at the bottom:

http://www.erlang-factory.com/sfbay2017/peter-hastie.html

Re: Building a chat app in 8 minutes with Phoenix

#26
post #20

Has anyone used gen stage / flow for their jobs / small - medium projects ? What are some examples where this could be used ? Game server ? I found an example on YouTube about using it in an automation warehouse but that seems too niche to implement

https://www.youtube.com/watch?v=Aa--NDjL9SI

In the talk by Chris Bell, (29:15) they use Flow to migrate millions of records.

Re: Building a chat app in 8 minutes with Phoenix

#27

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…

Phoenix has Phoenix Presence for managing the "Who's online" feature. We use replicated CRDTs to transparently manage the presence state across the cluster: https://dockyard.com/blog/2016/03/25/what-makes-phoenix-pres...

As far as native platform clients, we have all major channel clients covered across community libs – Swift/objc/Java/C#

Re: Building a chat app in 8 minutes with Phoenix

#28

Earlier quoted context omitted.

The build-X-in-low-Y-minutes trope implies that something is trivial to implement (usually by importing middleware that does the heavy lifting). A 30 line class is not trivial.

> implies that something is trivial to implement I don't think it does. It shows something implemented quickly, suggesting that it's a tutorial you can sit down and follow in one go.

Build implies something other than cut-paste or git clone ./make

This title is misleading.

Install a chap app in 8 minutes would be more appropriate, although really it's just sensationalism.

Re: Building a chat app in 8 minutes with Phoenix

#29
post #20

Has anyone used gen stage / flow for their jobs / small - medium projects ? What are some examples where this could be used ? Game server ? I found an example on YouTube about using it in an automation warehouse but that seems too niche to implement

Flow - used it at work for an odd use case where had to merge data from 3 database sources (given to me in csv format) against other data to migrate it. It involved 100s of millions of rows and lots of unknowns so flow was perfect for processing and adaptability whereas spark or many similar solutions felt a bit heavy for the use case.

GenStage specifically: we needed an internal load tester and GenStage plus easy concurrency allowed to quickly build an effective and reliable tool with rate control

Re: Building a chat app in 8 minutes with Phoenix

#30
I cried in pain when I got to securing my app (uberauth, guardian etc). There's too much to grasp and I ended-up just copy pasting code in frustration.

Elixir & phoenix are fun though. I really like how much easier it is to test an elixir app (functional language).

Post reply on HN