hmbdc
simplify-high-performance-messaging-programming
DefaultUserConfig.hpp
1 #include "hmbdc/Copyright.hpp"
2 #pragma once
3 
4 namespace hmbdc { namespace tips {
5 /**
6  * the default Domain config
7  */
8 constexpr char const* const DefaultUserConfig = R"|(
9 {
10  "createIpcTransportIfNotExist" : true, "__createIpcTransportIfNotExist" : "if true, this Domain is trying to own the IPC transport; otherwise it depends on other Domain to create it first",
11  "ifaceAddr" : "127.0.0.1", "__ifaceAddr" : "network interface this Dmain tied to, other related net params are listed in individual net transport DefaultUserConfig, can override here",
12  "ipcMessageQueueSizePower2Num" : 20, "__ipcMessageQueueSizePower2Num" : "IPC tansport buffer depth - 2^20 (1M) by default",
13  "ipcMaxMessageSizeRuntime" : 1000, "__ipcMaxMessageSizeRuntime" : "if not listed in code's ipc_property (==0), use this value",
14  "ipcPurgeIntervalSeconds" : 0, "__ipcPurgeIntervalSeconds" : "if not 0, a purger is to run to remove dead or stagnant IPC party so other parties are not impacted. This is the period of doing the purge",
15  "ipcShmForAttPoolSize" : 104857600, "__ipcShmForAttPoolSize" : "any IPCable messsgae that has >= 1MB attachment could automiatically use a shared memory pool to pass around the attachment if it has 'mutable size_t hmbdcShmRefCount' field. This is the pool size in bytes.",
16  "netMaxMessageSizeRuntime" : 1000, "__netMaxMessageSizeRuntime" : "if not listed in code's (==0), use this as network transport's buffer width in bytes",
17  "pumpHmbdcName" : "tipspump", "__pumpHmbdcName" : "pump thread uses this as thread name",
18  "pumpCount" : 1, "__pumpCount" : "thread count for Domain activities - only increase it when the traffic cannot be handled by 1 thread",
19  "pumpCpuAffinityHex" : 1, "__pumpCpuAffinityHex" : "CPU mask that the pumps threads pinned on - use the same CPUs for multiple process's Domains is recommended",
20  "pumpMaxBlockingTimeSec" : 0.00001, "__pumpMaxBlockingTimeSec" : "starting from 0.0, increase this float if you want the Domain's pump to be more CPU friendly, decrease to reduce latency",
21  "pumpRunMode" : "auto", "__pumpRunMode" : "auto - pumps are auto started at the Domain ctreation time; delayed - user will call startPumps() to start; manual - user will use own thread to call runOnce() each time",
22  "tipsDomainNonNet" : "tips-local", "__tipsDomainNonNet" : "a string used in IPC transport name when network is disabled"
23 }
24 )|";
25 }}
Definition: Base.hpp:12