Comments (6)
@s-u, I was hoping to use some kind of environment trickery to make this work "nicely". Is there a way to replace the default environment and then simply replace it with a new one when we switch notebooks? My simple tests with attach
and detach
didn't do anything useful.
from rcloud.
Ah, we don't re-connect between loads? I was assuming each notebook has its own session (that is the Rserve design). This is a bit tricky (because .GlobalEnv is special so just creating a new environment per notebook will break any code that uses .GlobalEnv
directly), but solvable -- the question is that we want to do: do we flush the previous state or do we keep all states that have been loaded so far? Obviously, the latter is convenient if you switch between two notebooks, but can use a lot of memory. The former is more "clean" because loading a notebook has always the same effect: clean slate - regardless if it's your first or second try in a session.
from rcloud.
BTW: for other reasons (the graphics device and knitr internal state among them) I would actually suggest creating a new socket. In general, due to some memory management features (such as grow-only symbol table), it's typically more efficient to not re-use the same R session for subsequent tasks. Also package management across notebooks will be a pain (unloading packages is not always reliable).
from rcloud.
The main problem with reloading everything is that the authorization dance is slow and full of redirects.
Is there any chance we can do something on the server side?
from rcloud.
Once you have the tokens, you can simply create the socket, no client-side dances anymore (dances required to get the tokens initially). This is all server-side and it only checks against the sessions server or the local database which is fast. You would only need the dance if we let the tokens expire at which point it's probably not bad to get new ones anyway.
from rcloud.
The only state that's lingering now is loaded packages and graphics state. I'm closing this for now, and we'll handle it better sometime in the future.
from rcloud.
Related Issues (20)
- display host in HTTP error messages
- Open in GitHub should also be disabled on view page
- option to set notebook name when creating new notebook
- Support GitHub App API
- can't add tag to current version
- notebook.R and non-R code
- error in merge
- should the author also be grayed if recent notebook is hidden?
- RCloud as a Package HOT 1
- allow use.gist.user.home with gist service login
- rcloud.jupyter only supports older jupyter packages HOT 1
- progress bars a mess
- view.html?source=1
- Cell commands, or at least "run cell", for view.html
- I been going into hacked fake at&t website HOT 1
- add Export Notebook as R source file to view.html
- passing working directory between languages
- "reload" button for notebook tree
- enhance rcloud.encrypt/rcloud.decrypt to handle user and group keys
- upload to working directory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcloud.