Altinn / Altinn/app-lib-dotnet

Support async methods in IAppResources for fetching external resources

Open
#111 0 comments 0 reactions 0 assignees View on GitHub
kind/feature-request org/udir quality/debt status/triage
Dominant language
C#
Stars
8
Forks
27
Avg merge
1h 21m
Merged PRs (30d)
7

Description

### Description

To better support externalized resource files it would be nice if all methods/features (such as those in IAppResources and maybe others?) related to exposing resources to the frontend are made to support async implementations (i.e GetText, GetLayoutsForSet, and so on).

### Additional Information

As part of our survey application "Elevundersøkelsen", we need to dynamically provide custom resources for the frontend so that each respondent can answer a unique set of questions, this has been achieved by externalizing (via http-requests) the resources the frontend fetches from the server (i.e formlayout, textresources, layoutsets, options and so on) instead of reading these resources from the server's local file storage. These http-requests are a lot slower than just reading local files, and since a lot of these methods (from IAppResources) we have overridden don't support async implementations we end up blocking threads until the http-calls finish, which leads to issues when we have multiple concurrent clients.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the IAppResources interface and the existing implementations of GetText, GetLayoutsForSet, and related resource-exposure methods. Establish the complete set of methods that must support asynchronous implementations and verify that externally fetched resources no longer block threads under concurrent clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.