Network and Data persistence should be in main or render process?


I’m new to electron, after reading all the docs I could find, I still don’t have a clue regarding where to put my network code and data persistence. Should they be in the main process or the rendering process?

If my program follows the model, view, controller architecture, should be main process be the controller?

If I need to cache data locally, should I use indexeddb in the rendering process? Or I should use the filesystem with the main process? Or filesystem accessed within the rendering process?