question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Normalize and make Content frontends and backends extensible

See original GitHub issue

Problem

We currently offer a union of files, backed by two storage backends, in the following order:

  • pre-baked contents, as indexed in a file tree that roughly mirrors the Jupyter Contents REST API
  • in-browser contents, managed by localForage

…with one storage frontend:

  • a mock REST API, exposing Jupyter Contents

While this makes it possible to deliver the Lab file management UI, such as it is, it is not very ergonomic for:

  • accessing from kernels
  • providing alternate storage implementations e.g.
    • WebDAV (a la sharepoint, etc)
    • sqlite
    • git
    • fossil-scm
    • some rando REST API

Proposed Solution

  • formalize and define an API for the existing backends
    • these would become two separate server extensions (#104)
  • separate the mock REST API frontend from the manager
  • add an emscripten-compatible FS frontend for the overall contents

Additional context)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jtpiocommented, Mar 23, 2022

Thanks for sharing this @oeway it looks cool!

1reaction
oewaycommented, Dec 15, 2021

FYI: I have been also looking into the storage options, and what I am using right now is using BrowserFS inside a ServiceWorker so we can manage files using varies backends (e.g. indexeddb), and the service worker can work as a in-browser file server. This allows all unified file access via HTTP, and for pyodide kernel, we can do XMLHTTPRequest in synchronous mode and create file-like object that works with large files.

Here is an demo shows how it work in a custom deployment of jupyterlite (available at https://jupyter.imjoy.io ): elfinder-storage-demo

Here is the notebook if you want to try it out: https://github.com/imjoy-team/jupyter.imjoy.io/blob/master/docs/files/elfinder-demo.ipynb

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frontend Normalization - Alfred Ayi-bonte
Normalization on the frontend is useful when you want to work with complex relational data structures in a way that makes retrieval easy...
Read more >
Front End Development: Key Technologies and Concepts
What is front-end development? What technologies and frameworks should a front-end engineer include into their portfolio?
Read more >
Technical Stack | Airbyte Documentation
JDBC makes writing reusable database connector frameworks fairly easy, saving us a lot of development time. Why are most REST API connectors written...
Read more >
Should data be normalized on the backend before being sent ...
When you say “nasty data objects”, I get an image of: frontend makes one api call. server makes three separate calls to database...
Read more >
How do I integrate backend with frontend? - Quora
Since the development of a web application is usually divided into front-end development and back-end development but some codes in the front-end will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found