hmbdc
simplify-high-performance-messaging-programming
DefaultUserConfig.hpp
1 #include "hmbdc/Copyright.hpp"
2 #pragma once
3 
4 namespace hmbdc { namespace tips { namespace tcpcast {
5 /**
6  * the send and recv engine config parameters and its default values used in this module
7  */
8 constexpr char const* const DefaultUserConfig = R"|(
9 {
10  "ifaceAddr" : "127.0.0.1", "__ifaceAddr" :"ip address for the NIC interface for IO, 0.0.0.0/0 pointing to the first intereface that is not a loopback",
11  "tcpPort" : 0, "__tcpPort" :"tcp port number used when send/recv messages out - 0 means let the OS pick",
12  "loopback" : false, "__loopback" :"set this to true if processes within the same host need to communicate using rmcast not effective when using loopback interface (127.0.0.1.",
13  "mtu" : 1500, "__mtu" :"mtu, check ifconfig output for this value for each NIC in use",
14  "schedPolicy" : "SCHED_OTHER", "__schedPolicy" :"engine thread schedule policy - check man page for allowed values",
15  "schedPriority" : 0, "__schedPriority" :"engine thread schedule priority - check man page for allowed values",
16  "udpcastDests" : "232.43.212.235:4321", "__udpcastDests" :"this is the multicast address (default matches udpcastListenAddr udpcastListenPort), it could be a list of multicast address, unicast addresses",
17  "tx" :
18  {
19  "hmbdcName" : "tcpcast-tx", "__hmbdcName" :"engine thread name",
20  "maxSendBatch" : 60, "__maxSendBatch" :"up to how many messages to send in a batch (used as a hint only)",
21  "minRecvToStart" : 0, "__minRecvToStart" :"start send when there are that many recipients (processes) online, otherwise hold the message in buffer - NOTE: buffer might get full and blocking",
22  "nagling" : false, "__nagling" :"should the tcp channel do nagling",
23  "outBufferSizePower2" : 0, "__outBufferSizePower2" :"2^outBufferSizePower2 is the number of message that can be buffered in the engine, default 0 means automatically calculated based on 128KB as the low bound",
24  "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.",
25  "sendBytesPerSec" : 100000000, "__sendBytesPerSec" :"rate control for how many bytes per second - it is turned off by sendBytesBurst==0",
26  "tcpSendBufferBytes" : 0, "__tcpSendBufferBytes" :"OS buffer byte size for outgoing tcp, 0 means OS default value",
27  "typeTagAdvertisePeriodSeconds" : 1, "__typeTagAdvertisePeriodSeconds" :"send engine advertise the message types it covers every so often",
28  "ttl" : 1, "__ttl" :"the switch hop number",
29  "udpSendBufferBytes" : 0, "__udpSendBufferBytes" :"OS buffer byte size for outgoing udp, 0 means OS default value",
30  "waitForSlowReceivers" : true, "__waitForSlowReceivers" :"when true, a slow receiver on the network subscribe to the message might slow down (even block) the sender and other recv engines since the sender needs to wait for it; when false, the slow receiver would be disconnected when it is detected to be slow. in that case the receiver will receive a disconnect message and it by default will reconnect. some messages could be lost before the reconnection is done."
31  },
32  "rx" :
33  {
34  "allowRecvWithinProcess" : false, "__allowRecvWithinProcess" :"if receiving from the local process, this is an independent tipslication level check from the OS level loopback",
35  "cmdBufferSizePower2" : 10, "__cmdBufferSizePower2" :"2^cmdBufferSizePower2 is the engine command buffer size - rarely need to change",
36  "heartbeatPeriodSeconds" : 1, "__heartbeatPeriodSeconds" :"the recv heart beat every so often so the send side know it is alive",
37  "hmbdcName" : "tcpcast-rx", "__hmbdcName" :"thread name",
38  "maxTcpReadBytes" : 131072, "__maxTcpReadBytes" :"up to how many bytes to read in each time",
39  "tcpRecvBufferBytes" : 0, "__tcpRecvBufferBytes" :"OS buffer byte size for incoming tcp, 0 means OS default value",
40  "udpcastListenAddr" : "232.43.212.235", "__udpcastListenAdd" :"the udpcast receive engine listen to this address for messages - it can be set to ifaceAddr to listen to unicast UDP messages instead of a multicast address",
41  "udpcastListenPort" : 4321, "__udpcastListenPort" :"the udpcast receive engine listen to this UDP port for messages",
42  "udpRecvBufferBytes" : 0, "__udpRecvBufferBytes" :"OS buffer byte size for incoming udp, 0 means OS default value"
43  }
44 }
45 )|";
46 }}}
47 
Definition: Base.hpp:12