Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
21
This repository contains educational C/C++ implementations of classic concurrency problems and a production-grade stream processing system. All projects focus on **thread safety, lock-free algorithms, and high-throughput concurrent systems**.
Sign in to like and favorite skills
This repository contains educational C/C++ implementations of classic concurrency problems and a production-grade stream processing system. All projects focus on thread safety, lock-free algorithms, and high-throughput concurrent systems.
| Directory | Language | Purpose |
|---|---|---|
| C++17 | Kafka-like message broker with topics, partitions, and persistent storage |
| C++/Docker | Production deployment + Coinbase market data bridges |
| C11 | Lock-free sorted linked list using CAS operations |
| C11 | Classic synchronization problem with custom semaphores |
# Stream Processing (C++17, CMake) cd stream-processing/build && cmake .. && make -j$(nproc) ./test_basic && ./test_broker && ./test_network # Run tests # Lock-Free List (C11) cd linkedlist && make && make run # Performance test make stress # 60-second stress test # Dining Philosophers (C11) cd dining-philosophers-semaphore && make && make run
stream-processing/)include/hash.h)std::shared_mutex for read-heavy workloadsinclude/network/protocol.h#define TEST(name) macro framework (no external deps)linkedlist/)cas_ptr() and cas_bool() wrappers around C11 _Atomicdining-philosophers-semaphore/)pthread_mutex_t + pthread_cond_t_Atomic types, explicit atomic_init()/atomic_store()/atomic_load()std::shared_ptr<Message> aliased as MessagePtr, RAII throughout#pragma once, namespace stream for C++ASSERT() macros, TEST() definitions| When working on... | Reference these files |
|---|---|
| Message serialization | , |
| Thread-safe queues | (header-only, MPMC) |
| Network protocol | , |
| Lock-free algorithms | , CAS pattern examples |
| Docker deployment | , |
stream-processing/tests/test_*.cpp is a standalone executable./build/test_<name> (e.g., test_broker, test_network)make valgrind for memory leak detection-DCMAKE_BUILD_TYPE=Tsan for ThreadSanitizer, -DCMAKE_BUILD_TYPE=Asan for AddressSanitizercd stream-processing-deploy docker-compose build docker-compose up -d # Basic server on port 9092 docker-compose --profile coinbase up -d # With Coinbase WebSocket bridge
Adding a new message type: Update
include/message.h, add serialization in src/core/message.cpp, test in tests/test_serialization.cpp
Adding a broker feature: Implement in
src/core/broker.cpp, expose in include/broker.h, test in tests/test_broker.cpp
Modifying lock-free list: Update both
lock_free_list.c and lock_free_list.h, verify with make valgrind and make stress