Hi @j4n_bur53
Thank you for the terminology: foreign vs. remote predicate.
But, no confusion here.
In this call for discussion, I indeed meant to “conflate” between Scenario 2 and Scenario 4, below.
This is what a proxy is [1] – one object serving as an interface to another object, typically, located elsewhere, including remotely.
There is a Scenario 4:
Scenario 4:
+----------+-----------------------+ +-----------------+ -------_-+
| Prolog | Prolog FFI Proxy Half |------| Foreign Proxy | Foreign |
+----------+-----------------------+ +-----------------+----------+
I imagine that Foreign Proxy and the current FFI would have equivalent and fully interchangable interfaces.
The idea, is, I guess, analogous to RPC calls, where the client is oblivious if the called function / object is local or remote – and the Foreign code is oblivious that it’s called via a proxy foreign interface.
Now why to do that:
For a developer, it would allow creating the Foreign code against the Foreign Proxy API – in any IDE and supported language that can run in parallel to the IDE used for Prolog code.
Once development is completed, the developer can choose to switch to scenario 2 – and have the Foreign code loaded as is today.
Whether such a construction makes sense to keep as a remote “RPC” – perhaps yes – but, then all other considerations come to play including security, etc.
I guess there is also a scenario 5, for transparent Prolog to Prolog RPC calls … if one wants to create a distributed system – i guess, a ROS Prolog embedding is doing just that, although, perhaps not transparently for Prolog developers.
[1] Proxy pattern - Wikipedia