#Convex gets Rusty with Santa

2 messages · Page 1 of 1 (latest)

visual garden
#

Convex has a Rust client!

So, always on the search for something wacky and interesting to do, I decided to use it to reimplement "The Santa Claus Problem" from Simon Peyton-Jones' 2007 paper "Beautiful Concurrency". In that paper, Simon used a simulated work group scenario to demonstrate the power and ergonomics of Software Transactional Memory-a way to represent atomic transactions as side-effect free "normal" code (ahem, to whatever extent Haskell is "normal", at least). Convex's mutations are heavily inspired by Haskell STM.

For the Rust/Convex version, instead of a single process with multiple threads and STM, I built a true multi-process distributed system using a Convex deployment as the shared state. I chose with project with three goals:

  1. Explore ways to use Convex's ACID properties to ensure correct behavior of distributed agents
  2. Demonstrate how to use Convex for server-side "workflow" patterns, where different agents signal to each other that it's time to advance the collective work
  3. Ensure the world's children get presents made and delivered in an efficient and timely manner

Give it a read and let me know what you think!

https://stack.convex.dev/get-rusty-with-santa

And please, if you like Rust and you like Convex, give the new crate a whirl and show us what you made.

If you've been itching to write Convex programs in Rust, your time has come. We take the new Convex Rust crate for a spin by writing a distributed sys...

#

Also I'm aware it is May