this post was submitted on 09 Mar 2024
38 points (100.0% liked)

Rust

111 readers
1 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] varsock@programming.dev 14 points 6 months ago (5 children)

At work, we started the c++ migration to rust doing the following:

  1. Identify "subsystems" in the c++ code base
  2. Identify the ingress/egress data flows into this subsystem
  3. Replace those ingress/engress interfaces with grpc for data/event sharing (we have yet to profile the performance impact of passing an object over grpc, do work on it, then pass it back)
  4. Start a rewrite of the subsystem. from c++ to rust
  5. Swap out the two subsystems and reattach at the grpc interfaces
  6. Profit in that now our code is memory safe AND decoupled

The challenge here is identifying the subsystems. If the codebase didn't have distinct boundaries for subsystems, rewrite becomes much more difficult

[–] designatedhacker@lemm.ee 5 points 6 months ago

Sounds like you're well on your way with a good process. The book Software Architecture: The Hard Parts is a pretty decent guide to breaking apart a monolith. It's not a 100% follow it to the letter guide IMO, but I think the overall approach makes sense. At each step you have to consider trade-offs instead of following any kind of dogma.

load more comments (4 replies)