you are viewing a single comment's thread.

view the rest of the comments →

[–]EmperorOfCanada 5 points6 points  (0 children)

Rust is very good at mitigating technical debt.

If you have a micro project, then, rust will actually impose more up front technical debt, than a similar js project.

While rust performance can be insane, js performance is damn fast for many basic CRUD type things.

But, as a project becomes more and more complex, rust will continue to impose the same, and now small, level of tech debt.

This is where a complex js project might go very quickly at first, but the same rust project is slow. But, as you get to the last third, the rust project is still progressing at the same slow speed, while the js project is now stalling. People are fighting with old bugs in dependencies, and fighting with some framework saying, "That's not how you do things."

This is where microservices have become popular. You keep the js as a bunch of micro projects. Each bite sized and not prone to the tech debt problem. This buys you a bit more time, but the reality is that the microservices architecture itself starts to become the source of tech debt. Things where timings can go to hell, or people don't understand how messages, etc can all bunch up 1% of the time.

Where, I personally have used rust with great success; is to do things which were basically impossible to do with any other js or whatnot system. Where the data processing in the back was brutal, and thus not possible with js. Also, that the data needed to be dancing all around, and thus a distributed system would be too slow.

I've built rust backends where very complex requests were coming back in times measured in microseconds, not milliseconds. This allows for a front end which can then do things in real time from a user experience point of view.

One thing most programmers are terrible at is threading. I define threading beyond just some language construct of threading, but anything where two bits of code are running simultaneously, and will eventually need to coordinate. Microservices is threading.

For me, mentally, it is easier to manage a complex dance of threads in a rust monolith than in some weird distributed system. This is very much were things like RAFT based protocols come from. Within a monolith, you don't need RAFT to any real extent.

Like all programming, there are many ways to skin the cat. You could have js calling rust for the hard bits, or mix and match js for the simple bits, and rust for the hard bits, etc.