course-starter-python icon indicating copy to clipboard operation
course-starter-python copied to clipboard

Reduce connecting time

Open CyanBrain opened this issue 4 years ago • 4 comments

Hi ines,

First, I want to say thank you. I really love your template.

Second, there is an issue in juniper and I think it will be better for students if you can solve it. Currently connecting to mybinder.org take time. I mean "Launching Docker container on mybinder.org..." take from 20sec to 60sec then "Loading..." take about 2sec. This is annoying for students and consume time. For me, it will be much better if "Launching Docker container on mybinder.org..." start when the student clicks inside "input" space then when students click run "Loading..." start. So when students trying to solve the exercise, connecting to mybinder.org done then the students when click run button it will take only less than 2sec to execute the code. Also, this feature exists in most of the online code editors because it saves a lot of time.

Thanks.

CyanBrain avatar Apr 18 '20 12:04 CyanBrain

Thanks! Launching the Docker container should only have to happen once – after that, the existing kernel connection should be used.

You could probably add the feature you want by listening for the CodeMirror text area focus event and then already setting this.state.kernel if it doesn't yet exist.

However, I'm reluctant to make this the default, as Binder is a free service and I want to make sure to keep the launches to a minimum and not cause unnecessary load on their servers. This might mean that a user has to wait for 20 to 60 seconds on the first load, but I think that's an okay compromise. Of course, if you're hosting your own BinderHub or Jupyter server, that's very different 🙂

ines avatar Apr 30 '20 11:04 ines

Thank you for your response

I launched my JupyterHub on google cloud and I got a DNS something like this 01.02.03.04.

How to make juniper.js connected to 01.02.03.04 instead of mybinder.org?

Thanks in advance.

CyanBrain avatar May 09 '20 11:05 CyanBrain

Thank you for your response

I launched my JupyterHub on google cloud and I got a DNS something like this 01.02.03.04.

How to make juniper.js connected to 01.02.03.04 instead of mybinder.org?

Thanks in advance.

sed 's/mybinder.org/01.02.03.04/'?

mathematicalmichael avatar May 09 '20 15:05 mathematicalmichael

Thank you so much Mr. @mathematicalmichael

But where I have to write this line of code?

sed 's/mybinder.org/01.02.03.04/'?

in which file? in which line? do I need to edit anything else?

Thanks.

CyanBrain avatar May 09 '20 16:05 CyanBrain