Execution Manager

How to build a non-blocking request/response mechanism between Ignition and my module using Execution Manager? Cyclic polling doen’t seem to be right for me. Is there any other ajax like API supported in Ignition?
BR
PRAMANJ

Nothing built it, but if you have your own threadpool dedicated to your communications to your server then you’re probably okay - you won’t be blocking other parts of the Ignition system.

Otherwise you could use something like hc.apache.org/httpcomponents-asyncclient-dev/ if you’re doing HTTP.

I am doing something like this:

context.createExecutionManager(TASK_NAME, 1).executeOnce(new Runnable() {@Override public void run(){ update();}} )

in update() I open TCP server socket to which my application connectes as a TCP client in a request / response mode in a loop till client requests close.

Is there anything wrong in this kind of approach?

regards
PRAMANJ

That’s probably okay. You could just use a regular Thread here instead of an ExecutionManager though.

Thanks for the tip. I will try that. However my other problem stills remains is that I am unable to connect to this TCP server socket from a client socket directly from other machine. I have created an intermediate communication server on the Ignition server outside Ignition to which my client from other physical machine is able to connect. Is it related to creation of thread from the Execution Manager? If it was from a normal thread , would it have been able to connect directly from other physical machine?

Regards
PRAMANJ

[quote=“Pramanj”]Is it related to creation of thread from the Execution Manager? If it was from a normal thread , would it have been able to connect directly from other physical machine?

Regards
PRAMANJ[/quote]

Shouldn’t make a difference.

Thanks but I really don’t know why it happens! Wish I could walk you thru my code. Please let me know if that’s possible?
Regards
PRAMANJ