-
Notifications
You must be signed in to change notification settings - Fork 91
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
Make updater a separate app/process. #1
Comments
We considered a separate updater app but we were worried about the size of our end app if this is bundled with it (because of all the node-webkit boilerplate needed to make an updater app). |
That makes sense. Need to think about it. |
nwjs/nw.js#213 when fixed will allow to run js files in webworker. |
@edjafarov nwjs/nw.js#213 seems to be fixed. What do you think now? |
@adam-lynch I've used child processes quite a bit for my NW.js app. They work great. I don't think you would need a separate updater app (nor does it seem wise, since it could create a stack of add-on dependency problems, where different apps actually need different versions of node-webkit-updater). You should be able to I've been thinking about it, though... Child processes are not free (in terms of memory / CPU), meaning you should only spawn one if there's an actual update to download. But... if all that's happening is an http download, is that even blocking the main thread anyway? Or is that handled by a system call that just sends back an event to node when it's done (which would make a child process irrelevant)? I actually don't know the answer to that. |
It might make sense to put all logic inside separate process that will work as a service and will download and update the version of the app.
Maybe something like network installer might be a great idea. Updater will be able to download initial version of app and install it.
node_webkit_updater process will be a detached process that will run kind of local server
any node-webkit app will be able to call this server's API
give current manifest, subscribe for updates, give current app folder
if there is node_webkit_updater app will subscribe for existing
otherwise it will spawn new one
if there is a new version of app available node-webkit-updater will download it in tmp folder and ping original app for approve.
original app should approve update and teardown itself
node-webkit-updater will try to copy the app to original folder and run app
(we need to think out what error cases could be)
The text was updated successfully, but these errors were encountered: