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

In-memory sessions #623

Merged
merged 2 commits into from
Sep 16, 2020
Merged

In-memory sessions #623

merged 2 commits into from
Sep 16, 2020

Conversation

poke1024
Copy link
Contributor

I'm wondering if we really want to store definitions data in the database for the classic mathics server. If there's a lot of data, the interface gets really sluggish since it needs to unpickle and repickle all definitions for each query.

Here's a proposal to keep everything in memory, which is always fast (but loses its data, as soon as you quit the mathicsserver process).

@teaalltr
Copy link
Contributor

Maybe adding an autosave in idle time?

@sn6uv
Copy link
Member

sn6uv commented Oct 16, 2016

I guess this is a holdover from when we supported multiple client sessions properly in the frontend (I think it's somewhat broken now). The solution I envisage for multiple clients is to give each client their own kernel (or even multiple if they want different workspaces) and store all the definitions in memory. At idle time (or when we inevitably run out of RAM) the definitions should be saved to disk. When the user returns we load their state from disk.

I'm +1 on merging this.

@GarkGarcia GarkGarcia added the needs rabase An old PR that needs to be rebased label Sep 9, 2020
@rocky rocky mentioned this pull request Sep 16, 2020
@GarkGarcia GarkGarcia merged commit a8263c3 into mathics:master Sep 16, 2020
@rocky
Copy link
Member

rocky commented Sep 16, 2020

@poke1024 @GarkGarcia Although I did test this, please double check. If this is addressed it would be nice to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rabase An old PR that needs to be rebased performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants