Skip to content

Instantly share code, notes, and snippets.

View kieut's full-sized avatar

Kieu Dung Tran kieut

  • Broadly
  • United States
View GitHub Profile
@djanowski
djanowski / each_async_update.js
Created November 29, 2017 15:28
Concurrently transform a MongoDB cursor into a stream of bulk MongoDB updates.
// Concurrently transform a MongoDB cursor into a stream of bulk MongoDB updates.
//
// Usage:
//
// const users = db.collection('users');
// const usersToUpdate = users.find({ email: null });
//
// await eachAsyncUpdate(users, usersToUpdate, async function(user) {
// const userEmail = await findUserEmail(user);
//
@vasanthk
vasanthk / System Design.md
Last active July 27, 2024 04:41
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?