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

Support addition and removal of layers at runtime #7

Open
gunnarmorling opened this issue Apr 27, 2020 · 3 comments
Open

Support addition and removal of layers at runtime #7

gunnarmorling opened this issue Apr 27, 2020 · 3 comments

Comments

@gunnarmorling
Copy link
Member

No description provided.

gunnarmorling added a commit that referenced this issue Apr 27, 2020
gunnarmorling added a commit that referenced this issue Apr 27, 2020
gunnarmorling added a commit that referenced this issue Apr 27, 2020
gunnarmorling added a commit that referenced this issue Apr 29, 2020
Basic PoC; need to take thread-safety into account; also need to verify unloading of classes
gunnarmorling added a commit that referenced this issue May 1, 2020
Basic PoC; need to take thread-safety into account; also need to verify unloading of classes
gunnarmorling added a commit that referenced this issue May 1, 2020
Basic PoC; need to take thread-safety into account; also need to verify unloading of classes
gunnarmorling added a commit that referenced this issue May 1, 2020
gunnarmorling added a commit that referenced this issue May 1, 2020
gunnarmorling added a commit that referenced this issue May 1, 2020
Basic PoC; need to take thread-safety into account; also need to verify unloading of classes
gunnarmorling added a commit that referenced this issue May 1, 2020
gunnarmorling added a commit that referenced this issue May 1, 2020
gunnarmorling added a commit that referenced this issue May 2, 2020
gunnarmorling added a commit that referenced this issue May 2, 2020
gunnarmorling added a commit that referenced this issue May 3, 2020
gunnarmorling added a commit that referenced this issue May 5, 2020
@aalmiray
Copy link
Contributor

Would it make sense to deactivate a later at runtime? Deactivation does not remove the layer as you'd like to keep the layer hierarchy in place.

Deactivation "unloads and hides" the classes of that layer.
If deactivation makes sense, does deactivating a layer also deactivates its parents or only itself? Should decativation be conditional so that parents get deactivated as well?

@gunnarmorling
Copy link
Member Author

What would be your use case for this? Also, if deactiviting implies class unloading, what's the difference to removing it really? If we wanted to something like this, note it'd not imply deactivating the parent layer(s) but child layer(s) of the deactivated one. That is, classloading cannot really triggered explicitly anyways, it'll happen automatically when the last reference is removed (be it from a parent layer (via a service reference) or from a child layer).

@aalmiray
Copy link
Contributor

As I understand Layrry's current layer model, if a Layer were to be removed (say the plugins layer is nuked), then it's parent-child relationship are lost. Layers relationships are immutable at this point.

If a layer can be removed it stands to reason a layer can be added, in which case establishing parent-child relationships must be possible.

Deactivating/Activating a layer keeps the parent-child relationships in place but removes/adds access to its modules. Honestly I don't know how feasible is this particular scenario, just thought it might be good idea to explore how further down the road this may be taken or perhaps it's a fool's errand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants