Node.Js Event Loop

I think I had some notes about this earlier, but I can’t find them anymore. Collecting a bunch of resources again for the next time I inevitably forget how the event loop works.

I thought I had some articles saved that were helpful for me when I was learning this stuff, but I can’t find them anymore. In any case, I think I remember these being useful for me:

  1. Keunwoo has a lot of nuggets of useful wisdom scattered across Slack. I have this post saved.
  2. The Node.js Event Loop
  3. Understanding the Event Loop, Callbacks, Promises, and Async/Await in JavaScript | DigitalOcean
  4. javascript - Difference between microtask and macrotask within an event loop context - Stack Overflow

More links from Keyhan (some of these are similar to the ones above):

Notes I took on some of these articles:

  • Don’t Block the Event Loop (or the Worker Pool) | Node.js” 202301260138
  • Overview of Blocking vs Non-Blocking | Node.js” 202301260139
  • Node.js multithreading: Worker threads and why they matter - LogRocket Blog” 202301260141

uid: 202301252231 tags: #airtable #javascript #programming #blog-ideas

February 22, 2023

Airtable 2023 Planning for S&R

Planning table:

  1. Clean up tech debt in the application worker assigner
  2. Rethink the worker parent
    • The worker parent is, in principle, the most replaceable component of our architecture. It mostly just serves as a supervisor and proxy for worker child processes. If we want to set the seeds for a base-oriented service architecture (thanks Keunwoo), the worker parent is probably the first to go. Should we start thinking about this now?
  3. Permanent deletion improvements
    1. Let’s improve, consolidate, and modernize permanent deletion playbooks and documentation. Let’s add the ability to run common permanent deletion tasks on the support panel. Most of all, let’s figure out a plan to off-board permanent deletion to an enterprise team :)
  4. Lack of reusable and easy-to-use caching abstractions
    • Several people have asked me about the status of caching at Airtable, likely because I’ve spent some time attempting to build reusable caching abstractions in the form of AsyncOps. One way to measure abstractions’ success is by their adoption rate; by that measure, the abstractions I developed have not been successful. I have also gotten feedback that at least for shard assignments, the layers of caching feel very abstract over what’s actually going on.” I think it would be worth our time to understand why this has been the case, what potential clients of caching are actually looking for, and how we can best develop and advertise solutions.
  5. Main resiliency 2.0
    • Let’s figure out how to:
      • Make base cold loads resilient.
      • Make external table sync / automations / extensions resilient.
      • Make adding non-resilient queries (or queries that must fail during a main outage) very difficult for routes we’ve already annotated as safe to run on the read replica. Maybe we can do this via automated testing?
  6. Move the dynamic throttler to the support panel
    • Stolen from Brian L:
    • During incidents, we seem to struggle to rapidly respond using DynamicThrottler. We also do not always have the ability to block or throttle exactly the kind of traffic we want.
    • Small and conservative extension is to make DynamicThrottler usable from the support panel (today requires ops laptop). More ambitious is to make the config language less baroque.
  7. Fix access policy
    • The way that we currently use access policy as an alternative to user-based authorization is overengineered, confusing at best, and downright dangerous at worst. Since policy generation is colocated with the caller, any callsite in the codebase could generate an access policy to do whatever they wanted with another base, and we can currently do nothing about it. Since we own the web server, the onus is on us to eventually clean up this big piece of tech debt.
    • Some ideas from Emmett about what we could do to fix it:
      • Build a new system for internal inter-service communication. If the workflow execution service wants to send a crud action to the worker, it shouldn’t have to leave the VPC.
        • NOTE(syrnick): If you’re thinking about doing this, please consider a service mesh (istio and friends) as a solution.
      • Also build a proper auth token infrastructure for external requests. Clients would request scoped, expiring tokens, and then use those tokens instead of access policies. The token’s scope would define the request’s privileges.
      • Public shares would be built on top of this auth-token infrastructure. A secret shareId could be exchanged for an auth token.

uid: 202301112305 tags: #airtable #writeup

February 22, 2023

# Conversation Skills Essentials — Tynan.com

source: https://ift.tt/8trfWVP tags: #literature #inbox uid: 202301090106

Don’t Interrupt In text based messaging, interrupting doesn’t really matter. You can have two or three topics going at once and jump back and forth between them. It may not be ideal, but it’s not rude and it doesn’t kill the conversation. Too many people take this habit into real life conversation, where it has disastrous effects.

Good listeners let you finish! 202212311202

Accept, Don’t Seek Accept whatever reaction someone gives you, and treat it as though it were correct. If you said something hilarious and they didn’t laugh, act as if it wasn’t funny. Either it wasn’t, or they didn’t pick up on it, but in either case trying to get them to laugh will make them feel uncomfortable.

This sort of behavior puts a huge burden on the listener because it makes them responsible for your emotional state. Their options are to deny you the emotional state you want, or to give it to you by lying. This is exhausting and will cause people to limit the amount of social time they spend with you.

This sort of behavior puts a huge burden on the listener because it makes them responsible for your emotional state. Their options are to deny you the emotional state you want, or to give it to you by lying. This is exhausting and will cause people to limit the amount of social time they spend with you.

I think I’m pretty good at avoiding this. I try to not put listeners in situations where they have to give me a specific response, otherwise I’ll be negatively affected.

In general the best thing to do is to tell the quickest version of your story, and leave out any tangents or details. This puts the other person in the driver’s seat and lets them ask about the things that most interest them. They are also motivated to ask questions because they can see that I will not bog them down with uninteresting details.

