4 ms·
I'm building an MVP solo. Rust for the core application, Elixir for the backend, frontend, API, data layer. Javascript is pretty much non-existent, all client-
by sph 4y ago
I'm building an MVP solo.
Rust for the core application, Elixir for the backend, frontend, API, data layer. Javascript is pretty much non-existent, all client-side interactivity is done by LiveView.
Packaged into a podman container and deployed to a Hetzner dedicated server. Storage on PostgreSQL, probably the only thing I would rather not have to manage, but honestly single node is perfectly fine for an MVP. Provisioning is done with Terraform and Ansible.
Future expansion (pretty far away, post launch and post paying customers) is add more geo-distributed worker VPSes, talking to the central coordinator via Wireguard link.
Setup is pretty cheap, fast, scales really well, and it's easy to understand. With additional services (mail, monitoring, etc.) should be less than $100/mo all inclusive, and that should be enough for up to ~100 paying customers.
I have no plans of changing any part of this setup for the next decade. I'm too old to want to get golden handcuffed to turn key solutions and cloud products that just introduce complexity and become VERY expensive, and badly documented, past the demo stage.
Started in November, closed alpha release with users next month, launching Q2 2023.
- jstx1 4y agoIf the backend, frontend, API and data layer are in Elixir, what's actually written in Rust?
- sph 4y agoAt the core there is a custom crawler written in Rust, with the goal of eventually releasing it as an open source standalone application. But everything else, including scheduling the execution of this crawler, and parsing its output, is done on the Elixir monolith.
- ElfinTrousers 4y agoWould that be in Rust for performance reasons? Elixir IME isn't as slow as some other popular languages but it's no speed demon either.
- 0cf8612b2e1e 4y agoA crawler should be limited by the network not CPU. Outside of the language making it easier to handle multiple concurrent connections, I doubt speed would be much of a consideration.
- kfrane 4y agoI'm not sure, it might be. If you're not careful, CPU can become bottleneck when you have a 10Gbit network card.
- danudey 4y agoRust also has the benefit of eliminating a ton of classes of bugs, which is great for the core of a product that connects to the network, fetches untrusted content, parses it, and (presumably) stores it somewhere. Not that you can't still have bugs, but when you can get C-levels of speed with Python-levels of safety, why not?
- ElfinTrousers 4y ago"Python" levels of safety? Let's aim a little higher in life.
- sph 4y agoPerformance has nothing to do with it. You can imagine the application being a very specialised version of `wget`, and I like CLI system applications to be easy to distribute, with no dependencies and not requiring an entire VM to run. Erlang/Elixir is good for networked servers. For CLI apps I either choose Go or Rust, and I much prefer the latter. Since I want to make this component open source, I wanted to keep it separate from the rest of the closed source, proprietary Elixir backend. There is no wrong choice to be honest, this is mine for my startup, and I don't think I need more justification than "I am productive with it for the task at hand."
- lairv 4y agoHow does Elixir interacts with the Rust code ?
- newaccount2021 4y agoI love Rust and program in it a lot...but I would never use it for an MVP Rust is the tool you use when you are done prototyping, not when you are just beginning
- atmosx 4y agoAh… part of the process is having fun. If ppl enjoys rust, then rust is fine :-)
- smaddox 4y agoDepends what you're prototyping. Rust is hard to beat for prototyping an interpreter, for example.
- earthling8118 4y agoHard disagree. Rust lets me move much more quickly in many scenarios. I wouldn't want to prototype in Python for example. In my experience I'll spend too much time debugging and dealing with typing issues if i did that. Even with type hints. Having solid tooling that I can trust to help me maintain quality while moving fast and a really good ecosystem makes Rust a good choice
- 0x008 4y agoBut do you code in vim?
- TigerTeamX 4y agoEmacs.... Just kidding, of course vim