BlueBrain / BlueBrain/nexus

Advanced Plugin - deal better with large JSON-LD payload

Open
#3,784 0 comments 0 reactions 0 assignees View on GitHub
enhancement fusion fusion-admin
Dominant language
Scala
Stars
301
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Affects version up to Fusion 1.8.0

## Description
Currently, when the JSON-LD payload of a resource is large (say 50MB), the JSON-LD editor freezes. We need to find a better way to load that data, potentially not entirely and give a choice/warning to the user about anticipated consequences of loading it. An other editor that can deal with large payload is an other option. Let's have a discussion to see what out options are.

**Note** Both solutions needs to know the size of the file.
the `resource.get` endpoint not providing the size in the header
`Transfer-Encoding: chunked` currently in the header which cause `Content-Length` header to be omitted

## Sol 1:
Inform the user about large files and allow him either to load the file and mentioning the consequences

### Acceptance criteria
- [ ] Large payload should not be displayed immediately
- [ ] The user should know that the resource is large (via a warning banner)
- [ ] The user can decide either to display full payload (with consequences) or download the payload using download button on the action bar.

## Sol 2:
investigate the Lazy loading of the code

Contributor guide

Open the contributing guide

Research direction

Start with the JSON-LD editor and the resource.get endpoint described in the issue, checking how the response is loaded and how the action bar handles downloads. Compare the two proposed directions: warn before displaying large payloads with a full-display or download choice, or investigate lazy loading. Done means large payloads are not displayed immediately, their size is known, and the user receives the specified choice or warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.