Live data from Hacker News

Old box, dumb code, few thousand connections, no big deal

rachelbythebay.com

71–80 of 288 posts

Re: Old box, dumb code, few thousand connections, no big deal

#71
post #68

Earlier quoted context omitted.

Long running network servers, such as most IRC servers, were written using select. Example: https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_C...

IRC servers were indeed written using select(2), because interaction between the clients is the whole point of IRC; that gets a great deal more difficult if you spawn off a separate process for each client! I think ICB/FNet predates IRC slightly and was also written using select(2). But IRC wasn't written until 1988, at which point select(2) and inetd were already about ten years old, and things like (most) FTP serve…

I think the previous poster was just exaggerating... "All" network servers is a pretty broad category. They were never all written using select.

Re: Old box, dumb code, few thousand connections, no big deal

#72

"at least one stupid chat client that's actually a giant piggy web browser running" I wonder what app that could be :-)

I’ll bite, is it slack?

In all honesty, there's a whole slew of platforms it could be:

- Slack

- Keybase

- Mattermost

- Discord

- Microsoft Teams

- Facebook Messenger (incl. Work)

All of these fine folks apparently use Electron or a similar technology...

Re: Old box, dumb code, few thousand connections, no big deal

#73
post #68

Earlier quoted context omitted.

IRC servers were indeed written using select(2), because interaction between the clients is the whole point of IRC; that gets a great deal more difficult if you spawn off a separate process for each client! I think ICB/FNet predates IRC slightly and was also written using select(2). But IRC wasn't written until 1988, at which point select(2) and inetd were already about ten years old, and things like (most) FTP serve…

I think the previous poster was just exaggerating... "All" network servers is a pretty broad category. They were never all written using select.

They were never mostly written using select, either.

Re: Old box, dumb code, few thousand connections, no big deal

#74
I know pcwalton has been banging the "just use threads" drum for a while now. Rust used to use a green thread approach, but if I recall correctly, they ripped all that out for just native threads with the idea that in most cases it's fast and efficient enough.

I remember when C10K was the big challenge, but even the naive approach of spawning a thread per connection now can handle that.

Re: Old box, dumb code, few thousand connections, no big deal

#75

Earlier quoted context omitted.

why tho? In real life if you're in need of handling millions of users per second, I bet you're already part of FAANG, at which point you simply open offices in each country and deploy local servers.

nope. it’s about what’s possible.

[deleted]

Re: Old box, dumb code, few thousand connections, no big deal

#77
post #44

Whether intended or not, there's an undercurrent of "you're all so dumb for using Python" (or Ruby, or PHP, or other similarly performant language) here. I want to surface that and question it a bit. It's totally reasonable for a company to choose the Python/Gunicorn option if they already have a bunch of people who know Python and they don't need to serve tons of requests per second. Even if they do need to serve to…

> Even if they do need to serve tons of requests per second, it's totally reasonable for them to still choose Python/Gunicorn if the cost of the additional servers is less than the cost of having to support multiple languages. How hard is it to get up to speed on any other tech stack? ASP.NET Core is extremely fast and the learning curve is close to none, for example. If someone was able to wrap his head around backe…

I'll find out myself. Just got handed a codebase that is a mix of Python/Gunicorn/node when this sprint started off. I've seen the word gunicorn in the repo... but still don't know what it does yet. First time for this old back end Java/C++/XQuery programmer, so how hard can it be?

(On the plus side, seems my Jetbrain kit includes PyCharm, so I've even got an IDE!)

Re: Old box, dumb code, few thousand connections, no big deal

#78
post #44

Whether intended or not, there's an undercurrent of "you're all so dumb for using Python" (or Ruby, or PHP, or other similarly performant language) here. I want to surface that and question it a bit. It's totally reasonable for a company to choose the Python/Gunicorn option if they already have a bunch of people who know Python and they don't need to serve tons of requests per second. Even if they do need to serve to…

> Even if they do need to serve tons of requests per second, it's totally reasonable for them to still choose Python/Gunicorn if the cost of the additional servers is less than the cost of having to support multiple languages. How hard is it to get up to speed on any other tech stack? ASP.NET Core is extremely fast and the learning curve is close to none, for example. If someone was able to wrap his head around backe…

[deleted]

Re: Old box, dumb code, few thousand connections, no big deal

#79
post #37
post #25

Earlier quoted context omitted.

What the author did was build a prototype to demonstrate and explore what was possible. That is exactly what engineers do when exploring a problem.

When you hear "Engineer", you often think of calculus, statistics, formal testing, requirements gathering, documentation, repeatable results, etc... along with a fundamental understanding of the problem space and possible solutions. I think this is akin to NASA working on the Apollo program vs. someone in their garage attempting to build a go-cart for the first time. When you just slap things together and see if they…

>When you just slap things together and see if they work - are you really engineering?

Why not? That's basically what testing is. Which was one of the attributes you attributed to "Engineer" >formal testing

>I think we often cross "research and development" with "engineering"

My general take:

Scientists primarily focus on learning and proving new knowledge & ideas. (i.e. they research)

Engineers focus in using proven knowledge and applying it to design and create things or solve problems. When things are not perfectly certain, they can prototype and do tests similar to how scientists do experiments (e.g. aerodynamics in wind tunnels). (i.e. development)

Re: Old box, dumb code, few thousand connections, no big deal

#80
post #44

Whether intended or not, there's an undercurrent of "you're all so dumb for using Python" (or Ruby, or PHP, or other similarly performant language) here. I want to surface that and question it a bit. It's totally reasonable for a company to choose the Python/Gunicorn option if they already have a bunch of people who know Python and they don't need to serve tons of requests per second. Even if they do need to serve to…

Twitter ran on Rails until 10 million users.
Post reply on HN