Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

global message queue vs per process?

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Die4Ever/AsyncGameEngine

All issues in Die4Ever/AsyncGameEngine

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.