Phoenix as a Meteor alternative

For a moment, I thought Meteor is no longer the latest and greatest. Google Trends tells a different story:

Meteor seems to have beaten Phoenix in popularity recently, and keeps growing, while Phoenix appears to be declining. Whew!

1 Like

@ryanswapp has clearly listed some advantages here

thanks for pointing that out, Yes, I saw that but interested to know different people views.

@aaabbbccc thatā€™s a very nice comparison from you, basing on how Phoenix started in 2014 and you show its popularity peak was 5 years ago.

6 Likes

Wow! My bad. Forgot quotemarks. Thanks for pointing it out.

Updated Google Trends here.

TL;DR: Meteor going up, Phoenix has not taken up (yet?). So, not very informative.

It seems the search term ā€œphoenix tutorialā€ primarily covers the hacking of Nokia phones running a software called Phoenix.
I donā€™t think you can use it as a comparison in this case.

1 Like

I see. This is perhaps a more accurate one: https://www.google.com/trends/explore#q="phoenix%20framework"%2C%20"meteor%20framework"&cmpt=q&tz=Etc%2FGMT%2B8

2 Likes

I just found https://www.learnelixir.tv/, which is a ā€œVideo Guide to Elixirā€ for only 9$. I havenā€™t watched it yet so I canā€™t really tell if itā€™s good, but Iā€™ve seen some tweets about it and they were all positive :blush:

2 Likes

I wish they had a few sample videos other than the introduction to gauge the content. However just about every Elixir video seems to cover 80% of the topics on that page.

Thereā€™s is another similar thing I found at http://elixirsips.com/

Here is a demonstration showing how to feed Phoenix channels with RethinkDBā€™s pub/sub. Canā€™t get much easier than that.

1 Like

Ooooh Boy! Another language I need to learn. :sleepy:

Still trying to wrap my head around meteor with all the new advancements each day and packages to stay abreast of. How many heads do you guys have? I am running out of RAM to take all this in.

10 Likes

Exactly what i was thinking.

And i definitely came to Meteor for the simplicity with the single language to rule them all idea (like you said @brajt ). Phoenix, for me, would be like to go back to Django. Having to be between Python and Javascript, or Erlang and Javascript is the same problem all over again as far as iā€™m concern.

Now iā€™ve read a few tutorials and stuff on Phoenix, and itā€™s clearly awesome on many points, with a few that would be nice to see in Meteor (like the router in core as suggested by @ryanswapp ).

1 Like

I asked Chris (the creator of Phoenix) this and his answer was it depends on the application but he tends to favor using channels instead of REST.

Iā€™m heading this route myself and am letting Redux pickup the events when new data comes in. However, iā€™m still using a REST endpoint for user creation for ease of use (user gets back a JWT for future auth).


[quote="jacobin, post:18, topic:13519"] Like everything else though, in Phoenix a template is just a function. I imagine you can remove it from the pipeline in the router and use JSON for your application protocol, but you still need some way to send the html down to the browser. [/quote]

Iā€™m keeping the client and server in the same repo but separate folders, sending the HTML down via a CDN to keep Phoenix faster.
However lot of people like to use web pack directly in the private folder: https://github.com/scrogson/phoenix-webpack-example


  • ease of use
  • single page app (Phoenix is server side unless you use React)
  • start simple projects faster (complex are about the same)
  • more packages that just plug in (Elixir favor small unix style modules that just do one thing)
  • both languages on the client/server
  • isomorphic-ish
  • ā€˜it just worksā€™ realtime (no manual pubsub, just insert/update, however this could be a con as well as this method can more complex than pub/sub)
  • uses JavaScript on the server (again pro or con)

Think about it in a different way. You could learn the language on the weekends to better improve your JavaScript. Iā€™d bet youā€™ll be throwing more code into a module of functions in no time :smile:

How many heads do you guys have? I am running out of RAM to take all this in.

Watch a few talks over breakfast(s), subscribe to blogsā€¦ once the initial firehose of info is consumed itā€™s much easier to maintain (Elixir is still very early).

edit
This is also a great intro video to what Elixir is!
https://www.learnelixir.tv

3 Likes

Being as they are sent with every request and can be rather large is JWT really a good fit for websockets?

Once you set up the websocket over TLS it seems to me just handling roles/privileges through a server side bitvector attached to the user/pid would be the way to go. I donā€™t really see the requirement for further client side privilege assertions like you would with atomic rest requests.

1 Like

Thatā€™s a good pointā€¦ iā€™m not sure. So iā€™ve only tinkered with auth so far and havenā€™t dove too deep into it yet. Iā€™ve pretty much started with Meteor as far as my first backend so iā€™m a bit behind the curve on rolling auth and websockets in general.

The websocket initial connection has a hook for auth (I think) that only gets run once so from what I understand they would only send the JWT once on connect and then the connection would determine if itā€™s authenticated.

1 Like

http://hassox.github.io/elixir/guardian/2015/06/19/guardian-getting-started.html

Thereā€™s a library called Guardian for Phoenix that seems pretty popular. It appears to use JWT with a ulonglong bitvector for privileges. Just seems to be a round hole square peg situation to me. When youā€™re scaling to a bazillion users, that extra 7k or so per request can mean a lot.

I do need to look at how one would actually handle bitvectors in Elixir. Itā€™s one instance where I can imagine it being far more convoluted and verbose than in other languages!

1 Like

The single language in all the stack is just a solution to a false problem in my opinion. The fact that we can do js on the backend only profits for the front end devs originally, I never saw a need of having js on the backend before thatā€¦

Iā€™ve never said this was a problem @skini26 . Just that myself came to Meteor for it, because i liked the idea. I was originally using Django, and having to switch between the two languages has always been something annoying for me.

Maybe it was for frontend devā€™, or maybe for the ones like me that just prefer the single system client/server. Iā€™m the single developer on a small ERP/CRM, and since iā€™ve never been like full time on it, having to go back and forth between those languages were really not something i was happy with. And iā€™m pretty sure a lot of people have a reason to like nodejs without being frontend devā€™ā€¦

1 Like

Def. checkout the Slack chanel elixir-lang theyā€™re super helpful for any kind of questions. The language/framework creators also hop on there! :thumbsup:

Haha ya I got a nice little laugh when I saw that link. Same comment as @brajt. Phoenix just barely hit 1.0 and is pretty much brand new (e.g. your link is comparing Meteor and something other than the Phoenix Framework. In addition, Meteor isnā€™t exactly a programming specific term so Iā€™m sure youā€™re pulling in all kinds of data with that). Much of the Ruby ecosystem is starting to convert over (which is a huge chunk of people) so I think youā€™ll see its popularity start to soar in the coming years.

I think it would be a mistake to discount something because itā€™s ā€œnot yet popular.ā€ This is the EXACT mistake that Clayton Christensen says kills big strong businesses in his book The Innovators Dilemma.

That said, I think it would be very difficult to measure Phoenixā€™s popularity via google trends given that itā€™s the name of a huge US city haha.

3 Likes

@shad I understand what you mean, I myself came to Meteor because of that and Iā€™ve never been more productive than now.
Itā€™s just that Iā€™m hearing everywhere this argument as the main one : ''Same language everywhere".
What I really like in Meteor is the way I easily deal with data, the fact that I donā€™t have to deal with configurations files and that it just works, and also the fact that it has a minimum of structure and good practices compared to other node frameworks, but itā€™s not really the fact that I use the same language (even if it helps a little).

My other favorite framework is Rails (and Grails), I really like the fact that itā€™s very well structured and clean and that I can hope in any project and work on it.

Iā€™m actually working on an Express Backbone MongoDB big app (for a company) and itā€™s a nightmare compared to other big projects I worked on with JavaEE, even if we use Webstorm which helps us a lot.

I showed them Meteor by redoing a part of the project with it in just 3 days (without tests) and they really liked it, but theyā€™re not ready to switch.