libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
A class that implements bi-directional client-to-exchange message flow. More...
#include <exchange_connection.hpp>
Public Types | |
using | client_link_t = ClientCxn |
A single connection to a client. More... | |
using | client_msg_details_t = typename client_link_t::proc_rules_t::src_msg_details_t |
A type containing the details of the exchange-side messages that will be sent and received to and from the exchange. More... | |
using | exchg_link_t = exchange_to_client_processor< typename client_link_t::svr_mgr_t::session::ptr_type, EchgCxn > |
A single connection to a specific exchange. More... | |
using | exchg_to_client_proc_rules_t = typename exchg_link_t::proc_rules_t |
using | socket_t = typename client_link_t::socket_t |
A type containing the details of the client-side messages that will be sent and received to and from the exchange. More... | |
using | socket_priority = typename client_link_t::socket_priority |
using | thread_traits = libjmmcg::ppd::api_threading_traits< libjmmcg::ppd::platform_api, libjmmcg::ppd::heavyweight_threading > |
Public Member Functions | |
template<class LatencyTimestamps > | |
exchange_connection (typename client_link_t::ctor_args const &client_cxn_details, typename exchg_link_t::ctor_args const &exchange_cxn_details, socket_priority to_exchg_priority, socket_priority to_client_priority, exchg_to_client_proc_rules_t const &proc_rules, LatencyTimestamps ×tamps, char const *svr_name) | |
~exchange_connection () noexcept(false) | |
bool | is_logged_on () const noexcept(true) |
std::sig_atomic_t | signal_status () const noexcept(true) |
std::string | to_string () const noexcept(false) |
A class that implements bi-directional client-to-exchange message flow.
This class is implemented with two threads: one handles the client-to-exchange messages, the other that handles the exchange-to-client messages. This implies that for optimal performance two cores are required per instance of this class. i.e. optimally, a computer can run P/2 instances of this class, where P is the number of available cores. Ideally the computer should have at least two physical processors and two physical PCI buses. Each processor should be connected to only one PCI bus with processor zero connected to all of the peripherals (SATA, etc buses). At a minimum taskset, numactl (e.g. "numactl --preferred=1 --cpunodebind=1") or CPU groups (cgroups) should be used to isolate the OS to processor zero (including suitable interrupts), and the process that instantiates this class should be isolated to all processors excluding zero. Onto the PCI buses connected to those processors the network cards should be attached. The network cards should be DMA-capable at the minimum. Consideration should be given to using Solarflare (or equivalent) network cards and OpenOnload, with suitable configuration. Co-location should be a consideration.
Definition at line 35 of file exchange_connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::client_link_t = ClientCxn |
A single connection to a client.
Definition at line 38 of file exchange_connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::client_msg_details_t = typename client_link_t::proc_rules_t::src_msg_details_t |
A type containing the details of the exchange-side messages that will be sent and received to and from the exchange.
Definition at line 40 of file exchange_connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::exchg_link_t = exchange_to_client_processor<typename client_link_t::svr_mgr_t::session::ptr_type, EchgCxn> |
A single connection to a specific exchange.
Definition at line 42 of file exchange_connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::exchg_to_client_proc_rules_t = typename exchg_link_t::proc_rules_t |
Definition at line 43 of file exchange_connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::socket_priority = typename client_link_t::socket_priority |
Definition at line 46 of file exchange_connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::socket_t = typename client_link_t::socket_t |
A type containing the details of the client-side messages that will be sent and received to and from the exchange.
Definition at line 45 of file exchange_connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::thread_traits = libjmmcg::ppd::api_threading_traits<libjmmcg::ppd::platform_api, libjmmcg::ppd::heavyweight_threading> |
Definition at line 47 of file exchange_connection.hpp.
|
inline |
Definition at line 24 of file exchange_connection_impl.hpp.
Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_connection< ClientCxn, EchgCxn >::exchange_connection().
|
inlinenoexcept |
Definition at line 42 of file exchange_connection_impl.hpp.
|
inlinenoexcept |
Definition at line 47 of file exchange_connection_impl.hpp.
|
inlinenoexcept |
Definition at line 52 of file exchange_connection_impl.hpp.
|
inlinenoexcept |
Definition at line 57 of file exchange_connection_impl.hpp.