July 5th, 2024

Synchronous Core, Asynchronous Shell

Gary Bernhardt proposed a Synchronous Core, Asynchronous Shell model in software architecture, blending functional and imperative programming. Rust faces challenges integrating sync and async functions, leading to a trend of adopting this model for clarity and control.

Read original articleLink Icon
Synchronous Core, Asynchronous Shell

Gary Bernhardt introduced the concept of a Synchronous Core, Asynchronous Shell in software architecture, emphasizing functional programming for logic and imperative programming for side effects. This approach aims to enhance understanding, testing, and flexibility without the complexities of purely functional programs. Recent discussions in the Rust community have highlighted challenges with integrating synchronous and asynchronous functionalities, particularly regarding function composition. The author reflects on applying this architecture in Rust services, noting a trend towards using a synchronous core and asynchronous shell pattern. By segregating synchronous and asynchronous code into core and shell components, respectively, the author suggests improved clarity and control over side effects. Function coloring, indicating the distinction between synchronous and asynchronous functions, is viewed positively as a safeguard against unintended side effects. The author recommends using the command pattern to trigger side effects from the core, promoting a structured approach to managing interactions between synchronous and asynchronous code.

Related

SquirrelFS: Using the Rust compiler to check file-system crash consistency

SquirrelFS: Using the Rust compiler to check file-system crash consistency

The paper introduces SquirrelFS, a crash-safe file system using Rust's typestate pattern for compile-time operation order enforcement. Synchronous Soft Updates ensure crash safety by maintaining metadata update order. SquirrelFS offers correctness guarantees without separate proofs, quickly verifying crash consistency during compilation. Comparative evaluations show SquirrelFS performs similarly or better than NOVA and WineFS.

The Inconceivable Types of Rust: How to Make Self-Borrows Safe

The Inconceivable Types of Rust: How to Make Self-Borrows Safe

The article addresses Rust's limitations on self-borrows, proposing solutions like named lifetimes and inconceivable types to improve support for async functions. Enhancing Rust's type system is crucial for advanced features.

I Probably Hate Writing Code in Your Favorite Language

I Probably Hate Writing Code in Your Favorite Language

The author critiques popular programming languages like Python and Java, favoring Elixir and Haskell for immutability and functional programming benefits. They emphasize personal language preferences for hobby projects, not sparking conflict.

Exploring biphasic programming: a new approach in language design

Exploring biphasic programming: a new approach in language design

Biphasic programming introduces new language design trends like Zig's "comptime" for compile-time execution, React Server Components for flexible rendering, and Winglang's phase-specific code for cloud applications.

Synchronous Core, Asynchronous Shell

Synchronous Core, Asynchronous Shell

A software architecture concept, "Synchronous Core, Asynchronous Shell," combines functional and imperative programming for clarity and testing. Rust faces challenges integrating synchronous and asynchronous parts, prompting suggestions for a similar approach.

Link Icon 2 comments
By @whalesalad - 5 months
Reminds me I need to revisit my archive of Destroy All Software videos. They really are gems.