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

multi-window support #25

Open
JackDotJS opened this issue Jul 19, 2022 · 0 comments
Open

multi-window support #25

JackDotJS opened this issue Jul 19, 2022 · 0 comments
Labels
basic functionality early, pre-launch development stuff. everything before 1.0 enhancements improvements for existing features

Comments

@JackDotJS
Copy link
Owner

something that may become an issue is having multiple instances of the app open at once. at first glance there doesn't seem to be anything wrong with this, but there's one glaring issue at hand: file system calls.

imagine this scenario: a user has two instances of the app open at once, maybe to edit two projects simultaneously for whatever reason. what happens when that user edits the app settings in one of those instances? simple, the other instance will now have an outdated version of the user configuration.

at this point we have at least three options:

  1. allow each window to use their own versions of the config and simply allow each one to write them to the disk as they're closed like normal. this means whichever instance is closed last will be the one with the final config used for future instances from that point forward.
  2. have each instance watch the config file after launching, and simply load any file changes as soon as they're written. im not sure how well node.js can handle multiple instances potentially attempting to read a single file all at once. keep in mind there could be more than 2 instances, so i think a conflict would be possible. would the read requests jusy be queued? then again i'd assume this is more up to the OS. how would this be handled?
  3. use some kind of IPC system to update all instances without having to interact with the file system at all. this could get uncomfortably complicated fast, and may even be massive overkill for this particular use case, but it is an option lol

would love feedback on this

@JackDotJS JackDotJS added enhancements improvements for existing features 🔁 status: more info needed labels Jul 19, 2022
@JackDotJS JackDotJS added the basic functionality early, pre-launch development stuff. everything before 1.0 label Dec 6, 2022
@JackDotJS JackDotJS added this to the Node Studio 1.0 Release! milestone Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic functionality early, pre-launch development stuff. everything before 1.0 enhancements improvements for existing features
Projects
Status: 📋 More Info Required
Development

No branches or pull requests

1 participant