How rosstheross/csci4061-projects works
This repository contains four operating-systems projects: two MapReduce implementations (P1 and P2) and two threaded web servers (P3 and P4). The MapReduce workflow divides input into chunks, maps words to intermediate counts, shuffles them to reducers, and writes final results; the web-server workflow accepts requests, queues them for workers, serves files or errors, and logs activity, with caching and dynamic worker management in the later server. MapReduce orchestration and reducer details are only partially evidenced here, so those relationships are marked unverified or omitted.
Main entry points: server.c Request worker · P3/util.h Connection and response API · P4/util.h Connection and response API · mapreduce.c Job orchestration
Components 24
P1 MapReduce
- Job orchestration
P1/src/mapreduce.c - Chunk and shuffle utilities
P1/include/utils.h - Mapper
P1/src/mapper.c - Reducer
P1/src/reducer.c
P2 MapReduce
- Job orchestration
P2/src/mapreduce.c - Chunk and shuffle utilities
P2/lib/utils.c - Mapper
P2/src/mapper.c - Reducer
P2/src/reducer.c
P3 Web Server
- Server lifecycle
P3/server.c - Connection and response API
P3/util.h - Request dispatch
P3/server.c - Request queue
P3/server.c - Request worker
P3/server.c - File cache
P3/server.c
P4 Web Server
- Server lifecycle
P4/server.c - Connection and response API
P4/util.h - Request dispatch
P4/server.c - Request queue
P4/server.c - Request worker
P4/server.c - File cache
P4/server.c - Static files
P4/server.c - Request log
P4/server.c
Other components
- Input file
- HTTP client
Connections 25
- Mapper → Chunk and shuffle utilities: gets chunks and words
P1/src/mapper.c - Job orchestration → Mapper: starts mapper
- Job orchestration → Chunk and shuffle utilities: coordinates shuffle
- Job orchestration → Reducer: starts reducer
- Mapper → Chunk and shuffle utilities: gets chunks and words
P2/src/mapper.c - Job orchestration → Mapper: starts mapper
- Job orchestration → Chunk and shuffle utilities: coordinates shuffle
- Job orchestration → Reducer: starts reducer
- HTTP client → Connection and response API: connects and requests
- Server lifecycle → Connection and response API: initializes listener
P3/server.c - Request dispatch → Connection and response API: accepts and parses
P3/server.c - Request dispatch → Request queue: enqueues request
P3/server.c - Request worker → Request queue: dequeues request
P3/server.c - Request worker → File cache: checks and updates
P3/server.c - Request worker → Connection and response API: returns result or error
P3/server.c - HTTP client → Connection and response API: connects and requests
- Server lifecycle → Connection and response API: initializes listener
P4/server.c - Request dispatch → Connection and response API: accepts and parses
P4/server.c - Request dispatch → Request queue: enqueues request
P4/server.c - Request worker → Request queue: dequeues request
P4/server.c - Request worker → File cache: checks and updates
P4/server.c - Request worker → Static files: reads on cache miss
P4/server.c - Request worker → Request log: writes request record
P4/server.c - Request worker → Connection and response API: returns result or error
P4/server.c - Server lifecycle → File cache: initializes and deletes
P4/server.c