title: Electron JS running time consuming process in the back
body: <p><strong>TLDR</strong></p>
  <p>I am using <a href="https://github.com/reZach/secure-electron-template" rel="nofollow noreferrer">reZach's</a> repo (<a href="https://github.com/reZach/secure-electron-template" rel="nofollow noreferrer">https://github.com/reZach/secure-electron-template</a>) as a starting guide and it works so far so good. I am able to communicate back and forth ipcMain, ipcRenderer and React typescripts.</p>
  <p>However, I still lack of many knowledge.</p>
  <ol>
  <li>Refer to <strong>Image 1</strong> where an user will click <strong>Convert</strong> then I will run the process in the background and the user can still continue other operations. The convert process usually handles <code>.xlsx</code> file around 90MB.</li>
  <li>The <strong>Template</strong> menu on the left will handle the connection to <code>SFTP</code> to read &amp; write around 5k <code>.xml</code> files continuously.</li>
  </ol>
  <p>So my question is:</p>
  <p>How do I run processes in the background and display the progress in the page marked in red <code>2</code> in <strong>Image 1</strong>. Should I use multi-thread or service-workers or child process or etc for these kind of tasks?</p>
  <p>Also, the progress bar is not actually calculating anything but the numbering [3] on the right indicates how many tasks left. But when user click to enter the page, they will see a list of running processes there.</p>
  <p><strong>Image 1</strong>
  <a href="https://i.stack.imgur.com/myNEw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/myNEw.png" alt="enter image description here" /></a></p>
  <p><strong>Story before the Electron JS development</strong></p>
  <p>I have developed a system using python for data processing stuff e.g. reading and writing large excel 90MB+ and connecting to SFTP to process around 5k+ xml files continuously (the connection would drop after around 500 files but I just programmatically re-run it). So far in python it is working fine but I would like to develop another copy using web technologies via Electron JS.</p>