Live data from Hacker News

Elixir web development 101: collaborative todolist with realtime updates

blog.openbloc.fr

81–90 of 97 posts

Re: Elixir web development 101: collaborative todolist with realtime updates

#81

I'm so excited about Elixir these days. I would love to see more cookbook examples of using Elixir but NOT as a Ruby/Rails replacement. While the concept is not new to me, I have recently become totally infatuated with the concept of green threads, actor models, etc... for dealing with concurrent processing. This is literally what Erlang was designed to do, and Elixir makes it user friendly. The real beauty of Elixir…

Phoenix is frankly a lot more than Rails. If you pop open observer on a running phoenix app (:observer.start), you'd see that it's actually a collection of dozens of processes. The power of phoenix is that it's really just those processes running on BEAM in a dependency tree, so you can easily extend that and add more processes to the startup list. My phoenix app that's running in production isn't just a rails replacement; it also has long-running genserver processes for caching, communicating with key/value stores, etc, with supervisors to recover gracefully from crashes.

If you're looking for cool Elixir applications that aren't web-oriented, look into the Nerves project (http://nerves-project.org/).

Re: Elixir web development 101: collaborative todolist with realtime updates

#82
post #22
post #10

Non-representative anecdote : i've recently heard of two teams that started using elixir, they both came from a ruby background, and in both case they weren't using OTP. They both justified using elixir because it was "closer to ruby" (???), and they both seemed to live a pretty difficult time with that language. Which makes me wonder : why would you ever want to use such a special language (purely functional isn't f…

I've seen a few (as in 2 ;) ) examples of this myself. And this is what "scares" me the most for elixir's future/potential. I think it's a great language/tech but ruby enthusiasts rushing into it thinking that it's "just like ruby but faster" may have a very bad influence on where the language goes. They may bring a lot of ruby best practices that don't transpose at all in elixir/erlang world.

It's worth pointing out Jose Valim both created and maintains the language, and he's a core team member of Rails. He knows what to take and what to leave behind from Elixir, and has been incredibly thoughtful so far.

I'm very confident in his stewardship.

Re: Elixir web development 101: collaborative todolist with realtime updates

#83
post #80

I'm so excited about Elixir these days. I would love to see more cookbook examples of using Elixir but NOT as a Ruby/Rails replacement. While the concept is not new to me, I have recently become totally infatuated with the concept of green threads, actor models, etc... for dealing with concurrent processing. This is literally what Erlang was designed to do, and Elixir makes it user friendly. The real beauty of Elixir…

> The real beauty of Elixir/Erlang is being able to run hundreds of thousands of concurrent "threads" Erlang's units of concurrency are processes, not (green) threads. Unlike threads, they are completely isolated from each other. > (co-operative in userspace, not OS-level). Erlang's scheduler is preemptive, which means it has the ability to context switch between tasks without cooperation at any time. > etc... for de…

Elixir is a lot more readable for newbies (especially people with a Ruby background), which is what I assume they mean by "user friendly". Elixir also has some nice libraries as well... one I've been digging into recently is GenStage, which gives you a way to organize process communication sort of like a conveyor belt, except that processes request more work from producers, allowing you to build a system that isn't going to break down as processes get overwhelmed.

Check out Jose's talk on it: https://www.youtube.com/watch?v=XPlXNUXmcgE

Re: Elixir web development 101: collaborative todolist with realtime updates

#84
post #66

Earlier quoted context omitted.

>I would love to see more cookbook examples of using Elixir but NOT as a Ruby/Rails replacement. I would love to see more examples that get away from web dev with Elixir. While it's great with the Phoenix framework there is so much more to Elixir than that. Trying to deploy an elixir daemon has been a pain and I haven't found much around that. There is escript and distillery and while I haven't tried distillery for n…

FWIW, deploying a non-Phoenix app with distillery is exactly the same as deploying a Phoenix app.

Thanks, I wasn't sure if that was the case.

Re: Elixir web development 101: collaborative todolist with realtime updates

#85
post #78
post #66

Earlier quoted context omitted.

>I would love to see more cookbook examples of using Elixir but NOT as a Ruby/Rails replacement. I would love to see more examples that get away from web dev with Elixir. While it's great with the Phoenix framework there is so much more to Elixir than that. Trying to deploy an elixir daemon has been a pain and I haven't found much around that. There is escript and distillery and while I haven't tried distillery for n…

Setup deployment takes some time so I prepared blog post and an example Phoenix app how to do it with edeliver, distillery and Ansible playbooks http://blog.lunarlogic.io/phoenix-app-deployment-with-ansibl... We spent some time with friend doing research and trying to connect all pieces to make it work.

Thanks for the link, but the issue is deploying non-phoenix apps. There are tons of documentation (well relatively tons) on Phoenix app and deployment but console apps in Elixir have very little around that I have found.

Re: Elixir web development 101: collaborative todolist with realtime updates

#86

If you're doing development with a web socket layer, it's entirely worth it to try out Phoenix Channels before you commit to another stack. It makes your life so much easier. There are a lot of other great reasons to use Elixir though.

The difficulty is finding good Dev teams building Elixir as Elixir and not second rate Ruby on Rails refugees looking for a faster Rails a-la Phoenix.

I've met a lot of extremely talented Elixir devs, and Elixir enthusiasts who're eager to work with the language full-time. You're actually in a really good position if you're looking to hire Elixir devs, because there's more excitement around the language than open jobs for it.

Re: Elixir web development 101: collaborative todolist with realtime updates

#87
post #23
post #13

Earlier quoted context omitted.

I'm guessing what they really meant is "it's close to rails" since the same people made both rails and phoenix AFAIK.

Some of the main contributors - starting with J Valim - were core ruby contributors I think.

rails contributors actually, the core ruby contributors are all japanese afaik

Re: Elixir web development 101: collaborative todolist with realtime updates

#88
post #66

I'm so excited about Elixir these days. I would love to see more cookbook examples of using Elixir but NOT as a Ruby/Rails replacement. While the concept is not new to me, I have recently become totally infatuated with the concept of green threads, actor models, etc... for dealing with concurrent processing. This is literally what Erlang was designed to do, and Elixir makes it user friendly. The real beauty of Elixir…

>I would love to see more cookbook examples of using Elixir but NOT as a Ruby/Rails replacement. I would love to see more examples that get away from web dev with Elixir. While it's great with the Phoenix framework there is so much more to Elixir than that. Trying to deploy an elixir daemon has been a pain and I haven't found much around that. There is escript and distillery and while I haven't tried distillery for n…

Hey, I've went through the "trouble" of using continuous deployment with elixir and distillery.

Since the project I'm working on is open source, you can see how I've done it. It's still far from perfect but maybe it could be a place to start.

Elixir app is on https://github.com/hackerexperience/helix. You'd probably be interested on `lib/release.ex` and `rel/`.

For the ci, our infrastructure playbooks are at https://github.com/hackerexperience/infrastructure, and you probably want to look at `roles/{helix, erlang, elixir}`.

Hit me up if you have questions our would like to discuss further. Email is on profile.

Btw, here's a great presentation about the topic: https://youtube.com/watch?v=H686MDn4Lo8

Re: Elixir web development 101: collaborative todolist with realtime updates

#89
post #66

Earlier quoted context omitted.

>I would love to see more cookbook examples of using Elixir but NOT as a Ruby/Rails replacement. I would love to see more examples that get away from web dev with Elixir. While it's great with the Phoenix framework there is so much more to Elixir than that. Trying to deploy an elixir daemon has been a pain and I haven't found much around that. There is escript and distillery and while I haven't tried distillery for n…

Hey, I've went through the "trouble" of using continuous deployment with elixir and distillery. Since the project I'm working on is open source, you can see how I've done it. It's still far from perfect but maybe it could be a place to start. Elixir app is on https://github.com/hackerexperience/helix . You'd probably be interested on `lib/release.ex` and `rel/`. For the ci, our infrastructure playbooks are at https:/…

Thanks for this, I'll take a look and definitely hit you up if I have questions.

Re: Elixir web development 101: collaborative todolist with realtime updates

#90

Earlier quoted context omitted.

Do you use Absinthe?

Hey! Yup I'm actually one of the co-authors of Absinthe. Got any questions?

That's HN for you. I should have realized after I looked over issue 156 this morning. No questions, I was just curious about experiences with it and wanted to see if that's what you were referring to. Thanks for releasing it, I can't wait to try it out.
Post reply on HN