FAQ on Bridges/en
Inhaltsverzeichnis
Why Bridged Actions and not Script Actions?[Bearbeiten]
Script actions will start the language interpreter anew for every such action. Thus, no internal state can be held and transferred from one such action to another. Especially, it is not possible to open a communication channel on one action, pass it back to expecco, and use it with different followup actions (i.e. actions like "open-port" / "send message" / "receive message" / "close port" etc.).
For this, it is required to call individual API-entries inside the bridge code, and return handles from the bridge to expecco, which can later be passed to other API entries. This of course only makes sense, if the interpreter stays active during the lifetime of the connection.
On the other hand, script actions are easier to use if a self contained program or app is to be started, or which performs a single processing action or which stays alive for longer, serving a socket or database. In any such case, there is no need to exchange individual data objects (such as handles) with expecco. It may however interact with expecco through other communication channels, such as sockets, RPC calls, SOAP interface or stain/stdout text ports.
Which Languages are Supported[Bearbeiten]
By the time this chapter was written, bridged code execution is supported for:
- Java (using either Groovy or jPython as "glue")
- Python (both Python 2.7 and Python 3.x)
- .NET (using IronPython as "glue")
- NodeJS
- C/C++
- Smalltalk (both Smalltalk/X and VisualWorks are supported)
How are Bridges Started[Bearbeiten]
Bridges on the local machine are usually automatically started by expecco itself, when the first such action is executed (and stays alive, until expecco is terminated, or bridge connections are close via the menu or via an expecco action block).
Bridges on other machines, or additional bridges on the local machine must be started by executing a bridge start action block or simply by executing a shell/batch action to call the corresponding language interpreter (python, node, etc.).
Who Initiates the Connection[Bearbeiten]
Normally, expecco opens a port and tells the bridge (via command line argument) to which port to connect. Depending on the setup of your network and firewall, it may sometimes be required to reverse this, and let the bridge open a port and expecco connect to it. For this, some bridges support command line arguments ("--server" and "--port") to specify this behavior. Details are found in the individual bridge documentation pages.
Ports Used for Bridge Communication[Bearbeiten]
Unless ports are configured in the expecco settings, the following default ports are used (bridges typicallly listen on this port):
Python 8677 , 8678 (debug) Python2 8679 , 8680 (debug) Python3 8681 , 8682 (debug) Jython 8777 , 8778 (debug) IronPython 8787 , 8788 (debug) Node 8577 , 8578 (debug) Electron 8588 , 8589 (debug) CBridge 8855 Root/Cling. 8883 Smalltalk 8877 VASmalltalk 8879 VWSmalltalk 8881