Announcement

Collapse
No announcement yet.

multiple copies at once

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • multiple copies at once

    I am porting an app from another feed to work with the desktop API. My app gathers historical data for a SINGLE symbol, does a significant amount of calculation, analysis, and table building and then updates the real time activity.

    After spending the last few weeks modifying things to work (with some success), I decided to run a test using multiple copies for different symbols as I do on the other data source. This didn't seem to work. I immediately received a subscript error on the first app when I triggered the second request. Normally I run 4-6 instances but I have run as many as 10 before.

    I must say this caught me off guard. Is it not possible to run concurrent apps using the API?

    david

  • #2
    You can run multiple concurrent apps if you need to. What is probably happening, I'm guessing, as it used to do this but I haven't tried it in a while, is that all apps receive events for all open handles regardless of which app opened the handle. So if you just make sure that a given instance of an app only processes events for handles that app opened, it should work. This is how the API behaved many versions ago though, so things might have changed.

    Cheers... George

    Comment


    • #3
      George,

      Thanks for answering. I'll check that handle business in the morning. You seem to be saying that you think the handle values are incremented with every request through the API (across applications or copies of the same applications) and that every app will see all events or returned values. Did I misunderstand?

      I see this issue compounding for me if I try to run several concurrent apps for different purposes that all use the API. I see some potential for confusion as I sort thru the events. I don't want to be touching requests for the wrong app. Every app will have to filter its own events.

      Of course, the best thing would be to have the whole issue transparent for us all.

      I hope I can figure this one out or else I'm dead in the water. If anyone else has dealt with this before, I'd appreciate some ideas.

      Thanks,

      David

      Comment


      • #4
        Yes. That is what I meant. I assume it still works this way.

        It really isn't that big of an issue though since you should be storing the handle returned by the request you made and each event triggered passes in the handle for which the event is associated. So just say "does the handle equal one I asked for?" If so, process it. If not, ignore it. That's what my apps do and I haven't had any issues running more than one app at the same time (the few times I've done it). That being said, it probably would be more efficient to have one app that tracks multiple symbols rather than multiple apps that each only track one symbol.

        Cheers... George

        Comment


        • #5
          I'll experiment with this later today.

          As for dealing with multiple symbols, I agree it might be more efficient to have a single routine gathering data for multiple symbols but I am trying to achieve compatibility with an existing program and just offer a new datafeed.

          I don't have any reason to track many symbols at once but there are a lot of complex, multiform presentations for each symbol requested. It's a significant architectural change and I'd probably have to go back and change the other feed as well. I'm not ready to do that right now.

          I appreciate your response.

          David

          Comment

          Working...
          X