You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the initial discussion on csharplang, a piece of insightful feedback was raised: before we can finalize the language syntax for CScaf/Spaces, we need to "hammer out the core runtime, libraries, and other data/messaging primitives."
I couldn't agree more. Elegant syntax is only the surface; the true power of the "Spaces" model lies in a robust runtime foundation.
The goal of this thread is to collectively brainstorm what those foundational primitives might look like. These are big, open questions, and all ideas, from nascent thoughts to radical proposals, are welcome.
Key Areas for Discussion
Here are a few core areas that I believe we need to solve.
1. Isolation Primitives
The "Spaces" model proposes two primary levels of isolation: ThreadGroup (in-process) and Isolate (a separate process).
How can we implement this efficiently on the .NET CLR?
Creating a new process (Isolate) can be expensive. Are there more lightweight process models we could leverage or build?
For ThreadGroup, how do we guarantee absolute memory (heap) isolation between Spaces?
2. Memory Management for Unmanaged Spaces
One of the most ambitious features is the concept of a GC-less Unmanaged Space for maximum performance.
How can a non-GC environment coexist with a GC-managed one within the same application?
What memory management model should we adopt? Could we draw inspiration from Rust's ownership and borrowing model?
What should the API for allocating and freeing memory in an Unmanaged Space look like to be both safe and efficient?
3. Inter-Space Communication (ISC) Layer
swait and srun require a highly efficient underlying transport layer.
For in-process communication (SharedMemory, NamedPipes), how can we optimize data transfer to achieve zero-copy?
How should the API for this transport layer be designed to be easily extensible with new transport mechanisms in the future?
4. Data Marshalling
When an object is sent from one Space to another (e.g., from Managed to Unmanaged), its state needs to be reconstituted. The initial proposal suggested a special constructor convention.
Is this the best approach?
Should we consider other mechanisms, such as implicit/explicit conversion operators, or perhaps using source generators to create mappers automatically?
These are just starting points. I am eager to hear your thoughts, analyses, and concerns.
What do you see as the biggest challenge or the most exciting opportunity in building the runtime foundation for CScaf?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
During the initial discussion on csharplang, a piece of insightful feedback was raised: before we can finalize the language syntax for CScaf/Spaces, we need to "hammer out the core runtime, libraries, and other data/messaging primitives."
I couldn't agree more. Elegant syntax is only the surface; the true power of the "Spaces" model lies in a robust runtime foundation.
The goal of this thread is to collectively brainstorm what those foundational primitives might look like. These are big, open questions, and all ideas, from nascent thoughts to radical proposals, are welcome.
Key Areas for Discussion
Here are a few core areas that I believe we need to solve.
1. Isolation Primitives
The "Spaces" model proposes two primary levels of isolation:
ThreadGroup
(in-process) andIsolate
(a separate process).Isolate
) can be expensive. Are there more lightweight process models we could leverage or build?ThreadGroup
, how do we guarantee absolute memory (heap) isolation between Spaces?2. Memory Management for
Unmanaged
SpacesOne of the most ambitious features is the concept of a GC-less
Unmanaged
Space for maximum performance.Unmanaged
Space look like to be both safe and efficient?3. Inter-Space Communication (ISC) Layer
swait
andsrun
require a highly efficient underlying transport layer.SharedMemory
,NamedPipes
), how can we optimize data transfer to achieve zero-copy?4. Data Marshalling
When an object is sent from one Space to another (e.g., from
Managed
toUnmanaged
), its state needs to be reconstituted. The initial proposal suggested a special constructor convention.implicit/explicit
conversion operators, or perhaps using source generators to create mappers automatically?These are just starting points. I am eager to hear your thoughts, analyses, and concerns.
What do you see as the biggest challenge or the most exciting opportunity in building the runtime foundation for CScaf?
Beta Was this translation helpful? Give feedback.
All reactions