Is Elixir / Phoenix ready for production?

Hi,

I started learning Elixir 2 months ago by reading Programming Elixir 1.3. I want to learn Elixir not to get a job but to build my first web app from scratch.
This is the stack I consider (first iteration) :

  • Front-End : Vue JS;
  • Data Base : PostgreSQL;
  • Back-End : Elixir and Phoenix.

Those are the main functionalities :

1 - Authentications and Authorizations (Admins, Moderators, Normal users, Premium users);
2 - Publish, Edit and Delete posts ;
3 - Search Box for posts and profils + filters ;
4 - Ranking and Rating of Profils ;
5 - Download and Upload Files ;
6 - Reply to the posts (messages + attached documents) ;
7 - Classify posts into categories and by targeted localisation (Country / City).

Do you know what are the ressources (books, online videos) that can help me learn how to build this web app ?
I mean what should I do next after learning Elixir syntax and how ?
Should I build this using phoenix as a back-end ? or maybe concurrency and distrubuted systems technologies are not required for this web app ?
Because I have read in many posts how much learning OTP is needed. I’m afraid to add complexity, especially that my friends told me this would be possible using Django and that in long-term it will be easy to find many developpers with python knowledge and less with Elixir and OTP skills.

1 Like

@younes-alouani I think it’s absolutely ready.When I started learning Elixir/Phoenix I was thinking the same.The best way is to code something and try it for yourself.I am running newsofworld.org . It’s a horribly coded app but it works.I had never launched a site before until now.And now i have started delving into Erlang.

2 Likes

I don’t hear about many people taking the path from Elixir to Erlang. How’s that going for you? (seriously. would be interested in your impressions)

2 Likes

The more time i am spending looking into Erlang the more I am loving it.A lot many libraries use Erlang libs underneath.To understand it all I am learning Erlang.

3 Likes

Plus you can start to see how the Elixir compiler generates the erlang output equivalence. :slight_smile:

3 Likes

@OvermindDL1 hate myself for not having looked into Erlang before

2 Likes

I think it also helps qualify what is “new” in Elixir/Phoenix/… . So while the Elixir language and standard libraries may be considered “new”, well not really as Elixir has been around for quite a while now, the Erlang/OTP system on which it is built is quite “old”, though I prefer to call it “classic”. :wink: This means that you can depend on the system building stuff, and I would trust the Elixir language as well. Phoenix is getting on in age as well. How you feel with a library released “yesterday” is another matter.

6 Likes

I see there are alot company using elixir in production. But for u that will last problem if u are new to programing

I started to learn programing 8 month ago for my project as u. If u dont have any programing experience i advice to learn more mature programing language as ruby. Because you will have really odd questions as me.Most important thing is thinking as programmer not syntax or etc… In elixir can be hard to get answers. But on the other hand forum is really helpfull to odd questions.

2 Likes

Very well put, learn programming, and not writing language X code. :slight_smile:

2 Likes

No one answers to my questions :sweat_smile:

1 Like

If you are learning and you got time for it just do your project step by step parallel in both: Phoenix and Django (probably your friend got experience in Django so he could help you in learning). It will be fun and you will learn a lot. After that you will choose what you like better.

And do not afraid of OTP, it’s just some simple abstractions which can only help you.

2 Likes

@younes-alouani start with elixir-lang.org and then www.phoenixframework.org…both are good to get started

1 Like

I highly recommend the Elixir for Programmers course by PragDave. It gives you a great framework for building a well designed, modular application in the vein of Phoenix is Nor Your Application.

For books I would recommend Programming Phoenix

Many other resources can be found in this thread.

Start building your app!

This is definitely a good fit for Phoenix. I don’t think you will need much concurrency or distributed systems for this app until you get to a serious scale (that the vast majority of projects never make it to).

Similar to the last question I don’t think you’ll need to worry very much about OTP until you start having a need to scale your app.

Overall I think you are on the right path, especially if your goal is to learn as well as to build this app. The stack that you mentioned looks good as well.

5 Likes

See: Paul Graham: Beating the Averages and Y Store now C++ (2003)

A rewritten version (C++ and Perl) just launched in Jan. However,

  • The reason they rewrote it was entirely that the current engineers didn’t understand Lisp and were too afraid to learn it.
  • The resulting program is a new world’s record case of Greenspun’s Tenth Rule. The Yahoo Store Editor called compile at runtime on s-expressions made on the fly. To translate this into C++ they literally had to write a Lisp interpreter.
  • Even then, they had to drop some features (involving advanced uses of closures).

However the opposite happens as well: Outlyer moved from Python/NodeJS to Erlang.

2 Likes

Younes, you won’t need to fiddle too much with OTP-specific things in order to implement this scope for sure. You can get progressively into the more hardcore stuff, willingly :slight_smile:

You started with a great book! What I’d suggest to you next is the phoenix docs :+1:

1 Like

I learned elixir by creating a site that pretty much has most of your list. I still mess around on it a bit and you can ask me about any part of the experience. Https://smileys.pub

Imo it is more ready for prod than any other framework :grin: but I need to go back and do a better job with several aspects of my site

1 Like

Hi,

Elixir and Phoenix are fine for your application.

