Lurker News
Specifically the backend. I'd love to hear your reasons. Do you keep one eye on what the stack would be post MVP?

1. Old schoolish (VPS - Maybe DO, Django/Flask/Rails/Remix/Next with postgres)
2. Supabase etc with JS/TS on either side of the network
3. Lambda/Cloud functions with Firebase/Dyanamo DB/Cosmos DB etc
4..n. What else and why?

Comments (723) 347 threads

Show all comments

Showing thread 8 of 347

sph3 replies#
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.

jstx11 reply#
If the backend, frontend, API and data layer are in Elixir, what's actually written in Rust?
sph2 replies#
At 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.

ElfinTrousers3 replies#
Would 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.
0cf8612b2e1e1 reply#
A 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.

Continue this thread — 1 reply

danudey1 reply#
Rust 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?

Continue this thread — 1 reply

sph#
Performance 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."

lairv2 replies#
How does Elixir interacts with the Rust code ?

Continue this thread — 2 replies

newaccount20213 replies#
I 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

smaddox#
Depends what you're prototyping. Rust is hard to beat for prototyping an interpreter, for example.
earthling8118#
Hard 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
atmosx#
Ah… part of the process is having fun. If ppl enjoys rust, then rust is fine :-)
0x0081 reply#
But do you code in vim?
TigerTeamX#
Emacs.... Just kidding, of course vim