App developers struggle to order asynchronous service initialization
Developers using Angular and ASP.NET Core need asynchronous work—such as loading configuration—to finish before dependent services are initialized or used. The reports describe gaps in expressing async initialization and dependency ordering through the frameworks’ startup and DI workflows; the workarounds include promises in services or dynamically reading values, which can leave race conditions. The evidence is several years old, so the current size of the gap needs validation.
For angular and ASP.NET Core developers. Mentioned from Apr 2018 to Jun 2021 on GitHub.
3 different people described this problem in 2 separate discussions.
- Indie fit
- 2.0/10
- Pain
- 6.5/10
- Frequency
- 5.0/10
- Willingness to pay
- 0.0/10
- Momentum
- 5.0/10
- Who pays
- Professionals
- Competition
- Medium
- Build difficulty
- Medium
What people said
Quoted word for word. Follow a link to read the whole discussion.
But, this is a hack, and is buggy with race conditions - the ConfigService` may potentially be injected into other services, and be used / read from before this bootstrapping happens, causing bugs because the object gets used before it's ready
One is to dynamically grab the values on every service method call. Another is to expose a promise on the ConfigService and let the API services use a .then() in the constructor.
Build brief
See what to build and who will buy it
- 2 product ideas with the smallest useful version and pricing
- 3 places to find your first customers
- 2 more quotes from people who have this problem
- Current workarounds, existing solutions and risks