x2 Basics
x2 documents reside on has its own project home. Here we summarise the x2 concepts in brief in order to help you understand x2net more easily.
x2 and Ports
x2 is a set of concepts and specifications that helps people build highly flexible cross-platform, cross-language distributed applications. A port is an actual implementations of x2 targeting specific language or platform. Any two x2 ports should be able to interfact each other without hassle, assuming that they comply x2 design rules.
Concepts
Shared Knowledge
Participants of a distributed application usually depend on the knowledge shared among them.
Constant
Named constant values may be defined and shared.
Cell
A cell is a predefined common data structure to be shared. As a composite data record, a cell contains one or more properties whose data types may be either primitive or composite (including another cell).
Event
An event is a special kind of cell that can travel across different flows. In order for a remote recipient to identify the events it receives, events carry their own type identifiers unique within an application domain.
Exchanging events should be the only way that cases/flows communicate each other.
xpiler
The shared knowledge of an application, defined in definition files, is x-piled (trans-piled or cross-piled) into corresponding source files to form a part of the entire application. By xpiler we mean this definition-to-source converting tool.
Structural Components
Flow
A flow is a physical execution unit that consumes or produces events. Flows need to be attached to the hub in order to be notified with application-scope events.
Hub
The hub is the event distribution bus to which flows are attached. In most cases, an x2 process maintains only one single hub with it.
Case
A case is a logical execution unit that can be staccked within a holding flow.
Link
A link is a special kind of flow or case, which provides inter-process event communication across local or remote x2 processes. It plays the key role in x2 style distribution.
Links are able to serialize/deserialize events to/from x2 wire format.