Skip to content

Core: Refactor ZMQ usage into ZMQService#10323

Merged
zach2good merged 1 commit into
basefrom
zmq_conflict
Jun 15, 2026
Merged

Core: Refactor ZMQ usage into ZMQService#10323
zach2good merged 1 commit into
basefrom
zmq_conflict

Conversation

@zach2good

@zach2good zach2good commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

This does a few things:

  • Refactor ZMQ lifecycle to be a part of the application-owned ZMQService, which has one dedicated ZMQ I/O thread
  • Rather than polling and sleeping manually, we use zmq_poll
  • We pass around "Channels": non owning references to the in/out queues to our sockets, etc.
  • I work a little bit on un-staticing some of our ZMQ stuff, but that's a job for another day
  • For xi_test: We were making and using tcp sockets and there was some world/map/test conflict. In the test setup we now use inproc transport, so there's no chance of collisions and the lifetimes are much more resiliant
  • EDIT: This also means that the minimum 2* 200ms round trip latency for IPC is reduced to an average <100ms total, or whatever ZMQ promises and what our tick handling will allow. Faster chat, faster IPC, etc.

@zach2good

Copy link
Copy Markdown
Contributor Author

Nothing spinning:
image

@zach2good

zach2good commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Testing:

  • Login and zoning requires round-trip IPC, etc. logging in and zoning around still works, as does yelling

EDIT: And is faster!

@zach2good zach2good merged commit 4c9cb34 into base Jun 15, 2026
11 checks passed
@zach2good zach2good deleted the zmq_conflict branch June 15, 2026 16:38
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