Skip to content

Commit

Permalink
Update file-storage-synchronization.md
Browse files Browse the repository at this point in the history
  • Loading branch information
timurbazhirov authored Oct 18, 2024
1 parent f8eb1ad commit b44c74e
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions lang/en/docs/jupyterlite/file-storage-synchronization.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
# JupyterLite: File Storage and Synchronization

## Local File Storage
## Main Concepts

When Jupyter notebooks or files on the JupyterLite (JL) server opened via a provided URL, such as from the Materials Designer or Mat3ra Platform, these files are stored locally on your browser. This means:
When Jupyter notebooks or files inside the JupyterLite (JL) environment are opened, these files are stored locally inside a browser.

- Local storage: Files and notebooks are saved to your local browser storage. They are not synced across different browsers or devices.
- No cross-device syncing: If the same URL is opened on another machine or browser, it will not carry over any changes made in the first environment.
- File restoration: If a distributed notebook or file is deleted by the user, it is restored to the original version upon deletion.
### Local storage

## Updating Notebooks and Files
Files and notebooks are saved to your local browser storage and persist in it until the local storage cache is reset.

### No cross-device syncing

If the same URL is opened on another machine or browser, it will not carry over any changes made in the first environment.

### File restoration:

If a distributed notebook or file is deleted by the user, it is restored to the original version upon deletion.

## Updating Notebooks/Files

When updates to JupyterLite or its API examples are released, it’s important to delete corresponding folder in JupyterLite or clear the local cache (for the `jupyterlite.mat3ra.com` URL) to ensure that the updated content is correctly loaded. Here's how to manage this:

- Clear local storage: You can either manually delete the files stored on your browser or clear the browser's local storage for JupyterLite to reload the updated versions.
- Cache refresh: After a JupyterLite update, you may need to delete the directory containing distributed notebooks and files to ensure the most up-to-date versions are loaded.

## Synchronization Behavior
<!-- TODO: add visual -->

JupyterLite instances opened via Materials Designer, Mat3ra Platform, or by a provided URL (e.g., `jupyterlite.mat3ra.com`) behave slightly differently:
## Synchronizing Files between sessions

- Per-machine sync: The files and notebooks opened in these instances are synced within the same browser and machine. Since they are loaded in an iframe (displaying the JupyterLite URL), they persist for that specific browser and device.
- Non-shared state: However, any changes or files are still specific to that browser instance, and they are not shared between devices or browsers unless explicitly copied or transferred.
To share changes between devices or browser sessions, including within different parts of the platform, one needs to explicitly copy and transfer/reupload the file.

<!-- TODO: add visual -->

0 comments on commit b44c74e

Please sign in to comment.