Live data from Hacker News

Website hosted on a 24 year old Linux server

raq.serialport.org

51–60 of 131 posts

Re: Website hosted on a 24 year old Linux server

#51

Earlier quoted context omitted.

> All you need to store this kind of data is a simple file. You mostly likely need a WAL Mode SQLite database. Most of the time, it's way simpler that handling state handling in concurrent situations yourself. (also, bindings are often available - if not outright bundled by default - under most common languages) The "easy" way is all fun and games until your file is accessed in a concurrent fashion, and then your opt…

> You mostly likely need a WAL Mode SQLite database. Overkill, If you are writing to the text file only to increment a number of visitors, none of what you mentioned above is even required. Create a "counter-hit" file for each visitor, count the number of files in the resources directory. Populate the master file with the file count and delete all the temporary files. Configure it on a crontab for say every three sec…

64 Player Depot. I always had a fondness for Tram. Played CAL Main. Good times. v43

Re: Website hosted on a 24 year old Linux server

#52

Earlier quoted context omitted.

> Doing this in modern times would be so complicated. No, it wouldn't. All you need to store this kind of data is a simple file. Most people would probably use PHP for something like that due to its ubiquity, but it could even be a few lines of bash, or Python, or Go, or whatever...

> All you need to store this kind of data is a simple file. You mostly likely need a WAL Mode SQLite database. Most of the time, it's way simpler that handling state handling in concurrent situations yourself. (also, bindings are often available - if not outright bundled by default - under most common languages) The "easy" way is all fun and games until your file is accessed in a concurrent fashion, and then your opt…

For a guest book, you don't need anything like that. A simple solution could be to create a file for each entry. It's append-only anyway.

For a view counter - yes, you can use a full blown database to concurrently increment a simple integer value; or, you could do it in a few lines of code by yourself too.

Re: Website hosted on a 24 year old Linux server

#53

I remember how magical and mysterious a view counter used to feel when I was a kid. How did the website know when someone visited it? Where was the count stored? And how on earth could a website update its own HTML to show the new count? Geocities days were magical. I wonder if kids today have similar thoughts about Twitter profiles and such. It’s probably much easier to pick up the knowledge — back then, it was balk…

> I wonder if kids today have similar thoughts I'm sure that some do, and most don't. Most kids 30 years ago didn't have similar thoughts either. Few people are meant to be programmers, engineers, etc. Were you not shunned as a nerd for having an interest in how computers worked?

> Were you not shunned as a nerd for having an interest in how computers worked?

I remember those days. There was one table in the lunch room where the 10 or so kids who were into computers sat. I found out later talking to some other classmates that nobody else wanted to talk to us because they thought they weren't smart enough.

Re: Website hosted on a 24 year old Linux server

#54

I remember how magical and mysterious a view counter used to feel when I was a kid. How did the website know when someone visited it? Where was the count stored? And how on earth could a website update its own HTML to show the new count? Geocities days were magical. I wonder if kids today have similar thoughts about Twitter profiles and such. It’s probably much easier to pick up the knowledge — back then, it was balk…

> I wonder if kids today have similar thoughts I'm sure that some do, and most don't. Most kids 30 years ago didn't have similar thoughts either. Few people are meant to be programmers, engineers, etc. Were you not shunned as a nerd for having an interest in how computers worked?

> Were you not shunned as a nerd for having an interest in how computers worked?

I certainly wasn’t in the 10s. Usually people would come to me and my nerd buddies for PC building advice, smartphone advice, and of course the occasional “can you pirate this for me” request ;)

Re: Website hosted on a 24 year old Linux server

#55

I remember how magical and mysterious a view counter used to feel when I was a kid. How did the website know when someone visited it? Where was the count stored? And how on earth could a website update its own HTML to show the new count? Geocities days were magical. I wonder if kids today have similar thoughts about Twitter profiles and such. It’s probably much easier to pick up the knowledge — back then, it was balk…

I feel like you could do this without a database using the Linux kernel inotify API. Every time a file is accessed trigger an increment. It’s too beautiful of a day outside to try this right now but an interesting brain teaser!

Pretty sure Linux didn't have inotify then.

Probably a CGI script updates a counter in a file.

Re: Website hosted on a 24 year old Linux server

#56
post #35

Earlier quoted context omitted.

I feel like you could do this without a database using the Linux kernel inotify API. Every time a file is accessed trigger an increment. It’s too beautiful of a day outside to try this right now but an interesting brain teaser!

> It’s too beautiful of a day outside to try this right now That's what laptops are for!

If you're just sitting outside, you may as well be inside.

Re: Website hosted on a 24 year old Linux server

#57
post #24
post #2

Surely hope that isn't running a 24-year old Linux distribution...

Is there actually a bug that's remotely exploitable in the TCP stack, if you drop everything besides bound tcp ports in iptables? Any time I see a customer using an ssh or apache version from ten years ago (different from the kernel, but the kernel doesn't give you version disclosure), the list of bugs is all like "if they use RewriteRule and the second URI parameter is echoed unfiltered into a Location header by the…

I assumed myself there must be a lot of root privilege vulnerabilities in Apache, but it appears there isn't a single one:

https://www.cvedetails.com/vulnerability-list.php?vendor_id=...

All the above seem to be in other Apache products. I think the fact that Apache doesn't run as root helps to mitigate these risks. Having said that, I have had a server compromised (about 20 years ago), through apache, suexec and a vulnerable cgi script, so I think it's best to be paranoid about security. I don't even see suexec on my current ubuntu 20.04 server (I used to just delete it).

Re: Website hosted on a 24 year old Linux server

#58

Earlier quoted context omitted.

> I wonder if kids today have similar thoughts I'm sure that some do, and most don't. Most kids 30 years ago didn't have similar thoughts either. Few people are meant to be programmers, engineers, etc. Were you not shunned as a nerd for having an interest in how computers worked?

> Were you not shunned as a nerd for having an interest in how computers worked? I remember those days. There was one table in the lunch room where the 10 or so kids who were into computers sat. I found out later talking to some other classmates that nobody else wanted to talk to us because they thought they weren't smart enough.

Christ, that there were other kids with an interest in computers is amazing. I sat on my own lmao.

Re: Website hosted on a 24 year old Linux server

#59

Earlier quoted context omitted.

> I wonder if kids today have similar thoughts I'm sure that some do, and most don't. Most kids 30 years ago didn't have similar thoughts either. Few people are meant to be programmers, engineers, etc. Were you not shunned as a nerd for having an interest in how computers worked?

> Were you not shunned as a nerd for having an interest in how computers worked? I certainly wasn’t in the 10s. Usually people would come to me and my nerd buddies for PC building advice, smartphone advice, and of course the occasional “can you pirate this for me” request ;)

Tech had long since gone mainstream by that point though as the barrier of admission was lowered significantly, it was no longer the hobby of nerds.
Post reply on HN