Equalizer network layer. More...
Classes | |
| class | Barrier |
| A networked, versioned barrier. More... | |
| class | BufferConnection |
| A proxy connection buffering outgoing data into a memory region. More... | |
| class | Command |
| class | CommandCache |
| A command cache handles the reuse of allocated packets for a node. More... | |
| class | CommandFunc |
| A wrapper to register a function callback on an object instance. More... | |
| class | CommandQueue |
| A CommandQueue is a thread-safe queue for command packets. More... | |
| class | Connection |
| An interface definition for communication between hosts. More... | |
| class | ConnectionDescription |
| Describes Connection parameters. More... | |
| class | ConnectionListener |
| A listener interface to connection changes. More... | |
| class | ConnectionSet |
| A set of connections. More... | |
| class | DataIStream |
| A std::istream-like input data stream for binary data. More... | |
| class | DataOStream |
| A std::ostream buffering and/or retaining data in a binary format. More... | |
| class | Dispatcher |
| A helper class providing command packet dispatch functionality to networked objects. More... | |
| class | Global |
| Global parameter handling for the Equalizer network implementation. More... | |
| class | InstanceCache |
| class | LocalNode |
| Specialization of a local node. More... | |
| class | Node |
| Manages a node. More... | |
| class | Object |
| A generic, distributed object. More... | |
| class | ObjectCM |
| The object change manager base class. More... | |
| struct | ObjectVersion |
| A helper struct bundling an object identifier and version. More... | |
| struct | Packet |
| A packet send over the network. More... | |
| struct | NodePacket |
| Packet sent to and handled by an eq::net::Node. More... | |
| struct | ObjectPacket |
| Packet sent to and handled by an eq::net::Object. More... | |
| class | PairConnection |
| A meta connection consisting of two (unidirectional) connections providing bidirectional communication. More... | |
Functions | |
| std::ostream & | operator<< (std::ostream &os, const Command &) |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &os, const CommandFunc< T > &func) |
| std::ostream & | operator<< (std::ostream &, const Connection &) |
| std::ostream & | operator<< (std::ostream &, const ConnectionDescription &) |
| std::string | serialize (const ConnectionDescriptions &) |
| Serialize a vector of connection descriptions to a string. | |
| bool | deserialize (std::string &data, ConnectionDescriptions &descriptions) |
| Deserialize a vector or connection descriptions from a string. | |
| std::ostream & | operator<< (std::ostream &os, const ConnectionSet *set) |
| std::ostream & | operator<< (std::ostream &os, const ConnectionSet::Event event) |
| std::ostream & | operator<< (std::ostream &os, const ConnectionType &type) |
| std::ostream & | operator<< (std::ostream &os, const DataOStream &dataOStream) |
| bool | init (const int argc, char **argv) |
| Initialize the Equalizer network classes. | |
| bool | exit () |
| De-initialize the Equalizer network classes. | |
| std::ostream & | operator<< (std::ostream &, const InstanceCache &) |
| std::ostream & | operator<< (std::ostream &os, const LocalNode &node) |
| std::ostream & | operator<< (std::ostream &os, const Node &node) |
| std::ostream & | operator<< (std::ostream &, const Node::State) |
| std::ostream & | operator<< (std::ostream &os, const NodeType &type) |
| std::ostream & | operator<< (std::ostream &, const Object &) |
| std::ostream & | operator<< (std::ostream &os, const ObjectVersion &ov) |
| std::ostream & | operator<< (std::ostream &os, const Packet *packet) |
| std::ostream & | operator<< (std::ostream &os, const NodePacket *packet) |
| std::ostream & | operator<< (std::ostream &os, const ObjectPacket *packet) |
Typedefs | |
| typedef base::UUID | NodeID |
| A unique identifier for nodes. | |
| typedef base::uint128_t | uint128_t |
| typedef base::RefPtr< Node > | NodePtr |
| A reference pointer for Node pointers. | |
| typedef base::RefPtr< LocalNode > | LocalNodePtr |
| A reference pointer for LocalNode pointers. | |
| typedef base::RefPtr< Connection > | ConnectionPtr |
| A reference pointer for Connection pointers. | |
| typedef base::RefPtr < ConnectionDescription > | ConnectionDescriptionPtr |
| A reference pointer for ConnectionDescription pointers. | |
| typedef std::vector< NodePtr > | Nodes |
| A vector of NodePtr's. | |
| typedef std::vector< Object * > | Objects |
| A vector of objects. | |
| typedef Objects::const_iterator | ObjectsCIter |
| A const iterator for a vector of objects. | |
| typedef std::vector< Barrier * > | Barriers |
| A vector of Barriers. | |
| typedef std::vector < ConnectionPtr > | Connections |
| A vector of ConnectionPtr's. | |
| typedef std::vector < ConnectionDescriptionPtr > | ConnectionDescriptions |
| A vector of ConnectionDescriptionPtr's. | |
| typedef ConnectionDescriptions::iterator | ConnectionDescriptionsIter |
| An iterator for a vector of ConnectionDescriptionPtr's. | |
| typedef ConnectionDescriptions::const_iterator | ConnectionDescriptionsCIter |
| A const iterator for a vector of ConnectionDescriptionPtr's. | |
Enumerations | |
| enum | NodeCommand { CMD_NODE_STOP, CMD_NODE_MESSAGE, CMD_NODE_CONNECT, CMD_NODE_CONNECT_REPLY, CMD_NODE_CONNECT_ACK, CMD_NODE_ID, CMD_NODE_DISCONNECT, CMD_NODE_GET_NODE_DATA, CMD_NODE_GET_NODE_DATA_REPLY, CMD_NODE_ACQUIRE_SEND_TOKEN, CMD_NODE_ACQUIRE_SEND_TOKEN_REPLY, CMD_NODE_RELEASE_SEND_TOKEN, CMD_NODE_ADD_LISTENER, CMD_NODE_REMOVE_LISTENER, CMD_NODE_ACK_REQUEST, CMD_NODE_FIND_MASTER_NODE_ID, CMD_NODE_FIND_MASTER_NODE_ID_REPLY, CMD_NODE_ATTACH_OBJECT, CMD_NODE_DETACH_OBJECT, CMD_NODE_REGISTER_OBJECT, CMD_NODE_DEREGISTER_OBJECT, CMD_NODE_MAP_OBJECT, CMD_NODE_MAP_OBJECT_SUCCESS, CMD_NODE_MAP_OBJECT_REPLY, CMD_NODE_UNMAP_OBJECT, CMD_NODE_UNSUBSCRIBE_OBJECT, CMD_NODE_OBJECT_INSTANCE, CMD_NODE_INSTANCE, CMD_NODE_CUSTOM = 40 } |
| enum | ObjectCommand { CMD_OBJECT_INSTANCE, CMD_OBJECT_DELTA, CMD_OBJECT_SLAVE_DELTA, CMD_OBJECT_COMMIT, CMD_OBJECT_CUSTOM = 10 } |
| enum | BarrierCommand { CMD_BARRIER_ENTER = CMD_OBJECT_CUSTOM, CMD_BARRIER_ENTER_REPLY, CMD_BARRIER_CUSTOM = 20 } |
| enum | ConnectionType { CONNECTIONTYPE_NONE = 0, CONNECTIONTYPE_TCPIP, CONNECTIONTYPE_SDP, CONNECTIONTYPE_PIPE, CONNECTIONTYPE_NAMEDPIPE, CONNECTIONTYPE_IB, CONNECTIONTYPE_UDP, CONNECTIONTYPE_MULTICAST = 0x100, CONNECTIONTYPE_MCIP = CONNECTIONTYPE_MULTICAST, CONNECTIONTYPE_PGM, CONNECTIONTYPE_RSP } |
The supported network protocols. More... | |
| enum | LogTopics { LOG_OBJECTS = base::LOG_CUSTOM << 0, LOG_BARRIER = base::LOG_CUSTOM << 1, LOG_RSP = base::LOG_CUSTOM << 2, LOG_PACKETS = base::LOG_CUSTOM << 3, LOG_CUSTOM = base::LOG_CUSTOM << 4 } |
| enum | NodeType { NODETYPE_EQNET_INVALID, NODETYPE_EQNET_NODE, NODETYPE_EQNET_USER = 0x100 } |
Node types to identify connecting nodes. More... | |
| enum | PacketType { PACKETTYPE_EQNET_NODE, PACKETTYPE_EQNET_OBJECT, PACKETTYPE_EQNET_CUSTOM = 1<<7 } |
Variables | |
| const uint128_t | VERSION_NONE |
| Special object version values. | |
| const uint128_t | VERSION_FIRST |
| const uint128_t | VERSION_NEXT |
| const uint128_t | VERSION_INVALID |
| const uint128_t | VERSION_OLDEST |
| const uint128_t | VERSION_HEAD |
Equalizer network layer.
Collage is a cross-platform C++ library for building heterogenous, distributed applications. It is used as the cluster backend for Equalizer. Collage provides an abstraction of different network connections, peer-to-peer messaging, discovery and synchronization as well as high-performance, object-oriented, versioned data distribution. Collage is designed for low-overhead multi-threaded execution which allows applications to easily exploit multi-core architectures.
On the lowest layer, Collage provides the Connection, which implements a stream-oriented communication stream between two endpoints. Various protocols are implemented, and can be created using Connection::create with a ConnectionDescription using the corresponding ConnectionType and related parameters. A ConnectionSet may be used to demultiplex input from a set of connections.
Collage offers peer-to-peer communication between processes, represented by Node and LocalNode. A process typically uses one LocalNode to listen on connection requests and to communicate with other nodes. A Node is a proxy for a remote LocalNode. To exchange information, a Packet is send using the remote node proxy. The remote local node receives the packet, wraps it in a Command, and dispatches it to a CommandQueue. The queue is processed by another thread, which invokes a CommandFunc. The queue and handler method are pre-registered with the proper Dispatcher. The packet specializations NodePacket and ObjectPacket dispatch the packet to the LocalNode or a registered Object, respectively.
The Object facilitates the data distribution for C++ classes. An object is registered with a listening LocalNode, which allows the mapping of this object to other instances, potentially on other nodes. Objects can be static or versioned. Versioned objects can commit new versions, sync committed versions and can send object packets to other instances.
The following Figure depicts the UML class diagram of the major Collage classes:
| bool eq::net::deserialize | ( | std::string & | data, |
| ConnectionDescriptions & | descriptions | ||
| ) |
Deserialize a vector or connection descriptions from a string.
Consumes the data.
| data | The serialized connection descriptions. |
| descriptions | return value, deserialized connection descriptions. |
| bool eq::net::exit | ( | ) |
De-initialize the Equalizer network classes.
true if the library was successfully de-initialised, false otherwise. | bool eq::net::init | ( | const int | argc, |
| char ** | argv | ||
| ) |
Initialize the Equalizer network classes.
| argc | the command line argument count. |
| argv | the command line argument values. |
true if the library was successfully initialised, false otherwise. | std::string eq::net::serialize | ( | const ConnectionDescriptions & | ) |
Serialize a vector of connection descriptions to a string.
| typedef std::vector< Barrier* > eq::net::Barriers |
A vector of Barriers.
Definition at line 77 of file co/types.h.
A reference pointer for ConnectionDescription pointers.
Definition at line 66 of file co/types.h.
| typedef std::vector< ConnectionDescriptionPtr > eq::net::ConnectionDescriptions |
A vector of ConnectionDescriptionPtr's.
Definition at line 82 of file co/types.h.
| typedef ConnectionDescriptions::const_iterator eq::net::ConnectionDescriptionsCIter |
A const iterator for a vector of ConnectionDescriptionPtr's.
Definition at line 86 of file co/types.h.
| typedef ConnectionDescriptions::iterator eq::net::ConnectionDescriptionsIter |
An iterator for a vector of ConnectionDescriptionPtr's.
Definition at line 84 of file co/types.h.
| typedef base::RefPtr< Connection > eq::net::ConnectionPtr |
A reference pointer for Connection pointers.
Definition at line 64 of file co/types.h.
| typedef std::vector< ConnectionPtr > eq::net::Connections |
A vector of ConnectionPtr's.
Definition at line 79 of file co/types.h.
| typedef base::RefPtr< LocalNode > eq::net::LocalNodePtr |
A reference pointer for LocalNode pointers.
Definition at line 62 of file co/types.h.
| typedef base::UUID eq::net::NodeID |
A unique identifier for nodes.
Definition at line 52 of file co/types.h.
| typedef base::RefPtr< Node > eq::net::NodePtr |
A reference pointer for Node pointers.
Definition at line 60 of file co/types.h.
| typedef std::vector< NodePtr > eq::net::Nodes |
A vector of NodePtr's.
Definition at line 69 of file co/types.h.
| typedef std::vector< Object* > eq::net::Objects |
A vector of objects.
Definition at line 72 of file co/types.h.
| typedef Objects::const_iterator eq::net::ObjectsCIter |
A const iterator for a vector of objects.
Definition at line 74 of file co/types.h.
The supported network protocols.
Definition at line 29 of file connectionType.h.
| enum eq::net::NodeType |
Node types to identify connecting nodes.
| NODETYPE_EQNET_INVALID |
Invalid type. |
| NODETYPE_EQNET_NODE |
A plain eq::net::Node. |
| NODETYPE_EQNET_USER |
Application-specific types. |
Definition at line 28 of file co/nodeType.h.
1.0-alpha by
1.7.2