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

Handle multiple instances of DataLab #1

Open
PierreRaybaut opened this issue Nov 14, 2023 · 0 comments
Open

Handle multiple instances of DataLab #1

PierreRaybaut opened this issue Nov 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@PierreRaybaut
Copy link
Contributor

Currently, DataLab is not designed to handle multiple instances of itself. This is because it uses a single configuration file to store the user's preferences, and it does not have check and lock mechanisms to prevent multiple instances from writing to the same file.

The current behavior is the following:

  • Whenever a new instance of DataLab is started, it loads the configuration file and uses it to initialize the user's preferences.

  • Whenever the user changes a preference, the configuration file is updated with the new value. However, it does not only update the preference that was changed, but it also updates all the other preferences according to the current state of the GUI, thus overwriting any changes that might have been made by other instances of DataLab.

  • When the user quits DataLab, the configuration file is updated with the current state of the GUI, thus overwriting any changes that might have been made by other instances of DataLab.

  • There may be multiple side effects due to the fact that the configuration file is updated by multiple instances of DataLab at the same time. One of them concerns the XML-RPC server: only the latest instance of DataLab will be consistent with the XML-RPC port number stored in the configuration file.

How can we solve this problem?

  • We could use a different configuration file for each instance of DataLab. However, this would require a lot of changes in the code, and it would make it difficult to share preferences between different instances of DataLab. And how would we know which configuration file to use when starting a new instance of DataLab? We would need to implement a mechanism to merge the preferences from all the configuration files.

  • We could still use a single configuration file, but we would need to implement a mechanism to be able to update other instances of DataLab whenever a preference is changed. This would be quite difficult to implement.

  • With a single configuration file, we could also just warn the user when quitting DataLab that there are other instances of DataLab running, and that the preferences of these instances will be overwritten. This is probably the easiest solution, but it is not very user-friendly.

@PierreRaybaut PierreRaybaut added the enhancement New feature or request label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant