Phoenix Framework Architecture

223 views
Skip to first unread message

Sasha Fonseca

unread,
Nov 9, 2015, 6:10:07 AM11/9/15
to phoenix-talk
I've been looking around but I can't find a diagram of the Phoenix Architecture. How it works in relation to Elixir and the Erlang VM and how it would look and integrate into a general application's architecture. Could someone give me some directions on this? Thanks!

Steve Domin

unread,
Nov 10, 2015, 11:17:32 AM11/10/15
to phoenix-talk
Hi Sasha,

What do you mean by "how it would look and integrate into a general application's architecture"?

Under the hood, Phoenix is built on top of Plug, a specification for composable modules in a web application. Plug is also a connection adapters for different web servers in the Erlang VM. At the moment there is only one officially supported web server for Plug: cowboy

If you want to learn more about it I highly recommend reading the Routing & Plug sections of the Phoenix guides

Sasha Fonseca

unread,
Nov 10, 2015, 12:52:45 PM11/10/15
to phoenix-talk
Hi Steve, 

Thank you for your reply. Right now I'm doing my Msc Thesis and I'm thinking about using Elixir and Phoenix to build my application. I want to document the architecture of my app and how Elixir, Phoenix and the Erlang VM are built into it and how they interact at a deeper level. At a higher level it's simple, it will be a Client-Server/n-Tier architecture with REST Calls and a couple of other architectural patterns which are common in every web app nowadays, but what about a level deeper? How is the Phoenix Framework interacting with the ErlangVM and with the database? Not sure if there is a way to actually document this. 

benwil...@gmail.com

unread,
Nov 10, 2015, 1:07:58 PM11/10/15
to phoenix-talk
I don't understand your question. The phoenix frame work compiles to beam, and then just runs on the erlang VM. Are you talking about its process architecture or something? Phoenix isn't something that sits alongside the ErlangVM, it's just code that runs inside it. Phoenix does not have any built in way of handling databases, but by default installs Ecto, which is a framework for handling database interaction.

You should really just go read those links. Phoenix is much more than your standard client server REST architecture at even a high level due to its inclusion of channels. If you're interested in the process mechanics of how HTTP requests are handled at a lower level you'll want to look into cowboy and ranch.
Reply all
Reply to author
Forward
0 new messages