To run any excercise, go the folder and run:
go mod init example.com/main
go mod tidy
go run .
- Implement a simple connection pool using Bounded Blocking Queue
- Implement Database Sharding and Routing (from API server)
- Setup Read-replica from a MySQL locally
- Implement fair multi-threaded program
- Implement server-sent events
- Implement server-sent events using Message Broker
- Implement server-sent events on React Components on a web-page.
- Setup RabbitMQ and Kafka locally.Write producer and consumer for them.
- Implement real-time chat using socket IO: Slack-Realtime Text Chat Reference
- Mock EC2 creation & implement Short Polling and Long Polling
- Implement Airline Check-in System
- Hit deadlock in database by cn top of MySQL.
- Implement a toy KV store on top of MySQL
- Implement simple sharding with a hash or range based routing strategy in above KV store
- Implement flag driven consistent reads.
- Implement Distributed Transactions using 2PC.
- Ingest data in Neo4j and try paginating it.
- Ingest data in MongDB and write aggregation pipeline.
- Implement Message Broadcast across servers using Star Topology leveraging Redis PubSub.
- Implement a load-balancer
- Implement a simple blogging application where you shard by user id; and try to provide a unique ID to each blog. The idea is to understand the need to ID generation when database is sharded.
- Build a simple atomically incrementing integer ID
- Implement the "Amazon's Way" of central ID generation service
- Implement ths sturcutre of MongoDB Object ID
- Benchmark the impact of UUID on relational database as Primary Key
- Benchmark MySQL's UPSERT using
ON DUPLICATE KEY UPDATE
andREPLACE INTO
- Implement Flickr's Odd-Even based ID generation
- Implement Snowflake on
- API, and
- Database as stored procedure
- Benchmark Pagination approaches.
- Implement Zomato Ordering Service using Distributed Transactions using 2PC
- Implement a Toy CDN
- Mimick CDN Failover - on Toy CDN
- Implement pre-signed URL based upload on S3
- Configure CDN to serve Popular Searches JSON response
- Implement JWT based auhthentication
- Build GitHub like OG image and server it via CDN
- Key learning: generating images in backend server and putting it behind a CDN
- Measure the impact of denormalization
- Define a user collection in MongoDB with blogs as its attribute
- Store blogs object in the user document demonting all blogs that a person wrote.
- Store the entire object intead of reference.
- Now benchmark and find out how slow the response times gets as we increase the number of elements in the blogs array
- Implement Lazy Loading of images on frontend
- Implement 5 approaches to count post per hashtag
- Naive (count++) for every event
- Naive batching (batch on server and then write to database)
- Efficient batching with minimizing stop-the-world usng deep-copy
- Efficient batching with minimizing stop-the-world using two-maps
- Kafka adapter pattern to re-ingest the post hashtags partitioned by hashtag
- Measure the number of writes on the database in each of the above approaches
- Populate on_msg_event while using websocket.
- Try to identify when the connection breaks and use that opportunity to write event to Kafka
- Configure Redis in cluster mode and figure out how data is distrubuted
- Implement newly unread message indicator on database
- Compute on the fly
- Creates messages table with 1 million rows
- Add one indexes for each column part of the where clause that is queried and measure the time taken
- Compute with mentioned composite indexes, and measure the performance
- Re-arrange the columns and mesure the performance impact
- Implement Consistent Hashing
- Implement consistent hashing as a load balancer algorithm
- Solve skewness problem in consistent hashing with Virtual Nodes
- Implement a simple in-memory single-node cache like Redis as discussed in the session
- Implement the word dictionary on local machine
- using CSV format
- using Bitcask format
- Partial data write problem by writing 100mb file and killing the process in between
- Implement Checksum based
- Identify if data in WAL or Bitcask is corrupt using Checksum
- Implement database recovery as discussed in the session
- Implement Bitcask
- Basic KV operations
- Merge and compaction
- Benchmark sequential IO vs random IO
- Implement LSM Trees
- Implement B+ Trees
- LSM Tree Based Key-Value Store. Reference
- Implement Bloom Filters and measure: FPR vs Size Vs Num of Hash Func
- Implement Deletable Bloom Filters
- Setup HLS Streaming following Akamai’s Documentation
- Video HLS Streaming Server in Go
- Implement a TCP server that accepts 1GB file
- Transfer the file via one POST request
- Stream the file from client to server from scratch
- Implement GFS