IBM Support

How are the various routing methods implemented in SDL and which is the most efficient?

Question & Answer


Question

How are the various routing methods implemented in SDL and which is the most efficient?

Answer

We can route a signal in any of the following ways:

A)Routing using TO <SDL PID>
B)Routing using TO <SDL process name>
C)Routing using VIA

The absence of routing information leads to a default path.

There are three actions performed in generated code to send a signal. First, function xGetSignal is called to obtain a data area that represents the signal instance. Then the signal parameters are assigned their values and finally the function SDL_Output is called to actually send the signal.
In the SDL_Output function there are two dynamic tests (to check if the receiver in the 'TO-clause' is not NULL and to check if there is a path to the receiver). If the output does not contain any TO-clause and the Cadvanced/Cbasic SDL to C Compiler has not been able to calculate the receiver, the function xFindReceiver is called to calculate the receiver according to the rules of SDL.

SDL_Output takes parameters as follows:
SDL_Output (xGetSignal(xSignalIdNode Stype, SDL_Pid Receiver, SDL_Pid Sender),
xIdNode ViaList[] );

Hence, specifying the PId Value of the receiver using routing TO <SDL PID>[A] will be the most efficient way and routing TO <SDL process name>[B] will be the next most efficient way.

As the second parameter checks for the VIA path to identify the receiver process, specifying VIA for signal routes is also a efficient routing method. However, channels do introduce a delay and the computation time is not deterministic; it is assumed that signal routes do not introduce any delay. If you do not specify both the Pid of the receiver process and the VIA path, function xFindReceiver is called to identify the path of the receiver. The second parameter is used to specify whether a VIA clause is or is not part of the output statement. The value (xIdNode *)0 (a null pointer), is used when no VIA clause is present.

xFindReceiver is one of the most time consuming functions.

It is better to implement a handshake in the initialization to pass Pids so that the high-volume routing can be done with the Pids without the use of VIA .

SDL Suite 4.xSDL_Suite-FAQ-35AnswerProduct versionPartner ContentInternal ContentCategoryReference ID

[{"Product":{"code":"SSYQGX","label":"Rational Tau"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General Information","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

KB6933

Document Information

Modified date:
16 June 2018

UID

swg21325409