NFX.Glue NamespaceNFX Class Library

[This is preliminary documentation and is subject to change.]

Provides master contract stipulations and native implementations for distributed component communication technology. "Glue" is used to glue contract endpoints between hosts
Classes

  ClassDescription
Public classArgsMarshallingAttribute
Decorates methods stipulating type of RequestMsg-derivative used for method call arguments marshalling
Public classAuthenticationSupportAttribute
Indicates that contract supports authentication using AuthenticationHeader. When header is passed then Glue server will use its data to set user context through Application.SecurityManager. If this attribute not set then Glue runtime will ignore AuthenticationHeader
Public classBinding
Represents a particular named binding. Binding type defines a protocol by implementing a transport instance management strategy that support particular technology, such as blocking TCP or async ZeroMQ. Binding instance retains state/config information about all transports and has logic for Node's host:service resolution. Bindings are services, meaning - they can have state/threads that manage transport channels that operate under binding
Public classBindings
A registry of Binding-derived instances
Public classCall
Describes a flow of events originating from a Glue client call
Public classCallReactor
Facilititates execution of asynchronous client calls and their corresponding callback functions. This class introduces callback execution latency and is handy for cases where eventual event flow need to execute regardless of timing. The latency depends on other callback implementation as the reactor services all calls from a single thread
Public classCallSlot
Represents a class that is immediately returned after transport sends RequestMsg. This class provides CallStatus and RequestID properties where the later is used to match the incoming ResponseMsg. CallSlots are kinds of "spirit-less" mailboxes that keep state about the call, but do not posess any threads/call events. Working with CallSlots from calling code's existing thread of execution is the most efficient way of working with Glue (in high load cases), as it does not create extra object instances (tasks do) for asynchronous coordination and continuation. It is possible to obtain an instance of CallSlot.AsTask in which case that instance is registered with the framework-internal reactor so task does complete normally even on timeout, however, in high-throughput apps (10K+ calls per second) this method is not the most efficient one as it allocates additional objects (task, list entry etc.) that eventually increase GC load for long runs. Note: A 3.2 Ghz 4-Core I7 server with 8Gb of ram can easily handle 40K 2-way calls a second (given little business server logic and simple payload). See also: CallReactor class
Public classClientCallException
Thrown by the Glue framework when clients try to perfom a call but that action fails
Public classClientEndPoint
Represents an ancestor for client classes that make calls to server endpoints. This and descendant classes are thread safe ONLY for making non-constructing/destructing remote calls, unless ReserveTransport is set to true in which case no operation is thread safe
Public classClientMsgInspectionException
Thrown by the Glue framework when client message inspector fails with exception
Public classClientTransport
Public classClientTransport TBinding 
Public classConstructorAttribute
Decorates methods that initialize instance of the server class and retain class instance in the server runtime
Public classDestructorAttribute
Decorates methods that finalize instance of the server class and release class instance in the server runtime
Public classEndPoint
Abstarction of server and client endpoints. And endpoint is a logically-connected entity per: ABC rule - Address/Binding/Contract(s)
Public classGlueComponentService
Provides base functionality for internal glue component implementations
Public classGluedAttribute
Decorates interfaces that represent glued contract points
Public classGlueException
Base exception thrown by the Glue framework
Public classInvalidGlueOperationException
Base exception thrown by the Glue framework when some operations are invoked that do not apply
Public classLifeCycleAttribute
Specifies the instance mode and timeout values for server classes that implement the decorated contract. If server class does not support state then timeout is ignored
Public classMessageSizeException
Exception thrown in client/server when there's an attempt to send a too large message
Public classMsgInspectorConfigurator
Provides general configuration reading logic for message inspectors
Public classNOPGlue
Public classOneWayAttribute
Decorates methods that do not generate response message after execution. They must return void and if exception occurs it is not reported to the caller
Public classProtocolException
Exception thrown when there are protocol-related errors like deserialization, request message received when response is expected
Public classProvider
Represents a base type for providers - providers are facades for some low-level implementation that transports use, for example ZeroMQ.
Public classProviders
A registry of Provider-derived instances
Public classRemoteException
Base exception thrown by the Glue framework when remote errors are reported back to caller
Public classServerCallContext
Provides access to server call context. Use to access Headers
Public classServerContractException
Exception thrown when server could not get contract
Public classServerEndPoint
Represents a server endpoint that accepts client requests. This is a sealed class
Public classServerException
Exception thrown in Glue server
Public classServerInstanceActivationException
Exception thrown when server instance can not be created
Public classServerMethodInvocationException
Exception thrown when server can not invoke method
Public classServerNotRunningException
Exception thrown in Glue server when it shuts down/not running
Public classServers
Public classServerTransport
Public classServerTransport TBinding 
Public classStatefulServerInstanceDoesNotExistException
Exception thrown when statful server identified is not found/has expired/timed-out
Public classStatefulServerInstanceLockTimeoutException
Exception thrown when statful server instance is not thread safe and could not be locked before set timeout expired
Public classThreadSafeAttribute
Indicates that server instance should not be lock()-ed by Glue handler because it is implemented in a thread-safe way. This attribute has no effect for Glue servers that are not [LifeCycle(Stateful)], because they are never locked. Singleton servers must be thread-safe by definition so this attribute is not needed for Singleton servers. If the server is implemented in a thread-safe way, then addition of this attribute may give 15-30% performance boost from Glue runtime when many parallel requests are trying to work with the same instance, however this benefit may be nullified by inefficient user locking code within server implementation. Leaving this attribute out is safer
Protected classTimeoutReactor
Internal class that polls call slots for timeout
Public classTransport
Transports are thread-safe and are intended for use by multiple threads from ClientCallReactor and ServerProcessor when bindings operate in OperationFlow.Asynchronous mode. Transports are acquired by the thread that creates them
Structures

  StructureDescription
Public structureFuture T 
Provides a higher-level wrapper around CallSlot returned value by Glue. All property accessors evaluate synchronously on the calling thread. This struct should not be used with One-Way calls or calls that return void
Public structureFutureVoid
Provides a higher-level wrapper around CallSlot returned by Glue. All property accessors evaluate synchronously on the calling thread. This struct should not be used with One-Way calls
Public structureNode
Represents a network node. It is a binding, logical address of a host and a service that host provides Nodes are not contract-dependent. The componets of address are not case-sensitive. The form of the address is:
binding://host:service
. The "host" and "service" segment syntaxes depend on binding and may not contain the ':' char. An example of some 'mytest' binding: 'mytest://adr=1.1.1.1,nic=eth001:job,chat,backup'
Interfaces

  InterfaceDescription
Public interfaceIClientMsgInspector
Inspects messages on the client side. ClientInspectors may be registered on ClientEndPoint, Binding or Glue levels
Public interfaceIGlue
Represents a contract for Glue - a technology that provides asynchronous distributed component interconnection
Public interfaceIGlueImplementation
Public interfaceIMsgInspector
Denotes an entity that can inspect messages
Public interfaceIServerMsgInspector
Inspects messages on the server side. ServerInspectors may be registered on ServerEndPoint, Binding or Glue levels
Enumerations

  EnumerationDescription
Public enumerationCallStatus
Stipulates codes returned for contract calls
Public enumerationDumpDetail
Message/data dumping detail
Public enumerationLogSrc
Logging sources - client, server, any
Public enumerationOperationFlow
Stipulates operation flow kind - sync/async
Public enumerationServerInstanceMode
Denotes server instance modes - how server instances relate to calls
Public enumerationTransportKind
Defines kinds of trasport