I run a consulting company that builds applications for early stage companies (Cogini). When I first saw Elixir, we had been developing standard websites (CRUD, e-commerce, etc) with Ruby on Rails, Python, and PHP. We were using Erlang for the “tricky bits”, e.g. IoT and real time web, and liked it a lot. 10 years ago, we tried to use Erlang for web development, but the web development stack was not mature, and basic productivity was lacking.

When I saw Chris McCord’s post comparing Rails and Phoenix three years ago, I was really excited. The metaprogramming capabilities of Elixir let them build a web framework that combines the power of Erlang with the ease of use of Rails.

I wanted to make sure that it would be ok to bet the company on Elixir and Phoenix. The basic productivity was great, and the the Elixir and Phoenix teams focus a lot on developer experience and getting started. So I knew we would be able to deliver custom development projects without too much work.

My next question was whether we would have the libraries we need for various project requirements, e.g. interfacing with credit card payment systems. It is fine to develop a few things, but it’s hard for a startup project budget and timeline to cover development of basic libraries. As a safety valve, I looked at calling Python and Ruby from Elixir using tools like Elixir Snake and Erlport. They worked fine, and I knew that I would be ok. In practice, we haven’t needed to do that much, all the libraries we have needed have been available or we could write them. We mainly use it for things like Pandas for data analysis.

In addition to standard web development tasks, Elixir and Phoenix support the next-generation “stateful web” applications like chat that are really hard to build any way else. One thing that I really like is that a single platform can do it all, i.e. public web, back end CRUD for admin, mobile APIs, interfaces to 3rd party APIs, and real time messaging. It actually simplifies development a lot, because we don’t need to use multiple languages, multiple servers, background job queues, etc.

In the last three years, we have done all our new projects in Elixir, and it’s worked fine. You don’t have to worry about OTP at this point, you can build apps with just Phenix. You will want to learn it in the future, though, as it is where the platform gets a lot of its power. As for difficulty finding developers, we haven’t found it hard for devs to get up to speed on Elixir and Phoenix. Within two weeks they are fully productive, particularly if they have experienced people available to help.

There is some learning curve associated with functional development. It’s similar to learning object oriented programming. You can be programming immediately, but it takes six months before you are really thinking functionally. Then you find it difficult to use barbaric languages with mutation and miss pattern matching dearly :grinning:.

17 Likes

I agree 100%.

1 Like

@younes-alouani because you ask wrong questions. Title is about elixir’s stability. But your questions are not releated about that. I can advice all resources you need in ruby because there alot tutorials exactly what u need piece piece. But in elixir first you have to learn how web works. Which questions releated about front-end or backend or database. After you get how web works you will realise all of your questions same thing. For example in reality user and post whole different thing but for a programmer they are just data with different aspect.

So first read phoenix doc, apply some tutorials. Learn router, model, controller, view idea. But i can say you are in hard way if u just want to build that webapp. But if u want to build more projects you are in right way. Because u will learn wep programing with less magic

2 Likes

No one answer your question because your title is just inviting for broader debate on production.

1 - Authentications and Authorizations (Admins, Moderators, Normal users, Premium users);

You need to learn token based authentication if You plan to use SPA with Vue. PhoenixToken can do this. Authorization is more complex. You can look at https://github.com/riverrun/phauxth/wiki/Authorization.

2 - Publish, Edit and Delete posts ;

This is basic CRUD… with ownership. Usually, after a login, You can assign the current_user into conn.assigns, so You know that each protected route will contain a current_user, or fail.

3 - Search Box for posts and profils + filters ;

I just found recently…
https://bytesized.xyz/full-text-search-with-phoenix-and-postgresql/

Of course postgres can do queries. To me it is a much better alternative than mysql. It includes full text search, postgis extensions, windowing functions etc. The only reason I would not use it would be the need of a special database, such as Riak, or Neo4j.

On the frontend, search box is a perfect use case for rxjs.

4 - Ranking and Rating of Profils ;

Do You mean a like system?

5 - Download and Upload Files ;


And for reference http://phoenixframework.org/blog/file-uploads

6 - Reply to the posts (messages + attached documents) ;

You can define something like Post has_many Reply

What is fun is the way You reply… by web, by mail, my sms?

I am coupling mobile phone to phoenix backend. And use twilio to send sms from phoenix.
By email, there is bamboo.
By web it is simple CRUD.

7 - Classify posts into categories and by targeted localisation (Country / City).

Add Postgis extension to Postgres and You will be able to do queries based on latitude/longitude, and much more.

While not that complicate, a CMS might be hard to build the first time. Also note You need to be fluent in a lot of different technologies to become good at web.

You can use Phoenix for this. But a CMS does not highlight Phoenix real quality. In fact, You could do it with anything (Django/Python, ROR, Php), as long as You find solution for all the points You mention.

But Phoenix comes also with

  • A stateful web
  • Soft real time
  • Scalability, Fiability, Concurrency

As long as You don’t need them, it is fine to do a blog with whatever language You feel the most productive with.

And for your question, Phoenix can solve all the 7 points, as many other frameworks. But It add that supplement bonus that make it growing in popularity.

6 Likes