8000 Consider App side feature container · Issue #40328 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Consider App side feature container #40328

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 ag 8000 ree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pouloghost opened this issue Sep 12, 2019 · 8 comments
Closed

Consider App side feature container #40328

pouloghost opened this issue Sep 12, 2019 · 8 comments
Labels
c: new feature Nothing broken; request for a new capability customer: hand dependency: dart Dart team may need to help us engine flutter/engine repository. See also e: labels. from: china Issues from the Flutter China community P3 Issues that are less important to the Flutter project

Comments

@pouloghost
Copy link

Here in China, app tends to grow into a small os(giant app). Lots of features (each one will be developed by a small team) have to share quite little resources provided by real os. A container is desperately needed to monitor and manage resource usage inside a single app. My vision is each feature will run in a container/sand-box, all resource usage will be distributed by application into each container. A resource manager will coordinate usage between each feature to make important features go smoother.

@BondarenkoStas BondarenkoStas added the c: new feature Nothing broken; request for a new capability label Sep 12, 2019
@xster
Copy link
Member
xster commented Sep 17, 2019

Not clear what the concrete tasks are. Is this about containerizing runtimes? Dart Isolates already don't share memory. Is this about build artifacts? If so, it's #39707

@pouloghost
Copy link
Author
pouloghost commented Sep 18, 2019

Not clear what the concrete tasks are. Is this about containerizing runtimes? Dart Isolates already don't share memory. Is this about build artifacts? If so, it's #39707

It's about containerizing runtimes, but the main purpose is about monitoring and restricting resource(all kinds of resource) usages, not just isolating memory.

For example, a youtube-like App in China will consist of video feature, live-show feature, gossip feature and so on. Each feature will try to use as many resources as possible whenever possible, but the App can't provide enough, thus the choppiness. What I'm proposing is flutter provide a solution like :

runInContainer(()=>VideoFeature.main(), networkProvider, fileProvider, memoryProvider...);

All resource access inside the runInContainer block must go through providers, and each one of the providers can be replaced by App maintainer with monitor and limitation inside them. Most of the providers can be achieved by using a certain type of code formation, but memory usage limitation is just impossible.

Overall, it's just like run app features in different JVM with all the startup parameters defined by operation engineers.

@xster
Copy link
Member
xster commented Oct 26, 2019

Most of the providers can be achieved by using a certain type of code formation, but memory usage limitation is just impossible.

Which half of the question are you asking for? For a mechanism to enforce a memory ceiling per Isolate? Or for a best practice guide for doing, essentially, dependency injection in Dart code?

@pouloghost
Copy link
Author
pouloghost commented Oct 28, 2019

Most of the providers can be achieved by using a certain type of code formation, but memory usage limitation is just impossible.

Which half of the question are you asking for? For a mechanism to enforce a memory ceiling per Isolate? Or for a best practice guide for doing, essentially, dependency injection in Dart code?

I was ask for a mechanism to enforce a memory ceiling per container/sandbox. Running feature code in different isolates is not practical.

And how DI is related to memory usage limitation, can you explain a little bit more?

@xster
Copy link
Member
xster commented Oct 29, 2019

@mit-mit this is probably a feature request on the Dart VM than a Flutter feature.

@VladyslavBondarenko VladyslavBondarenko added dependency: dart Dart team may need to help us engine flutter/engine repository. See also e: labels. labels Jan 15, 2020
@Hixie Hixie added this to the Declined Customer Request milestone Apr 21, 2020
@Hixie
Copy link
Contributor
Hixie commented Apr 21, 2020

I'm marking this as "Declined" for now to indicate that we're unlikely to work on this in the near term (we're focusing on fixing bugs rather than adding new features at the moment; see our roadmap for details). Please let us know if this becomes a blocker for you. Thanks!

@darshankawar darshankawar added from: china Issues from the Flutter China community passed first triage labels Nov 10, 2020
@kf6gpe kf6gpe added the P3 Issues that are less important to the Flutter project label Dec 9, 2020
@Hixie
Copy link
Contributor
Hixie commented Mar 23, 2023

I'm going to close this, as we have not seen much demand for this feature and it would be a significant departure from our current architecture. I would recommend approaching the Dart team directly about adding this to isolates.

@Hixie Hixie closed this as completed Mar 23, 2023
@github-actions
Copy link
github-actions bot commented Apr 7, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability customer: hand dependency: dart Dart team may need to help us engine flutter/engine repository. See also e: labels. from: china Issues from the Flutter China community P3 Issues that are less important to the Flutter project
Projects
None yet
Development

No branches or pull requests

8 participants
0