OK. I understand.
- I doubt if a Linux distribution of Caché contains any Windows mechanics. ( to be checked with WRC )
- on the other hand I don't believe it's possible or make sense  to run Caché Win distribution in a Win-Shell ...
So suggested workaround:
Have a VM (or small machine) with Windows +Caché and connect via ECP or similar (REST, WebService, JDBC, ...)  to your main Caché instance on Linux. 

OR:

Wrap some C# around your DLL on a Windows box and present it as a WebService that you call from Linux.

Hi Jeffrey,

Your descriptions matches pretty well what is titled in Ensemble as "Workflow"
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

It uses specialized Request and Response messages that are designed to allow a significant time gap in between.
It's originally designed for human interactions but to my understanding it implements exactly your "sideline".
And human interaction is just there to show it may take long time to get a reply.
There is also an example in ENSDEMO  Demo.Workflow.Production  ​

 HTH,

Robert

My sample took somewhat longer to prepare then Edward's smiley and Gerd's

#1) to evaluate SQL statements use MgmtPortal/ Explorer/SQL and check the generated query plan.

#2) if you don't use special attributes to SELECT clause or sub-queries all SQL statements are strictly worked from left to right.
 your first statement is ok for SQL your 2nd is just a fragment that I interpreted as to be a sub-query

Summary: they are not identical.

Now the example transformed for namespace SAMPLES to have 3 tables as A, B, and C:

select A.id,B.id,c.Id from
    sample.person A left join 
    sample.employee B on A.id = B.spouse 
    inner join sample.company C on B.company = C.id 

 

Row count: 100

Query Plan:

Relative cost = 4200
Read extent bitmap Sample.Employee.$Employee, looping on ID.
For each row:
     Read master map Sample.Employee.IDKEY, using the given idkey value.
    Read extent bitmap Sample.Person.$Person, using the given ID.
 For each row:
     Read master map Sample.Company.IDKEY, using the given idkey value.
 Output the row.
 

transformed to sub-queries:

select aid,bid,cid from
(select A.id aid, b.id bid, b.company cid 
    from sample.person A 
    left join sample.employee B
    on A.id = B.spouse)
 inner join sample.company C 
 on cid = C.id 

it is obviously identic ! just more expressive.

Row count: 100

Query Plan:

Relative cost = 4200
Read extent bitmap Sample.Employee.$Employee, looping on ID.
For each row:
     Read master map Sample.Employee.IDKEY, using the given idkey value.
    Read extent bitmap Sample.Person.$Person, using the given ID.
 For each row:
     Read master map Sample.Company.IDKEY, using the given idkey value.
 Output the row.

the next  LEFT_JOIN(A,INNER_JOIN(B.C))  requires immediate transformation

select A.id,bid,cid from
sample.person A left join
(select b.id as bid,c.id cid, b.spouse bsp 
 from sample.employee B
 inner join sample.company C on B.company = C.id) 
 on A.id = bsp

Row count:  237  (!!!!)

Query Plan:

Relative cost = 32408
Read extent bitmap Sample.Person.$Person, looping on ID.
For each row:
 Call module E.
 Read temp-file A, using the given VIEW column #3, and looping on VIEW counter.
 For each row:
 Generate a row padded with NULL for the view if no row qualified.
 Output the row.
module E
Read extent bitmap Sample.Employee.$Employee, looping on ID.
For each row:
 Read master map Sample.Employee.IDKEY, using the given idkey value.
 Read master map Sample.Company.IDKEY, using the given idkey value.
 Increment view row counter.
 Add a row to temp-file A, subscripted by VIEW column #3 and VIEW counter,
 with node data of VIEW column #1 and VIEW column #2.

So both variants are possible though the result is different

HTH,