Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Multitasking with Multiple Engines

I used the great information from your white page on using "out of process" engines to multitask parts of my application. I am having a side effect bug during the time that the remote request is processing that I don't quite understand as to why it is happening or how to fix it.

During the processing of the remote request I can continue to enter data into the controls as would be expected, but a few of the SRP controls do not behave properly. The SRP Sublcass control will not fire the OnOptionClick event and in one of my SRP Edit Tables that has a validation/conversion setting gives a validation error something like " '1' is not a valid number " It doesn't recognize my number entries and continues to give me the validation error until the "out of process" request is complete.

Is there something that I should be looking at as far as the request is made. I followed the "black box" example given in the white page on the wiki site, and it seems to work great except for these bugs with the SRP controls that I have found.

Comments

  • Dang, Dan, you forced me to re-read my own White Paper to understand what you are talking about! :-) That paper is at least 10 years old...

    Okay, my first question is what are you doing to allow OpenInsight to continue working while you are waiting for the remote request to respond? Are you using a tight loop with the Yield() call or are you employing the TIMER event approach?
  • 10 years old! And the information is still valid? That's rare in this industry...

    I am using the yield call in a loop. Will the TIMER event approach work better?
  • Dan,

    It is a bit dated because engine-to-engine interfacing is not the official approach Revelation would suggest. The Engine Server is what they would guide you toward. However, the Engine Server is geared toward passing off requests to another server rather than running those requests locally. In order to accomplish a local hand-off, each workstation would need to have the Engine Server installed. Not ideal or practical.

    The TIMER event approach would definitely provide you better results because it will relax the in-process engine in between the TIMER events. The tight loop with a yield still puts a load on the in-process engine although it slices some time to process other events.

    We wrote a self-contained remote engine utility that uses the TIMER event. It is a part of FrameWorks so we don't make it available for free. You can contact me privately if you want to make an arrangement of some kind. However, before you go down that path or even attempt to engineer this yourself, I suggest adding several more Yield calls in your loop to see if that helps.
  • I added 20 yields and still have the same result. I did some testing and found the problem to be caused by the loop with yield rather than the request to the "out of process" engine. The SRP Controls do not behave properly during any tight loop with Yield calls. The TIMER event approach appears that it will work much better.

    I'm not sure if I understand the official approach to using the Engine Server. Is there some documentation on the difference between the Engine Server and having a engine running on a server that users can access via the CreateEngine function?
  • Dan,

    It had about a 50/50 chance of working. :-) The problem ultimately comes down to the way OLE controls are tied to the engine. You might have differing levels of success by playing with the sync flag in the QUALIFY_EVENT but I would guess this is not going to yield anything positive (pun intended.)

    Sadly, the documentation on the Engine Server is rather minimal. In fact, that documentation that exists is primarily designed for external systems that need to communicate with OI. There is no documentation that explains how to get OI itself to talk to the Engine Server. Through our own blood/sweat/tears/bribery/nagging/etc. we have gotten some information and have written some Basic+ utilities to work this out.

    In your \Documents folder you should see a 103-966 OpenInsight OEngineServer Configuration.pdf file. You might be able to glean some helpful information. Again, this is not written for the benefit of Basic+ communications. I think sticking with Remote Engine calls will be your best bet.
Sign In or Register to comment.