Very #insights-ful storytelling tip

You don’t have to ask questions every single time someone says something, but it’s probably correct about 50% of the time. Err on the side of asking more questions. Factual questions are good, but questions that deepen the conversation are even better. What were you thinking when she said that?” Was that as hard as it sounds?” How did you learn how to do that?” What made you decide to go that route?”

People love to teach and persuade others. When someone has taught you something or changed your mind on something, let them know. Say things like:

Wow, I would have never thought to do that, but that’s a great idea.”

Ok, maybe you’re right. I hadn’t thought about that before.”

You know, I used to really think X, but you’ve convinced me Y”

I have a friend who has somewhat extreme political views, but he will always say things like, I believe X, but I bet you believe Y and you always have interesting takes, so I’d love to hear your thoughts”. It’s a great way to disagree in a positive and constructive way, and I always enjoy conversations with him. In our conversations we also usually both concede points, as described in the previous tip, which makes the conversations even more engaging.

Nice” Cool” Ok”

If you get a lot of single word answers, you are not keeping the other person interested. They are trying to prevent you from saying more, either because you habitually talk too much or because the topic isn’t interesting to them.

Real depth doesn’t happen unless both parties are sharing, so you must be willing to be vulnerable and share things about yourself, and must also have the awareness to ask questions to induce the other person to do the same.

February 22, 2023

Writing Ideas


uid: 202301020144 tags: #writing #blog-ideas #inspiration

February 22, 2023

Convo With Mulan

Talked about a lot of interesting things. Recording this the day after, as suggested by Write Down Notes Immediately After Talks 202007112350

  • We started the convo by talking about our friends and how it doesn’t feel like we have friends we can go to when we feel vulnerable or need help with something. Mulan mentioned that she feels like Hannah doesn’t cherish their relationship, which is why it feels hard to try to maintain the relationship with her. She also brought up the fact that both of us are vulnerable in a closed way in our relationships. We don’t like people who are outwardly emotional and deal with their emotions in a not calm way. Mulan also mentioned that she has attracted a bunch of people who are all independent enough to have their social circles and don’t feel like they are dependent on you because that’s what she admires in people. However, because of this, she doesn’t feel like she has a tight social group that she can depend on and is not dealing with the repercussions of this. I mentioned that it’s essential to know that you have friends who care about or think about you, even when you’re not saying anything to them. It’s a bit of a selfish way of looking at it (what are they doing for me), but I think it does give you a sense of the people who genuinely care about you.
  • Next, we talked about our respective relationships with our sisters. I started by saying that sometimes I don’t know how to communicate with her. Our communication styles are pretty different; I feel her communication style is mostly different from the rest of the family’s, and she doesn’t have anyone to talk to about it. This is weird because Mulan is just as emotionally sensitive, and when she gets vulnerable, she talks about her emotions openly (which is what I feel like I don’t know how to respond to the best). However, Mulan brought up that for Mulan, I can sort of get away with not responding the best because she knows me and all of our shared history, but for Trisha, I need to enter that vulnerability zone and try to respond appropriately, which is difficult for me. For Mulan, I had a lot of shared context with her that made it easier for me to help her when she needed it, but for Trisha, I don’t have that shared context, which means that I have to try to talk to her just based on what I know about her and my own convo responding skills, which becomes difficult for me. Another big issue for me when talking to her is the fact that I used to always talk to her in Hindi, and talking to her in an American accent feels weird for some reason. But I feel like we both really grew into ourselves when talking with our friends in an American accent, so talking to her in an Indian accent feels like we’re not actually talking with the most open, confident versions of ourselves. I initially thought this was kind of stupid, but mulan said she’s felt something similar with her sister. The fact that she was able to talk to my sister with a fresh start made it so that it was a lot easier to talk to her as an adult, and probably when I talk to Lilian it’ll the be same way, and be easier for me.
  • Finally, Mulan asked why it seems like she’s the Khattar family whisperer” and, in general, why it’s so seemingly easy for people to be vulnerable with her. I mentioned that I think there are multiple reasons:
    • she’s an excellent listener
    • she’s very empathetic
    • she’s very insightful
    • extremely important - she doesn’t interrupt you when you’re talking 202212311202. She gives you the space to finish what you’re saying. I think I’m also pretty good at this, and in general, we realized this is an extremely underrated skill. Both of us wish that we had more friend that were like this, but for me at least, I realized that I should really treasure the ones that are like this.
      • Hannah is like this at times, other times she’s not. Both Arjun and Japjot are not like this, unfortunately.

uid: 202212310158 tags: #relationships #talks

February 22, 2023

Renunciation Questions

  1. Should I book an in-person appointment? The earliest slot is Jan 9th, but that will still probably be faster than Fedex.
    • Maybe can’t do this because I need the renunciation to already be done for the OCI.

662322070

Documents info

Manan govt reference number: 23-2000085176

Task Manan’s finished? Trisha’s finished
Complete VFS online application [ ] [ ]
Complete govt online form [x] [naturalization date needed]
Print govt online application form [ ] [ ]
Print checklist [ ] [ ]
Address proof copy [ ] [ ]
Two passport-sized photos [ ] [ ]
Photocopy US passport [ ] [ ]
Complete renunciation certificate [ ] [ ]
Two filled and signed renunciations [ ] [ ]
Indian passport - orig + copy [ ] [ ]
Copy of naturalization cert [ ] [ ]
VFS application confirmation receipt [ ] [ ]
Pre-paid label [ ] [ ]

[Tasks checklist]


uid: 202212300058 tags: #inbox

February 22, 2023