4 ms·
From what I understood, it's a Rust agent communicating protobuf structs over IPC, not embedded into the gem. In such a case, memory safety and GC is less of a
by Xorlev 12y ago
From what I understood, it's a Rust agent communicating protobuf structs over IPC, not embedded into the gem.
In such a case, memory safety and GC is less of an issue.
- bjz_ 12y agoMemory safety is still good for long term code maintenance and refactorability. wycats also mentions that these processes are reasonably long lived - memory leaks can become a big problem over time if you are not careful. These can be mostly purged by static analysis and Valgrind, but are still a headache to deal with. I would also add that Rust is much easier to hack on safely if you don't have a great deal of prior systems programming experience.
- dbaupp 12y agoI believe there is a Rust library embedded in the gem to serialize and communicate with the outside agent (IIRC, this is actually the most important part to be in Rust, it needs to be efficient to avoid interfering with the normal operation of the main program as much as possible).
- ben0x539 12y agoI've never looked at it too closely, but wycats has talked about how the Ruby code calls Rust code through the FFI and how Skylight doing some special things to make that work especially smoothly by directly calling some internal functions of Rust's failure handling bits, and about how the Rust code crashing shouldn't take down the rails process. That seems to suggest it's not just an IPC thing.