Performance.

Discussion in 'Mac Programming' started by 173080, Sep 15, 2008.

  1. macrumors 6502

    Joined:
    Aug 15, 2003
    #1
    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?
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    You can easily write the back-end data logic in C++ and use Cocoa for the user interface (if there is one).
     
  3. thread starter macrumors 6502

    Joined:
    Aug 15, 2003
    #3
    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?
     
  4. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    That is a perfectly sensible design. It should also make the back-end portion more portable.
     
  5. macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #5
    You probably already know about this, but just in case, you can mix C++ and Objective-C.

    b e n
     
  6. thread starter macrumors 6502

    Joined:
    Aug 15, 2003
    #6
    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?
     
  7. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #7
    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...
     
  8. thread starter macrumors 6502

    Joined:
    Aug 15, 2003
    #8
    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.
     
  9. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #9
    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.
     

Share This Page