Difficulties in integrating Web workers with child process on React(Front end) #14
bhanvimenghani
started this conversation in
General
Replies: 1 comment
-
Resources used: Child Process Code Implementation |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Requirement : Creating a multi threaded function on the UI for a better user experience. Also the thread has to call a shell script with the functionality to check cluster, connect to cluster, fetch port no. and ip, form a url and curl from that url.
Progress :
Pictorial representation:
Error : On integrating Web worker with the child process I was getting Uncaught ReferenceError
Solution : Error is due to adding child process at the wrong place. We cannot use child process on front-end (React) but can be used on Node js side (back-end). Also, we can not run shell script on browser as it is not made for that purpose.
A work around could be we can have web worker on front-end and shell script on back-end and an API to connect them.
Solution Credits : @Sara4994
Beta Was this translation helpful? Give feedback.
All reactions