-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Comments
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 :
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. |
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? |
@mit-mit this is probably a feature request on the Dart VM than a Flutter feature. |
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! |
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. |
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 |
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.
The text was updated successfully, but these errors were encountered: