Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[design] Mono runtime components #49913

Merged
merged 3 commits into from
Apr 13, 2021
Merged

Conversation

lambdageek
Copy link
Member

@lambdageek lambdageek commented Mar 19, 2021

Initial version of docs/design/mono/components.md. Primarily focused on scenarios and workloads, and code organization.

An attempt to move EventPipe to a component is in #50837

@ghost
Copy link

ghost commented Mar 19, 2021

Tagging subscribers to this area: @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Issue Details

Very alpha version.

Everything is probably broken. See docs/design/mono/components.md for the design.

The code is a skeleton of the runtime support, and one mocked up component (that doesn't do anything).

The plan is to keep improving this until it's barely functional.

Author: lambdageek
Assignees: -
Labels:

area-VM-meta-mono

Milestone: -

@lambdageek
Copy link
Member Author

/cc @lateralusX - decided to open a draft PR for the branch.

@steveisok Once we have some idea of what the static and dynamic versions of the components look like, I will need help drafting the packaging story

@steveisok
Copy link
Member

/cc @akoeplinger


With static linking, all the present components are statically linked with the runtime into the final app.

Each component exposes a table of functions to the runtime. The stubs also implement the same table. In the places
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is similar to the local GC work done several years ago and something I'd like to do with interop in some capacity. Is there a reason this isn't a general .NET runtime design that both implementations can starting working towards?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on the goals, what scenarios does it make better. It would be good to have the goals and scenarios written down in this doc.

The primary goal for local GC was to make it possible for an app to bundle a GC with bug fix or performance improvement, without affecting global state of the machine. It was addressing a real challenge we had with iterating on GC fixes and improvements with large 1st party customers - the 1st party customers were very hesitant to deploy a .NET Framework patch to test it on a production machines (and these patches were very non-trivial to produce).

Local GC is less valuable now than it was in .NET Framework word. .NET Core supports allows bundling the whole runtime with the app that addresses the primary scenario as well. If we were to do the local GC again today, there is a good chance it would be way below the cut line and it would never get funded.

docs/design/mono/components.md Outdated Show resolved Hide resolved
docs/design/mono/components.md Outdated Show resolved Hide resolved
docs/design/mono/components.md Outdated Show resolved Hide resolved
docs/design/mono/components.md Outdated Show resolved Hide resolved
docs/design/mono/components.md Outdated Show resolved Hide resolved
lambdageek added a commit to lambdageek/runtime that referenced this pull request Mar 24, 2021
Link it into monosgen-shared and monosgen-static.

This is needed by the "mono components" prototype
dotnet#49913 so that each dynamic component
could statically link its own version of eglib operations (and we will do followup work
to move the ones that use global state, like the logging operations, to be in
monosgen-{shared,static} only)
@lambdageek lambdageek mentioned this pull request Apr 7, 2021
17 tasks
@lambdageek lambdageek changed the title [draft] Mono runtime components - design and impl [design] Mono runtime components Apr 7, 2021
@lambdageek lambdageek marked this pull request as ready for review April 7, 2021 19:54
@lambdageek
Copy link
Member Author

/cc @lateralusX @vargaz Updated the design doc to match #50837. Aside from the packaging, I think the design is at a point where it can be reviewed.

## High level overview

Each component is defined in `src/mono/mono/components`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to add a subdirectory for this ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary, but I thought it made it clearer that components are meant to be optional

@lambdageek lambdageek merged commit 03ea052 into dotnet:main Apr 13, 2021
lateralusX pushed a commit to lateralusX/runtime that referenced this pull request Apr 19, 2021
Link it into monosgen-shard and monosgen-static.

This is needed by the "mono components" prototype
dotnet#49913 so that each dynamic component
could statically link its own version of eglib operations (and we will do followup work
to move the ones that use global state, like the logging operations, to be in
one place only)
@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants