r/developersIndia • u/Budget_Ad_2544 • 17h ago
I Made This Mapreduce implementation using boost asio , asio-grpc
Built an asynchronous distributed MapReduce in C++23
A non-blocking, data sharing distributed engine using boost asio C++20 coroutines and asio-grpc
Map & Reduce:
• Map: Workers stream text splits, execute user mappers, and partition intermediate data into binary hashed shards.
• Reduce: Workers sort shards in-place and run an external K-way min-heap merge to stream ordered keys to reducers with bounded RAM.
Data Sharing:
• Map Phase (Coord ➔ Worker): Coordinator streams 64KB split chunks over gRPC, decoupled by 4MB concurrent channels.
• Reduce Phase (Worker ➔ Worker): Peer-to-peer shuffle. If a shard was produced locally on the same host, it uses zero-copy atomic hard-linking (link()) to bypass the network entirely.
Fault Tolerance (SHUFFLEFIX):
• If a map worker dies mid-shuffle, the coordinator invalidates only that task and has a spare worker recompute it.
• Reducers keep their existing shards, wait for the new endpoint, and resume without restarting the job!
•
u/AutoModerator 17h ago
It's possible your query is not unique, use
site:reddit.com/r/developersindia KEYWORDSon search engines to search posts from developersIndia. You can also use reddit search directly.I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/AutoModerator 17h ago
Thanks for sharing something that you have built with the community. We recommend participating and sharing about your projects on our monthly Showcase Sunday Mega-threads. Keep an eye out on our events calendar to see when is the next mega-thread scheduled.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.