Introduction
Getting Started
Technical Overview
n3rv Terminology
The service Class
Service Controller
Qhandlers
bind & connect
Messages
Sending Messages
Resolution Mechanism
Polling System
Service Main Loop
Logging Mechanism
Topologies
HTTP Gateway
HowTos
API Reference
A word on Security
FAQ
Technical Overview
¶
n3rv Terminology
Terminology
Namespace
Service Class
Node or Service Instance
Binding
Service Controller
Topology
cluster
Objects Hierachy
The service Class
How to define a custom service class
Instanciate a service class
UIDs
Running your service classes
Additionnal informations
Service Controller
Create a service Controller
Method 1: start_controller()
Method 2: Direct instanciating
Run a service Controller
A word about service controllers and NAT
Qhandlers
Getting ZMQ socket with a qhandler*
Qhandlers and ZMQ Socket Options
bind & connect
service::bind()
Important notes about
service::bind()
:
service::connect()
lookup
zmq_socket_type
hdlref
Important notes about
service::connect()
:
ZeroMQ Socket Types
Messages
Message structure
Serialization / Deserialization
Raw data (byte sequences) Exchange between nodes
Sending Messages
service::send()
Send a n3rv::message
Send a Raw ZMQ message
ZMQ flags
Resolution Mechanism
General Principle
Wildcard (*) Resolutions
Wildcard resulutions + batch connections: connect_all()
Polling System
Receive Callbacks and attach()
More on Receive Callbacks
static ?
objref
msg
Polling Timeout
Service Main Loop
Asynchronous Run
Tempering with the main loop
service::hkloop()
service::register_main()
A matter of choice
Interaction with poll_timeout
Don’t mess with the Loop
Logging Mechanism
service::ll member
Log() function
Log Levels
Logging Destinations
stdout
file://<path>
syslog:<ident>:<facility>
Sharing a single logger across multiple nodes / service controller
Topologies
Topology definitions
Loading Topologies
Local JSON file
The royal way: using the service controller
Callbacks Preregistering
HTTP Gateway
httpservice class
Initializing HTTP Service
Attach URI to Callback
Callback Structure
Serve static files/directories from Filesystem
Extra linking