Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So far, nobody has filled in the section on how a key-press event works its way through the OS, up to the window system, to the application, and to the code handling the input text box.

Then there's what's happening at the Google end. Before search personalization, popular queries ("google", "Britney Spears") were handled by caches the first Google machine you talked to, and never even reached the search engine. Since search personalization, there's some cookie traffic, and then your personal dossier is retrieved from storage at Google for use in interpreting your query.

Then, in the middle, your query probably travels through five to ten routers (try a traceroute) just to get to Google. Packets move from local Ethernet or WiFi to DSL to fiber to bigger fiber to gigabit Ethernet within a Google data center.

And where is "google.com" for you? That's hard to find out. For me, today, it's at "nuq04s19-in-f14.1e100.net", wherever that is. My connection routed from Silicon Valley to Santa Rosa to San Jose before reaching a Google point of presence at Equinix in San Jose.

Somebody also needs to talk about what's happening in the CPUs, with 3 billion or so instructions per CPU core every second, all devoted to looking up a cat video for you.

When you play a cat video, more computation occurs than was done in the history of the world prior to 1940.



"So far, nobody has filled in the section on how a key-press event works its way through the OS, up to the window system, to the application, and to the code handling the input text box."

That in itself is a multi-year discussion. From silicon chemistry theory, voltage biasing different types of substrates, the definition of ground, all the way to sofware control loops, eventing, software emulating parallellism, all the things happening and just waiting to happen on a single OS before you even press "g" on the keyboard will blow most people's minds away.


I submitted a PR that got merged that covers a bunch of what happens from the kernel up to the app, for Windows.


> So far, nobody has filled in the section on how a key-press event works its way through the OS, up to the window system, to the application, and to the code handling the input text box.

Heck USB was glossed over. That section alone should be at least 3x longer!


There's a whole lot of BGP and stuff like that on the interconnect, too.


BGP, and usually some internal routing protocol on each end of the ASN path (likely something like OSPF). But those only inform the forwarding tables, they aren't an active component of the request. You could always go into the forwarding logic of the routers and switches as it moves through the network and TCAMs/DRAM.. As others mentioned, it's practically endless.


plus, with personalization, wouldnt you think dns lookups happen before you press enter. by the time you press enter, it should already have completed all the dns steps.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: