Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MODULES]: Load modules asynchronously #79

Open
2 tasks done
MarcusTXK opened this issue Jul 25, 2021 · 3 comments
Open
2 tasks done

[MODULES]: Load modules asynchronously #79

MarcusTXK opened this issue Jul 25, 2021 · 3 comments
Assignees
Labels
Enhancement [Category] New feature request

Comments

@MarcusTXK
Copy link
Member

Feature

Is your feature request related to a problem? Please describe.

We need to load the module asynchronously and somehow indicate to the user that module loading is in progress. This should be analogous to Sling sending a program to the robot.

Describe the solution you'd like

When there is a module load, we should do the following upon Run:
(1) indicate that module loading is in progress
(2) load the module(s) asynchronously
(3) when (2) is successful, indicate that module loading is done
(3) run the program

While (2) is under way, the user should be able to interact with the system.

Checklist

  • I checked the requested feature does not already exist
  • I checked to make sure that this issue has not already been filed
@MarcusTXK MarcusTXK added the Enhancement [Category] New feature request label Jul 25, 2021
@MarcusTXK MarcusTXK self-assigned this Jul 25, 2021
@martin-henz
Copy link
Member

Yes, thanks for writing this up. I agree that we should have this feature. Any plans for implementing it?

@martin-henz
Copy link
Member

What is the status of this feature? I think I just encountered an issue related to this, when playing with the SA@NUS deployed to staging. I uploaded the mission M3: Curve Introduction. After entering the solution of the first question, I pressed "Run" and didn't see any output. There was no error in the console.

The second time I tried, it worked. This may cause hickups in CS1101S.

@martin-henz
Copy link
Member

martin-henz commented Aug 3, 2021

Here is a more detailed proposal:
"Run" with import statements:

Case 1: all imported modules are available locally (cached from earlier runs)
normal behavior. no extra messages

Case 2: at least one imported module is not available locally
Consequences:

  • The program is not run: instead the system becomes responsive immediately after pressing "Run"
  • The REPL shows: "Loading modules x, y, z from module server..."

Case 2a: all non-locally-available modules can be loaded within a timeout of say 10 seconds
Consequences:

  • The REPL displays: "Modules x, y, z loaded from module server. Rerun your program."

Case 2b: not all non-locally-available modules can be loaded within a timeout of say 10 seconds
Consequences:

  • The REPL displays: "Modules x, y, z could not be loaded from server. Check your network connection and rerun your program."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement [Category] New feature request
Projects
None yet
Development

No branches or pull requests

3 participants