Interesting. I really like Python and SqlAlchemy. Changing objects in the database via changesets and applying them on top of eachother feels kinda alien, when I can't do object.property = something.
The thing that confuses me most about Phoenix and Elixir is how do I actually deploy the application to production? I have my own server where I can run whatever I want (running Ubuntu), so what do I have to do to get my Phoenix application working there? How do I get my code running as a systemd service?
Doing object.property = something is, I think a mental anti-pattern because it engenders uncertainty about which source of information holds the truth (local object or database), and now you have a needless (mental) distributed state problem. At least in a system with bare structs and changesets, especially in an immutable language, there's no ambiguity about the fact that your data are stale the minute you drive it off the dealership lot and your data synchronization events must pass through a single explicit point of entry. Explicit is better than implicit, after all.
To answer your second question, that's not entirely easy to answer, but I personally use mix release command, ship it to s3 as a tar.gz, then pull it down into the server, unzip, put the command line entry point "start" (there are instructions when you do mix release) into a systemd service, and it's good to go. Couldn't be easier. It takes us several ansible scripts, and annoying wrangling with virtualenvs if something goes wrong for us to create a new Ubuntu Django server from scratch and literally two commands (one is a 5 line shell script) to get Elixir up and running.
1. It's a functional thing, it's quite nice after you use it for a bit, and really powerful because you can use it for any data, and not just when working with a DB.
2. There are several ways. You can use releases [1]; copy the code to the box, run mix release, then ./app start, and point whatever you want to that process. If you're running phoenix you could always compile it on the box and just run mix phx.server. I wouldn't do that though. You could also use a tool like distillery[2] which is kind of like releases. There is another more esoteric option where you build locally without the runtime, but I wouldn't recommend that.
This gives you folder packaged with everything you need to run the application on the architecture you compiled it on. Very straight forward.
If you want to set it up to be a systemd service I guess it would be like any other binary command for systemd. I usually run things under something like Supervisor (http://supervisord.org/)
We use distillery in a project I've been working on for a few years. I know other people that build a docker container and deploy it. Weird for the OTP ecosystem but it works.
By the way how do you deploy Python code? There isn't a standard AFAIK.
Finally, check how systemd handles rabbitmq. It's an Erlang application and you could run and stop your application in the same way.
I would strongly caution anyone new to the language against using edeliver. There are a lot of gotchas and edge cases with the scripts that can really bite you. It's super cool if it just works, but miserable if something breaks.
The thing that confuses me most about Phoenix and Elixir is how do I actually deploy the application to production? I have my own server where I can run whatever I want (running Ubuntu), so what do I have to do to get my Phoenix application working there? How do I get my code running as a systemd service?