Creating a LAPIS Network - aaronmalone/lapis GitHub Wiki
LAPIS allows programmers to build networks of computationally steered applications. Each application (also known as a simulation, or model) within the network can access other applications' published variables.
To create a LAPIS network, you must first create a LAPIS coordinator node. The coordinator node within a LAPIS network is the node that is responsible for maintaining a record of all of the nodes on the network. This record is stored within the LAPIS framework, so the client does not need to be concerned about it. After the coordinator node has been created, you can add multiple non-coordinator nodes to the network. It is important to note that, with respect to the application, there is nothing special about the coordinator node--it is just another node on the network. Once the coordinator node is set up, the application does not have to worry about it.
There are three key details that application programmers must be aware of regarding coordinator and non-coordinator LAPIS nodes:
- Coordinator nodes and non-coordinator nodes are created using different constructors for the LAPIS API object (
LapisAPI
in MATLAB,LapisApi
in Java). The details for LAPIS API object creation are described in the sections on using LAPIS in MATLAB and Java. - The coordinator node must be running before non-coordinator nodes can join the network. If a non-coordinator node starts up before the coordinator for its network is running, an exception will be thrown when the non-coordinator attempts to connect to the coordinator and subsequently fails.
- Each LAPIS network has only one coordinator, but a single application can participate in multiple LAPIS networks, by instantiating multiple LAPIS API objects that connect to different LAPIS networks.