Jupyterhub multiple sessions per tab - jupyter-notebook

I am new to Jupyterhub and have been tasked to find out the following.
Our team has picked up that multiple sessions are created when new tabs are open.
Is there a way to ensure that only one session is used even when the IDE is open in multiple tabs?

Related

Open Bokeh application in different browser tab?

I am running a bokeh application with different tabs. I love to open same application in different browsers. So I can use different application tabs in different monitors. For now, I can only connect one browser at a time. I am using
tabs = Tabs(tabs = [tab0,tab1])
curdoc().add_root(tabs)
for opening the application. And runs with
bokeh serve myapp.py
How can I use bokeh client or anything?? Any working example??
Open Bokeh application in different browser tab?
Bokeh works the following way: The application is a blueprint to create a document. There are two documents: one on the python side (on the server) and one on the javascript side (on the client in the browser). Bokeh automatically synchronizes both documents. This means if you open a tab on the client it will also be in the opened state on the server.
When you now open a specific python document twice (e.g. open twice localhost:5006/gui?bokeh-session-id=14831) you get one python document and two js documents and all are synchronized. That means if you open a tab it gets opened in all documents, so all js documents.
If you want two js documents with different state, you need to have two python documents (e.g. by opening localhost:5006/gui). Now these two python documents are not synchronized anymore, which enables you to have two different tabs open
Now you want to have multiple js documents with different state (you want different tabs active). These cannot be synchronized to the same python document, because otherwise opening a tab in js document 1 would open the tab in js document 2. So you need two different python documents, but now these two python documents are not synchronized anymore.
From your comments I think you want to synchronize part of your documents, but not everything. As far as I know bokeh has no support for this.
One hack you could try is to disable event propagation for the tabs. Another way would be to synchronize the data you care about yourself.
My intended purpose was to see different tabs in different browsers(in different monitors). It was quite difficult to do with bokeh alone. I can open two application at different browsers but it will be a mirror of other application (If I choose tabs the same is seen in the other) or it will completely independent.
To synchronise two application I used SAMP protocol in astropy. I created one application as Server and the other as the client. The server sends the variables to the client through the SAMP protocol. Now changes in the server are received in the client but I can do independent things with the client. Like I can switch to any tab as I like. Works pretty well for my purpose.
Please see
https://docs.astropy.org/en/stable/samp/example_table_image.html

How to allow multiple concurrent users for r shiny app within local network

I built an R shiny app for my coworkers to use inside the company. They don't know anything about R and there is no way that I ask all of them to install R on their own machine. Therefore, I tried code:
runApp(appDir = appdir,host="0.0.0.0", port = 5295)
This successfully allow my coworkers to use the app. However, when multiple people use it at the same time, there will be interruptions. Is there a way to solve this problem besides spending money to get a R/Shiny server?

Shiny App - Multiple Simultaneous User Access

Im building a dashboard with R Shiny (shinydashboard package).
After I deploy the application, i try to access it with two different systems using the remote machine's ip. I upload a file on one system, which runs perfectly. But as soon as i upload a different file on the other system, both the instances crash.
Is there anyway I can do an analysis of two different data sets simultaneously on different systems?

Scalling Wordpress on Windows Azure:

I'm running a Wordpress multisite which in short periods every week experience a big number of users requiring more CPU + RAM.
I therefore wish to make use of Azure autoscale to turn on more instances if the demand are there, however is it possible to make a setup where the different instances share same storage and database? And if yes how could it be done?
It is supported by out-of-the-box:
Goto "Web Sites" and add a new website from "Gallery".
Select "WordPress"
Follow the rest of the wizard.
The wizard allows you to create a MySQL database. The website runs as a cluster and uses a database which also runs on a cluster of servers (hosted by ClearDB).

Open a different Shiny application by clicking link in a Shiny application

I am building my first Shiny app and have been struggling with one issue that I am not even sure if it is possible to do.
I want to allow a user to click a link (or select something or click a button; some user action), and after this I want another Shiny app to be open in front of the user (the previous one might be shut down; I no longer care about it). To put it in other words, I want to make something like the following work:
if(input$datasetlist == "cars"){
runApp("C:/.../readdata")
}
Of course, trying this naive code returns a warning:
Error in startServer("0.0.0.0", port, httpuvCallbacks) :
Failed to create server
What is the correct approach for this, if it is even possible?
There's not a way to do this now in Shiny natively, but you might be interested in Shiny Server. It allows you to host multiple applications concurrently. It will manage the startup and shutdown of apps based on whether or not they're being used.
So you could just host all your apps in Shiny Server, then provide regular links (a(href="/anotherApp")) to allow users to navigate between apps.

Resources