Keynote: Scaling out operational research with Rust

We used Rust to implement a scalable distributed system to handle vehicle routing problems, with hundreds of complete plans solved every second. I will explain why we chose Rust, its strengths in a project like this, how it influenced our software architecture, and how it worked out in the end.

LEVEL: Intermediate

Place
Main Hall
Length
40 min
When
November 10th, 2024
17:30

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 🙂

RustLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".

Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2024 RustLab | The international conference on Rust in Florence-Design & devCantiere Creativo-Made withDatoCMS