global message queue vs per process?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- distributed-systems, game-dev
Research direction
The issue names no files, tests, or entry points. Start by identifying the existing process and message-queue implementation, then resolve the listed synchronization, lifecycle, buffering, and message-identity questions. Done requires an agreed queue design with its trade-offs documented and an implementation scope defined.
Written by the indexing model from the issue text.
Description
a global message queue would be a circular buffer of MessageBlocks, like this
class MessageBlock {
atomic <int> num_read=0;
vector <Message> messages;
};
aligned to cache lines? an ID number for the block?
when a process reads the block of messages, increment the num_read variable, when it reaches the number of running processes then that message can be overwritten
will need an atomic<int> for the end, add to this when writing a new block of messages
don't think I need a marker for the start since each process will remember where it last read
when a process is created or killed, send a ping message or a ProcessCreated/ProcessClosed message and when that message has num_read==open_processes then you know everything is caught up
pros: less cache pollution, less strain on memory bandwidth, less work for the engine not having to duplicate messages for each process or check which processes care about which messages, messages sent to the engine won't have to be reflected out to other processes
cons: more synchronization, a slow process could cause the buffer to fill up, circular buffer with variable length items is complicated
could also categorize messages for a few separate queues? use a bloom filter for the whole queue?
if I need a read/write lock, I can simply use an atomic<int>, just increment by 1 to add a reader, increment by 9999999 to add a writer
every message might need an ID to handle responses? or maybe only do it for specific messages that need it? will they need from_process_id? from_process_id could be for the whole block instead of per message
- Dominant language
- C++
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Die4Ever/AsyncGameEngine
-
Better frameworkOpen
Difficulty 5/5 Over a week Newbie friendliness 18/100
Die4Ever/AsyncGameEngine#18 · 2 comments ·
-
Green threadsOpen
Difficulty 5/5 Over a week Newbie friendliness 20/100
Die4Ever/AsyncGameEngine#15 ·
-
ProxiesOpen
Difficulty 5/5 Over a week Newbie friendliness 20/100
Die4Ever/AsyncGameEngine#14 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Die4Ever/AsyncGameEngine#13 ·
-
FramePacer classOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
Die4Ever/AsyncGameEngine#12 · 1 comment ·
All issues in Die4Ever/AsyncGameEngine
Similar issues
-
new contributor
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OpenMS/OpenMS#10512 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mesonbuild/wrapdb#2961 ·
Maintainers usually reply within 1 day
-
80 Instance - Raid - Northrend
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
azerothcore/azerothcore-wotlk#28075 ·
Maintainers usually reply within 1 day
-
SCA cis_ubuntu24-04 35664 / cis_ubuntu26-04 41664 "Ensure sudo log file exists": sudoers.d rule is missing the r: prefix, so it can never matchPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MrNeRF/LichtFeld-Studio#3205 ·
Maintainers usually reply within 1 day