With Lycia, distributed messaging between different processes and applications is achieved by applying a number of methods to objects of a corresponding data type.
|
data type |
description |
associated methods |
||
|
an object serving as a container for all the sockets of a single process. By creating a new context, you start one or more input/output threads:
DEFINE context ZMQ.Context
|
|
|
||
|
an object serving as an asynchronous message queue within the specified context, with the exact semantics depending on the socket type in use:
DEFINE responder ZMQ.Socket
Sockets are created by applying the socket() method to the object of ZMQ.Context type:
LET responder = context.Socket("socket_type")
|
|
|||
|
an object serving as a polling board: It questions the sockets on whether events of a certain type have occurred and signals the polling results:
DEFINE context ZMQ.Poller
|
|
|
||
|
an object holding the message which can be sent or received via any ZMQ socket:
DEFINE msg ZMQ.Msg
|
||||
Successful integration of ZeroMQ into Lycia requires from 4gl developers to be attentive and consistent with their coding.
We recommend you to use meaningful variables and thoroughly structure the 4gl code in order to ensure proper runtime behavior of your applications.