I'm working on some programs that carry out biological simulations (just as a hobby, not professionally), and some are very computationally intensive - they need to run for hours or even days before they can get really interesting results. These programs are ultimately intended to be used as educational tools.

I have been working in C++ (because it's fast) and using Qt as my framework for GUI stuff (because it's cross-platform). This means that my programs would have to be distributed by somewhat traditional means (exe, app bundle, etc.). However, I keep hearing from my programmer friends that downloading programs as executable files is old fashioned, and I should be making web apps instead.

Now, to my real question: is it possible to make a long running, computationally intensive program work well as a web app? And to be clear, since I have limited money to spend on this project and tons of CPU power would be needed, the computation would need to be done on the client, not on the server. Is such a thing feasible, or should I just continue with my current C++/Qt approach?

有帮助吗?

解决方案

I personally don't think packaged executables are out of vogue - or that it should be a web application. Making it a web application might just complicate things.

If you aren't willing to do the work server side, then a web application would be very limited. The only things I can think that would work:

  1. Pure Javascript. Yikes. For long running computations this just won't work. If the person closes their browser it's over. In fact most browsers will prompt the user about long running Javascript processes and suggest they kill them.

  2. Maybe Flash or Silverlight? Client side code, but again the same problem ... you'd have to hope the user wouldn't just closer the browser and thus kill their long running process.

You can definitely fire up some cheap servers with Amazon EC2 and do the work for them - and that would be really cool. They could close the browser after issuing the request and then re-open it later and check on the status.

But if it has to be client side - go with C++/Qt.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top