Earlier quoted context omitted.
Are there any good tutorials to get started? What major sites are currently using Elixir?
The Elixir video courses at https://pragmaticstudio.com/ are the best available, in my opinion. There are some free tutorials available and some other good paid courses, to be sure, but I think Mike and Nicole over at Pragmatic Studio offer the most complete and easy-to-follow courses available. The cost-to-value ratio of their courses is really good, I think. I'm not affiliated with them in any way. I'm just a happy…
Build a real-time Twitter clone with LiveView and Phoenix 1.5
71–80 of 249 posts
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#72We are really excited about this release! I also wanted the screencast to be a single take, so I'm happy to answer questions if there are gaps to fill in for things I could have explained more clearly.
How does reconnection work? lets say someone is using the site, and you do a deployment, rolling the nodes over. Does live view simply reconnect to another node without any interruption from the user's perspective?
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#73We are really excited about this release! I also wanted the screencast to be a single take, so I'm happy to answer questions if there are gaps to fill in for things I could have explained more clearly.
I'm especially invested in this since I've just rolled out an alpha of a project that may incorporate it in the future: https://phoenixigniter.com
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#74Earlier quoted context omitted.
You are running this on localhost but won't interactions be slow if a user is 200ms from the server? Re-rendering templates every time on things that require high interaction also seems very expensive and an easy way to slow down your server when you have multiple users correct? or what I'm missing?
LiveView does not re-render the template on every interaction. LiveView actually sends patches over the wire, which is typically smaller than a hand-written JSON response. The screencast linked above has a good example of this, where clicking the "retweet" button sends a minimal payload, since we know the exact position on the page. LiveView also uses a long-running WebSocket connection and that reduces the amount of…
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#75I've been writing code for close to 10 years now and I see this and feel like what a beginner would feel trying to understand assembly code. Or someone hearing a similar but new language. Looks to me hours of work and learning got abstracted as under the hood "magic". It's like saying: Oh, so I've been weight training for the last 17 years and I should tell you Olympic silver is not too hard, see? Am I right in my th…
There's no magic. It's functionality that's made possible by the BEAM. It's just one of those things that came out of realizing how powerful the runtime was for handling certain types of problems. When you combine a couple of those bits together, you end up with this. The only modern web problem that Elixir isn't ideally suited for is heavy number crunching. Otherwise it gives this amazing balance of efficiency, scal…
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#76Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#77I used liveview in https://readastorytome.com. I posted it here last week and it stayed on the front page for a good few hours. I was concerned about load, so before I posted it I upgraded my $5 DO box to a 4 core box which turned out to be completely unnecessary. The CPU load stayed in the 2-3% range the entire time it was on the front page, which is pretty amazing considering how much traffic was coming in. Funnily enough I came across the livedashboard repo just before I posted it, so I set it up and I was using it to monitor my app live while it was on the frontpage of HN.
The dev experience is pretty amazing - I don't think I would have been able to write this app as quickly and to add new features at the pace I have been in any other language.
So thank you Chris, Jose and the Phoenix/Elixir team.
If anyone has questions about my experience with liveview free free to ask - either here or by email - ben@readastorytome.com
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#78I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…
> When I say perfect, I mean, there has been never once in my career where I hit a roadblock due to the language's limitation or complexity or flawed assumption. I faced this with other languages, but not Elixir. This is pretty amazing praise! Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot f…
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#79Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#80I have been watching Phoenix/Elixir for a while and wondering if it has gained a lot more traction compared to say 2 years ago ? My choice of full web app framwork is Symfony/Laravel (PHP) or Python (Flask/Django) but I really like what Phoenix has to offer. However, does it have a mature ecosystem now ? What about deployments and tools around it ? Does it work with generic web servers like Nginx or does it run its o…
I've done plenty of Django and Flask and I'd rather work with Phoenix. I still like Django plenty but only time I'd pick it is if I think the admin might save me copious time or if there is something else tying the project to Python, such as machine learning.