I am using wix as a data collector and processor (yes I know typically one would use SQL DBs and external hosts then use wix as a front end). Think internet of things. My company sells units that then report throughout the day to my website's database through post requests. Then once on the website, I generate reports based on who's logged in to display to them their corresponding data. I am trying to run the most efficient and fastest code possible. My question is this, which of these scenarios is the smartest for running my reports.
A.) Client-Side: A user loads their page, then hits a run report button. This button calls the server to query the database and then upon returning, the users computer will then run through all the data, calculating reports and when done, present the data to the user.
B.) Server-Side: A user loads their page, then hits a run report button. This button calls a backend method that then handles query calls, calculates the reports, and once done returns these results back to the users machine to then be displayed to the user.
From my testing, when running the code server side, (which makes sense), the reports are generated significantly faster. This is because, obviously, no matter what device initiated the request whether that be a phone, modern computer, or an old computer, the server does all the heavy lifting. The only downside I see to this, is that the more users running reports, the significantly more load is put on wix servers. This is something I have to take into consideration for if (hopefully when) my company grows and my user base becomes significantly larger with multiple users running reports simultaneously. Should I be concerned about slowing down wix's servers running my particular website or is the processing power allowed to my site dynamic enough that wix will accommodate for a surge of requested resource power? If more than one user is trying to calculate data at the same time, will there load be distributed or processed sequentially? Also how are database queries handled?
I know this is a long and potentially difficult question to answer so I thank you for your time and appreciate the support.