Abstract
DESCRIPTION:
One of the products offered by the company where I work is “Logistical Computations as a Service”: customers can invoke an HTTP API endpoint sending the description of a vehicle routing problem, and they get optimized vehicle routes in the reply.
After a few years of incremental work gradually turning a big Java/C++ monolith into a scalable distributed system, the processing pipeline infrastructure is now fully implemented in Rust.
In this talk, besides outlining the project and explaining how choosing Rust has been instrumental in its success, I will also show the few pain points we have with the language and hopefully give good advice to anyone considering introducing Rust to a large existing project.
ADDITIONAL NOTES:
The project described in this talk is “high profile”.
The vehicle routing problem specifications can be very complex, with parameters for priorities, constraints, affinity and anti-affinity tags, locations clustering and properties, service capacity metrics, any imaginable cost factor, work pause requirements, and more.
Problem sizes can vary from tiny (a handful of locations for a single vehicle, solved in milliseconds) to huge (tens of thousands of services for hundreds of vehicles spread on multiple days, solved in hours), and the system performs hundreds of full computations per second in production with an end-to-end latency of a few milliseconds for small computations.
We had to be careful about mixing Rust with the existing Java and C++ codebase while ensuring stability. We also had to solve non-trivial scalability issues (or, better, apparently trivial on paper but with unexpected twists when running at scale).
I am the person technically responsible for the whole project, and I have been the one introducing Rust in it. This is the first Rust project in our company, and from how it worked, it will not be the last 🙂