68 cxMessage

Notes when starting cxMessage2: cxMessage2.txt

Some good youtubes

Christopher Kohlhoff

He recommends using shared pointers in the handlers to keep alive the associated object. That would eliminate the whole issue with memory reclamation.

He suggests the following order of preference:

  1. a single io_service run by a single thread. No need for strands, threads, mutexes etc
  2. partitions where in each partition there is a single io_service run by a single thread
  3. multiple threads run a single io_service

2 might fit well with the concept of a CSpace. This is indeed a partition.

Michael Caisse

Asynchronous IO with Boost.Asio

TODO

  1. Commit to using cxMessage2
    • Rename cxMessage as cxMessage_old and move into the deprecated ceda repo.
    • Rename cxWorkingSetIpc as cxWorkingSetIpc_old and move into the deprecated ceda repo.
    • Move cxRmi into deprecated code repo.
    • Rename cxMessage2 as cxMessage
    • Rename cxWorkingSetIpc2 as cxWorkingSetIpc
    • Get all tests working with new cxMessage and cxWorkingSetIpc

DONE

  • Synchronous Close() on TcpMsgClient and TcpMessageServer no longer posts a task which in turn tries to synchronous Close() the sessions managed by that client or server. This otherwise can cause a dead-lock. The rule is: an IoContext thread must never wait on the completion of an action which is performed by a IoContext thread. In fact the system needs to avoid dead-lock even when there is only one IoContext in the IoContextPool.

Word documents

  • supporting/cxmessage/2021-06 cxMessage pics.pptx

Pdf documents

  • supporting/cxmessage/2021-06 cxMessage pics.pdf

cxMessage Source code

The implementation is in Ceda/cxMessage in the ceda-core repository.