{ "id": "174716", "key": "DAEMON-320", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2020-02-11T07:12:54.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "58162", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "outwardIssue": { "id": "174715", "key": "DAEMON-319", "fields": { "summary": "appcd-core: Upgrade to latest Node.js 12 LTS release", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2020-04-14T21:33:12.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "15614", "name": "appcd-plugin" } ], "description": "Appc Daemon plugins support internal and external plugins. External plugins are run in a freshly spawned Node.js process. The external plugin communicates with the appcd core using an IPC tunnel.\r\n\r\nOne problem is serializing and deserializing data is bottlenecking throughput. By switching to Node.js 12, we can use the new worker thread library (https://nodejs.org/dist/latest-v12.x/docs/api/worker_threads.html). Since worker threads run in the same process, we can take advantage of shared memory and that should be much, much faster.\r\n\r\nAnother advantage is the worker API allows us to terminate the worker and free up the memory, which is one of the biggest benefits of running a plugin in a subprocess.\r\n\r\nWe need to investigate to make sure workers cannot accidentally call {{process.exit()}} or something and take down the core. Furthermore, we need to make sure we can gracefully handle a plugin with bad syntax.\r\n\r\nWhile workers solve many problems, we still need to keep the current design just in case a plugin needs to lock down the Node.js version.", "attachment": [], "flagged": false, "summary": "appcd-plugin: Invoke external plugins using workers", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }