Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Implementation of Remote and NetworkWorker #97

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Conversation

yhdengh
Copy link
Contributor

@yhdengh yhdengh commented Oct 9, 2023

This PR is sequenced after #96

  • Message

    • Add definitions of message headers and payloads for 4 message types: RUN, RESULT, REQUESTINFO, INFO
    • Add MessageParser for parsing incoming messages in a streaming way
  • Remote

    • Each Remote object represents a remote Fix node
    • Each Remote owns a std::queue of tx_messages and install rules for moving tx_messages->RingBuffer->socket and
      socket->RingBuffer->MessageParser
  • NetworkWorker

    • The NetworkWorker runs all rules of itself and all Remotes on a single eventloop.
    • It owns a moodycamel::concurrentqueue which will be accessed by both the eventloop thread and other worker threads.
  • TODOs

    • Add EventFD to make the eventloop not polling-based
    • Delete entries from reply_to
    • Add unit tests

* Message
** Add definitions of message headers and payloads for 4 message types:
RUN, RESULT, REQUESTINFO, INFO
** Add MessageParser for parsing incoming messages in a streaming way

* Remote
** Each Remote object represents a remote Fix node
** Each Remote owns a std::queue of tx_messages and install rules for
moving tx_messages->RingBuffer->socket and
socket->RingBuffer->MessageParser

* NetworkWorker
** The NetworkWorker runs all rules of itself and all Remotes on a
single eventloop.
** It owns a moodycamel::concurrentqueue which will be accessed by both
the eventloop thread and other worker threads.
Copy link
Contributor

@Akshay-Srivatsan Akshay-Srivatsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network-tester is a standalone tester, not integrated into the test suite, right? We should probably have a unit test for it (and all this stuff) eventually.

@yhdengh
Copy link
Contributor Author

yhdengh commented Oct 10, 2023

The network-tester is a standalone tester, not integrated into the test suite, right? We should probably have a unit test for it (and all this stuff) eventually.

It is a standalone tester for now. Adding a "real" unit tester for the networking part is on my TODO list.

@yhdengh yhdengh merged commit a7a4c51 into master Oct 10, 2023
8 checks passed
@yhdengh yhdengh deleted the multiple-nodes branch October 10, 2023 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants