|
The technical details of the new *hugs* counter are probably not as interesting to relate as they were to discover. I decided to make it a compiled C program, using FastCGI. I changed the way the number of hugs was recorded so that it was very fast for multiple simultaneous reads (i.e. from all the counter display pulling their number out) and used a locking scheme for writes. That kind of thing. Oh, and most especially, I limited the maximum hug rate to 1 every 2 seconds. That completely solved the automatic hugging problem. Even if they're there, they do not impact performance OR hug counts by much.
I tuned the webserver for performance, and limited the number of simultaneous httpd instances to one that didn't use more memory than I had in the webserver.
I also disabled "keepalive", which kept connections uselessly open for several seconds past the time they had completed sending data. These things made the
service highly available, keeping CPU usage below .1. Things were fixed!
I went to restore the hug data (since my testing had messed with the number quite a bit) I used the wrong version of the db loading program AND the wrong version of the db recovery-after-doing-something-stupid program, losing all hug data. Zero! Sorry everyone.
"Maybe no one will care," I consider. Then I start getting email about it.
Apologies, threats, curses, laments. Ok, so they care. Fine. I write
a quick C program to read a hundred megs of server logs and re-count
the counters, guessing where necessary (i.e. POST requests, for which arguments
are not logged). Everything's back to normal. Whew. The counters resume proliferation.
Except that a few days later the web server is slow again. AGAIN? But I... but the...
Actually, I can log into my shell pretty quickly. It's just that all the web
server processes are stuck trying to write to disk. The datastore? No.. the log
file. It is now at 2 Gigabytes, the filesize limit for the OS on that system.
It is at 2 Gigs because over the last week I received over ten million hits.
Holy hole! I made the log format very minimal, and put automatic log-rotators in place.
At this point, maintenance dropped off my radar and I just watched the thing spread. Some of my online friends saw the counter on the pages of people unrelated to me in any way. They just thought it was a typical livejournal fad. Which, really, it is. It wasn't causing anymore problems for me. I had more than two problems, though. Top on the list was running out of money.
Unemployment Insurance was just about through, and there are no more extended UI benefits in this state. I restricted my food budget so that I was mostly eating rice. Helen was taking care of me when she could, paying for every outing, every meal together.
I considered other goofy online fad things, and the one thing I was missing from mine was some sort of ad-powered stream of income, or a donate button. I mused out loud about the donate button to Helen, who suggested I just put one up. I didn't like the idea of donate buttons popping up next to these counters and buttons. I thought it would make them less funny, which was what made it worthwhile to me. I decided to make a small page about myself and put the button there, and linked to that page on the "add hugs" screen with a tiny line that said Who is andr00?.
What I didn't realize is that there was now an easy way to trace the hug counter back to me, where there wasn't before. Suddenly all sorts of people started commenting in my own livejournal, and adding me to their "friends list". All sorts of VERY YOUNG people. Kris refers to them as "LJ Groupies". Generally in the 13-20 age range. Some of them think I'm "cute". Kris is right. They're generally not too bad. I have a livejournal policy of keeping my friends-of and friends list exactly synchronized, with exceptions only for practicality's sake. This is to avoid any drama that usually goes with the friending-of or subsequent defriending. Because of this policy (which I still believe in), I have many many people on my friends list. Livejournal assumes you want to read all the journals on your friends list, so it gives you a merged-view of their latest entries. Mine is now HUGE, and includes many tearful tributes to pop stars, bedroom-floor wails of depression, photojournals about fish and twinkies, and lots of people in high school. Fortunately there is a feature which lets you tailor sets of filters for that view. Who is in what filter is not public information. We can just say that I'm still able to keep up on the people I like.
Usage is holding pretty steady at 400 to 600 thousand hits per day. Number of hugs users is in the mid tens of thousands, though many of those haven't been hit in a while. The log files get to a couple hundred megs, get rotated out, and eventually deleted. Once in a while I get email from someone asking if I can tell who hugged who. I tell them this information is not available. I know from previous work experience not to record any information people aren't asking you to record. Folks hate that.
The donate button was getting a pretty good workout, too. I actually made enough money off the donate button to pay for one hour of my development time, which isn't such a bad rate for what I put into it. One hour of development pays for an awful lot of oatmeal and ramen. I got so many donations by credit card that I had to upgrade my paypal account to a "premium" account. That's where they charge a flat rate off the top of every payment, plus a percentage. Because of that, small donations (like my very first one, a dime), are effectively negated. If you donate 50 cents, I get 19. Ah well. The credit card amounts made up for any fees. But now my account is like that forever. I can't go back to the non-fee version which doesn't take CCs. Oh well. This will help me later if I decide to sell something else online.
The strangest thing was, after getting lots of mail from people who really like the hugs counter, and seeing it boost people's moods for seemingly no reason, I really felt like I did something pretty good. It made people happy. Some folks get very little physical affection, and going and checking on their counter and seeing that, say, 30 people would have liked to hug them was somehow reassuring. This was not my intention. I was trying to be cynical. I still think typing *hugs* is inferior to relating to someone in an articulate and understanding way. I would much rather understand a person than offer shallow reassurance. But, at least for some people, perhaps it's better than nothing at all.
|
|