PDA

View Full Version : Performance.




173080
Sep 15, 2008, 10:26 AM
I need to write an application to analyze time series data and run simulations with millions of iterations. Some calculations will be with historical data, some will be in real time. I was thinking about using C++ for the speed. It's very likely that I'll use Xgrid. If I want to use Cocoa I need to write it in Objective-C.

Am I right about choosing C++/Carbon for the job?



robbieduncan
Sep 15, 2008, 10:31 AM
You can easily write the back-end data logic in C++ and use Cocoa for the user interface (if there is one).

173080
Sep 15, 2008, 10:37 AM
I was thinking about writing the backend in C++ and console only. The backend can receive orders and return results from multiple clients and take care of spawning the multiple calculation threads through Xgrid.

I could write the graphical client in Cocoa/Obj-C.

I can connect the two parts through sockets.

This way I would have the best of both worlds, right? Is there something I'm missing?

robbieduncan
Sep 15, 2008, 10:48 AM
I was thinking about writing the backend in C++ and console only. The backend can receive orders and return results from multiple clients and take care of spawning the multiple calculation threads through Xgrid.

I could write the graphical client in Cocoa/Obj-C.

I can connect the two parts through sockets.

This way I would have the best of both worlds, right? Is there something I'm missing?

That is a perfectly sensible design. It should also make the back-end portion more portable.

lazydog
Sep 15, 2008, 12:18 PM
You probably already know about this, but just in case, you can mix C++ and Objective-C.

b e n

173080
Sep 15, 2008, 12:29 PM
How does Xgrid fare with continous processes?

From what I read it's job-oriented. What I want to do is spawn parallel processes that analyze information continuously until I decide to stop them. They never quite finish a job because they process the data as it becomes available. Those processes send their findings back on the fly but they shouldn't stop running. Can I send partial results back to the Xgrid controller or should I send them through sockets to another process that monitors the results?

robbieduncan
Sep 15, 2008, 12:36 PM
Unless you are looking to distribute the jobs across machines on the network there is no reason to use XGrid: you might as well manage the threads yourself as there will be less overhead. As to semi-complete jobs, not sure, I've not used XGrid myself...

173080
Sep 15, 2008, 12:49 PM
Unless you are looking to distribute the jobs across machines on the network there is no reason to use XGrid: you might as well manage the threads yourself as there will be less overhead. As to semi-complete jobs, not sure, I've not used XGrid myself...

I do need to distribute the threads across several servers to have enough power for the real-time calculations. I can't risk any lagging and it needs to be perfectly scalable.

robbieduncan
Sep 15, 2008, 12:53 PM
I do need to distribute the threads across several servers to have enough power for the real-time calculations. I can't risk any lagging and it needs to be perfectly scalable.

Well, then XGrid may well be the way forward. You will probably need to split the data to be analysed into jobs and then receive the results for that job at the central controller.