hmbdc
simplify-high-performance-messaging-programming
Classes | Variables
hmbdc::app::mcast Namespace Reference

Classes

struct  EpollFd
 
class  NetContext
 a singleton that holding mcast resources More...
 
struct  RecvTransport
 interface to power a multicast transport receiving functions More...
 
struct  Sender
 fascade class for sending network messages More...
 
struct  Subscribe
 
struct  Transport
 
struct  TransportMessageHeader
 
struct  Unsubscribe
 

Variables

char const *const DefaultUserConfig
 

Detailed Description

UDP multicast transport

Variable Documentation

char const* const hmbdc::app::mcast::DefaultUserConfig
Initial value:
= R"|(
{
"ifaceAddr" : "0.0.0.0/0", "__ifaceAddr" :"ip address for the NIC interface for IO, 0.0.0.0/0 pointing to the first intereface that is not a loopback (127.0.0.1)",
"mcastAddr" : "232.43.211.234", "__mcastAddr" :"multicast address for IO",
"mcastPort" : 4321, "__mcastPort" :"multicast port to for IO",
"mtu" : 1500, "__mtu" :"mtu, check ifconfig output for this value for each NIC in use",
"schedPolicy" : "SCHED_OTHER", "__schedPolicy" :"engine thread schedule policy - check man page for allowed values",
"schedPriority" : 0, "__schedPriority" :"engine thread schedule priority - check man page for allowed values",
"tx" :
{
"hmbdcName" : "mcast-tx", "__hmbdcName" :"engine thread name",
"loopback" : false, "__loopback" :"should the message be visible in local machine. not effective when using loopback interface.",
"maxSendBatch" : 60, "__maxSendBatch" :"up to how many messages to send in a batch (within one udp packet)",
"outBufferSizePower2" : 0, "__outBufferSizePower2" :"2^outBufferSizePower2 is the number of message that can be buffered in the engine, default 0 means automatically calculated based on 8KB as the low bound",
"sendBytesBurst" : 0, "__sendBytesBurst" :"rate control for how many bytes can be sent in a burst, us the OS buffer size (131071) as reference, 0 means no rate control",
"sendBytesPerSec" : 100000000, "__sendBytesPerSec" :"rate control for how many bytes per second - it is turned off by sendBytesBurst==0",
"topicRegex" : ".*", "__topicRegex" :"the topic regex pattern this send engine covers, there shall NOT be an overlap of this pattern between differt send engines in the NetContext, otherwise the first engine is used",
"ttl" : 1, "__ttl" :"the switch hop number",
"udpSendBufferBytes" : 0, "__udpSendBufferBytes" :"OS buffer byte size for outgoing udp, 0 means OS default value"
},
"rx" :
{
"hmbdcName" : "mcast-rx", "__hmbdcName" :"engine thread name",
"cmdBufferSizePower2" : 10, "__cmdBufferSizePower2" :"2^cmdBufferSizePower2 is the engine command buffer size - rarely need to change",
"udpRecvBufferBytes" : 0, "__udpRecvBufferBytes" :"OS buffer byte size for incoming udp, 0 means OS default value"
}
}
)|"

the send and recv engine config parameters and its default values used in this module each module comes with a performance tool (perf-xxxx) that the user could experiment each of the following settings on a hardware environment